target->name, modes, target->timestamp);
}
+/* Added to allow services to mode users
+ 2005 - 8 - 10 by Life4Christ
+*/
+void
+irc_umode(struct userNode *target, const char *modes)
+{
+ putsock("%s " P10_MODE " %s %s ",self->numeric,target->nick, modes);
+}
+
+
void
irc_invite(struct userNode *from, struct userNode *who, struct chanNode *to)
{
dict_insert(irc_func_dict, TOK_MARK, cmd_dummy);
/* Ignore privs */
dict_insert(irc_func_dict, TOK_PRIVS, cmd_dummy);
+ /* Ignore remote luser */
+ dict_insert(irc_func_dict, TOK_LUSERS, cmd_dummy);
/* We have reliable clock! Always! Wraaa! */
dict_insert(irc_func_dict, CMD_SETTIME, cmd_dummy);
dict_insert(irc_func_dict, TOK_SETTIME, cmd_dummy);
free_user(user);
}
+static void call_oper_funcs(struct userNode *user);
+
void mod_usermode(struct userNode *user, const char *mode_change) {
- static void call_oper_funcs(struct userNode *user);
int add = 1;
const char *word = mode_change;
case '+': add = 1; break;
case '-': add = 0; break;
case 'o':
- do_user_mode(FLAGS_OPER);
if (add) {
- userList_append(&curr_opers, user);
- call_oper_funcs(user);
+ if(!IsOper(user)) { /* Dont re-oper an oper */
+ userList_append(&curr_opers, user);
+ call_oper_funcs(user);
+ }
} else {
userList_remove(&curr_opers, user);
}
+ do_user_mode(FLAGS_OPER);
break;
case 'O': do_user_mode(FLAGS_LOCOP); break;
case 'i': do_user_mode(FLAGS_INVISIBLE);