]> jfr.im git - solanum.git/blobdiff - ircd/s_user.c
Replace most checks for +o with oper:general
[solanum.git] / ircd / s_user.c
index bda9bca82844b71d6aa2642ff2c5bc27b06d39d4..1b1e748a151b0392c36dc9056843065b75171ddb 100644 (file)
@@ -1237,6 +1237,9 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
                source_p->umodes &= ~UMODE_ADMIN;
        }
 
+       if(MyClient(source_p))
+               source_p->handler = IsOperGeneral(source_p) ? OPER_HANDLER : CLIENT_HANDLER;
+
        /* let modules providing usermodes know that we've changed our usermode --nenolod */
        hdata.client = source_p;
        hdata.oldumodes = setflags;
@@ -1439,6 +1442,8 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
        hdata.oldsnomask = oldsnomask;
        call_hook(h_umode_changed, &hdata);
 
+       source_p->handler = IsOperGeneral(source_p) ? OPER_HANDLER : CLIENT_HANDLER;
+
        sendto_realops_snomask(SNO_GENERAL, L_ALL,
                             "%s (%s!%s@%s) is now an operator", oper_p->name, source_p->name,
                             source_p->username, source_p->host);