]> 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 cb4cf9db392a02273ce9b5a9e201e38c5d604bf6..1b1e748a151b0392c36dc9056843065b75171ddb 100644 (file)
@@ -97,7 +97,7 @@ int user_modes[256] = {
        0,                      /* d */
        0,                      /* e */
        0,                      /* f */
-       UMODE_CALLERID,         /* g */
+       0,                      /* g */
        0,                      /* h */
        UMODE_INVISIBLE,        /* i */
        0,                      /* j */
@@ -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);