]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
When setting/unsetting cmode +M, only wallops once, not for every server on the network.
authorJD Horelick <redacted>
Sun, 15 May 2011 18:01:07 +0000 (14:01 -0400)
committerJD Horelick <redacted>
Sun, 15 May 2011 18:01:07 +0000 (14:01 -0400)
src/chmode.c

index 00a0c26cbb0ec515fc7e1cc5e51684d8d1a664a6..0a43199431994b028bbd4970869a9f35fb82f8ca 100644 (file)
@@ -674,19 +674,23 @@ chm_hidden(struct Client *source_p, struct Channel *chptr,
                mode_changes[mode_count].mems = ONLY_OPERS;
                mode_changes[mode_count].override = 0;
                mode_changes[mode_count++].arg = NULL;
-       
-               /* A little ugly */
-               sendto_wallops_flags(UMODE_WALLOP, &me, 
-                               "+%c set on [%s] by %s!%s@%s",
-                               c, chptr->chname, source_p->name, source_p->username, source_p->host);
+               
                ilog(L_MAIN, "+%c set on [%s] by %s",
                                c, chptr->chname, get_oper_name(source_p));
-
-               if(*chptr->chname != '&')
-                       sendto_server(NULL, NULL, NOCAPS, NOCAPS, 
-                               ":%s WALLOPS :+%c set on [%s] by %s!%s@%s",
-                               me.name, c, chptr->chname, source_p->name, source_p->username,
-                               source_p->host);
+       
+               /* A little ugly */
+               if (MyClient(source_p))
+               {
+                       sendto_wallops_flags(UMODE_WALLOP, &me, 
+                                       "+%c set on [%s] by %s!%s@%s",
+                                       c, chptr->chname, source_p->name, source_p->username, source_p->host);
+
+                       if(*chptr->chname != '&')
+                               sendto_server(NULL, NULL, NOCAPS, NOCAPS, 
+                                       ":%s WALLOPS :+%c set on [%s] by %s!%s@%s",
+                                       me.name, c, chptr->chname, source_p->name, source_p->username,
+                                       source_p->host);
+               }
        }
        else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type))
        {
@@ -701,18 +705,22 @@ chm_hidden(struct Client *source_p, struct Channel *chptr,
                mode_changes[mode_count].override = 0;
                mode_changes[mode_count++].arg = NULL;
                
-               /* A little ugly */
-               sendto_wallops_flags(UMODE_WALLOP, &me, 
-                               "+%c unset from [%s] by %s!%s@%s",
-                               c, chptr->chname, source_p->name, source_p->username, source_p->host);
                ilog(L_MAIN, "+%c unset from [%s] by %s",
                                c, chptr->chname, get_oper_name(source_p));
-
-               if(*chptr->chname != '&')
-                       sendto_server(NULL, NULL, NOCAPS, NOCAPS, 
-                               ":%s WALLOPS :+%c unset from [%s] by %s!%s@%s",
-                               me.name, c, chptr->chname, source_p->name, source_p->username,
-                               source_p->host);
+               
+               /* A little ugly */
+               if (MyClient(source_p))
+               {
+                       sendto_wallops_flags(UMODE_WALLOP, &me, 
+                                       "+%c unset from [%s] by %s!%s@%s",
+                                       c, chptr->chname, source_p->name, source_p->username, source_p->host);
+
+                       if(*chptr->chname != '&')
+                               sendto_server(NULL, NULL, NOCAPS, NOCAPS, 
+                                       ":%s WALLOPS :+%c unset from [%s] by %s!%s@%s",
+                                       me.name, c, chptr->chname, source_p->name, source_p->username,
+                                       source_p->host);
+               }
        }
 }