예제 #1
0
void WebConferenceFactory::invoke(const string& method, 
				  const AmArg& args, 
				  AmArg& ret)
{
  

  if(method == "roomCreate"){
    roomCreate(args, ret);
    ret.push(getServerInfoString().c_str());
  } else if(method == "roomInfo"){
    roomInfo(args, ret);
    ret.push(getServerInfoString().c_str());
  } else if(method == "dialout"){
    dialout(args, ret);
    ret.push(getServerInfoString().c_str());
  } else if(method == "mute"){
    mute(args, ret);
    ret.push(getServerInfoString().c_str());
  } else if(method == "unmute"){
    unmute(args, ret);
    ret.push(getServerInfoString().c_str());
  } else if(method == "kickout"){
    kickout(args, ret);
    ret.push(getServerInfoString().c_str());
  } else if(method == "serverInfo"){
    serverInfo(args, ret);		
    ret.push(getServerInfoString().c_str());    
  } else if(method == "vqRoomFeedback"){
    vqRoomFeedback(args, ret);		
    ret.push(getServerInfoString().c_str());    
  } else if(method == "vqCallFeedback"){
    vqCallFeedback(args, ret);		
    ret.push(getServerInfoString().c_str());    
  } else if(method == "vqConferenceFeedback"){
    vqConferenceFeedback(args, ret);		
    ret.push(getServerInfoString().c_str());    
  } else if(method == "help"){
    ret.push("help text goes here");
    ret.push(getServerInfoString().c_str());
  } else if(method == "resetFeedback"){
    resetFeedback(args, ret);		
    ret.push(getServerInfoString().c_str());    
  } else if(method == "flushFeedback"){
    flushFeedback(args, ret);		
    ret.push(getServerInfoString().c_str());    
  } else if(method == "_list"){
    ret.push("roomCreate");
    ret.push("roomInfo");
    ret.push("dialout");
    ret.push("mute");
    ret.push("unmute");
    ret.push("kickout");
    ret.push("serverInfo");
    ret.push("vqConferenceFeedback");
    ret.push("vqCallFeedback");
    ret.push("vqRoomFeedback");
  } else
    throw AmDynInvoke::NotImplemented(method);
}
예제 #2
0
파일: rooms.c 프로젝트: cafuego/monolith
void
do_kickout()
{

    char *the_user = NULL;
    user_t *userP;		/* changed varname: PR */
    room_t scratch;
    unsigned int user_id;
    int not_done;

    read_forum(curr_rm, &scratch);

    cprintf("\n");
    if (!(scratch.flags & QR_PRIVATE))
	cprintf("\1f\1rRemember that this is a \1gPublic \1r%s!\n\n", config.forum);

    cprintf("\1f\1rAlien to kickout from \1g%s\1w>: \1c", scratch.name);
    nox = 1;
    the_user = get_name(2);
    if (the_user[0] == 0)
	return;

    if (mono_sql_u_check_user(the_user) == FALSE) {
	cprintf("\n\1f\1rNo such user.\1a\n");
	return;
    }
    userP = readuser(the_user);
    if (userP->priv & PRIV_WIZARD) {
	cprintf("\n\1f\1rYou can't kickout " WIZARDTITLE "s\1r!!!\1a\n\n");
	log_sysop_action("tried to kick %s out of %s>", userP->username, scratch.name);
	xfree(userP);
	return;
    }
    if (kickout(the_user, curr_rm) == -1) {
	cprintf("\n\1f\1rSomething went wrong kicking that user.\n\1a");
	return;
    }
    mono_cached_sql_u_name2id(the_user, &user_id);
    mono_sql_uf_add_kicked(user_id, curr_rm);

    log_sysop_action("kicked %s out of %s>.", the_user, quickroom.name);

    cprintf("\n\1f\1rYou now have to write a %s \1w(\1ryell\1w)\1r to the %s%s\1a\n", config.message, ADMINCOL, config.admin);
    cprintf("\1f\1rabout the kickout: who, why, where, for how long.%s", "\n\n(Kickout Notification)\1a\n");

    not_done = enter_message(YELL_FORUM, EDIT_NORMAL, FORCED_BANNER, NULL);

    while (not_done) {
	cprintf("\n\1rYou're required to enter this yell.\1a\n");
	not_done = enter_message(YELL_FORUM, EDIT_NORMAL, FORCED_BANNER, NULL);
    }
    xfree(userP);
    return;

}
예제 #3
0
/**********************************************************************
* aide menu
* Access to this menu is restricted to those with aide status.
* Wizards can do everything
* System Aides can do all but aideify
* Room Aides can only get here if it's their room and they can
* NOT do <A>ideify <C>reateroom <Z>ap room.
**********************************************************************/
void
aide_menu(void)
{
register int chr = '?';

  /* Can't get here unless you're at least a room aide for this room */

  while (chr != 'M' && chr != ' ' && chr != '\n')
  {
    switch (chr)
    {
      case 'C':
	printf("Create new forum\n");
	createroom();
	loadroom();
	break;

      case 'D':
	printf("Edit forum description\n\n");
	editdesc();
	break;

      case 'E':
	printf("Edit forum\n");
	editroom();
	break;

      case 'H':
	printf("Help!\n");
	if (ouruser->f_admin)
	  help("aidemenu", YES);
	else
	  help("fmmenu", YES);
	break;

      case 'I':
	printf("Invite user\n");
	invite();
	break;

      case 'K':
	printf("Kick out user\n");
	kickout();
	break;

      case 'L':
	if (ouruser->f_prog)
	{
	  printf("Logout all users\n");
	  logout_all();
	  break;
	}
	/* FALL THRU */

      case 'l':
        printf("Logout user\n");
        logout();
        break;

      case 'O':
	show_online(1);
	break;

      case 'W':
	whoknows();
	break;

      case 'X':
	if (ouruser->f_prog)
	  xbroadcast();
	else
	  chr = 0;
	break;

      case 'Z':
	printf("Zap (delete) forum\n");
	deleteroom();
	loadroom();
	break;

      case '?':
      case '/':
	if (ouruser->f_admin)
	  help("aidecmd", NO);
	else
	  help("fmcmd", NO);
	break;

      default:
	break;
    }

    if (chr)
      colorize("\n@Y[%s]@M Forum command ->@G ", msg->room[curr].name);
    if (ouruser->f_admin)
      chr = get_single_quiet("CDEHIKlLMOWXZ \n/?");
    else
      chr = get_single_quiet("DEHIKMW \n/?");

  }				/* end of while loop */
  printf("Forum level\n");
}