]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_user.c
Add is_halfop() and is_owner() and start using them in the new functions.
[irc/rqf/shadowircd.git] / src / s_user.c
index 441012c32f9a2adabe13f8f0886a1677a37a6253..198249c8f7c196fc5d043317d16560f9201db24a 100644 (file)
@@ -73,7 +73,7 @@ int user_modes[256] = {
        UMODE_DEAF,             /* D */
        0,                      /* E */
        0,                      /* F */
-       0,                      /* G */
+       UMODE_SCALLERID,        /* G */
        0,                      /* H */
        0,                      /* I */
        0,                      /* J */
@@ -109,7 +109,7 @@ int user_modes[256] = {
        0,                      /* m */
        0,                      /* n */
        UMODE_OPER,             /* o */
-       0,                      /* p */
+       UMODE_OVERRIDE,         /* p */
        0,                      /* q */
        0,                      /* r */
        UMODE_SERVNOTICE,       /* s */
@@ -1138,6 +1138,12 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
                source_p->umodes &= ~UMODE_ADMIN;
        }
 
+       if(MyConnect(source_p) && (source_p->umodes & UMODE_OVERRIDE) && (!IsOperOverride(source_p)))
+       {
+               sendto_one_notice(source_p, ":*** You need oper and the override flag for +p");
+               source_p->umodes &= ~UMODE_OVERRIDE;
+       }
+
        /* let modules providing usermodes know that we've changed our usermode --nenolod */
        hdata.client = source_p;
        hdata.oldumodes = setflags;