]> jfr.im git - irc/DALnet/bahamut.git/commitdiff
Exempt IRC Operators from the auditorium mode (cmode +A). (#52)
authorKobi Shmueli <redacted>
Sun, 26 Aug 2018 17:56:41 +0000 (20:56 +0300)
committerEmilio A. Escobar <redacted>
Sun, 26 Aug 2018 17:56:41 +0000 (10:56 -0700)
* Exempt IRC Operators from the auditorium mode (cmode +A).

(requested by toolman)

-Kobi.

* Don't exempt IRC Operators from not being able to talk on auditorium channels (cmode +A), just let them see all users/joins/parts/mode changes.

src/channel.c
src/m_who.c
src/send.c

index 5bfb8432be1a05d74e7fbed079af004a2dde684f..1ee3ff52848d250f98e05f093ae8e94839d228ae 100644 (file)
@@ -4214,7 +4214,7 @@ int m_names(aClient *cptr, aClient *sptr, int parc, char *parv[])
             buf[idx++] = '@';
         else if(cm->flags & CHFL_VOICE)
             buf[idx++] = '+';
-        else if((chptr->mode.mode & MODE_AUDITORIUM) && (sptr != acptr) && !is_chan_opvoice(sptr, chptr)) continue;
+        else if((chptr->mode.mode & MODE_AUDITORIUM) && (sptr != acptr) && !is_chan_opvoice(sptr, chptr) && !IsAnOper(sptr)) continue;
         for(s = acptr->name; *s; s++)
             buf[idx++] = *s;
         buf[idx++] = ' ';
index 5c864546e3f34d8e66ab1862d96342dfc16a236f..75f0d7a3918878a04c40ece031b2d6d728e62e3e 100644 (file)
@@ -746,7 +746,7 @@ int m_who(aClient *cptr, aClient *sptr, int parc, char *parv[])
     if(wsopts.channel!=NULL)
     {
        if(IsMember(sptr,wsopts.channel) && (!(wsopts.channel->mode.mode & MODE_AUDITORIUM) ||
-           is_chan_opvoice(sptr, wsopts.channel)))
+           is_chan_opvoice(sptr, wsopts.channel) || IsAnOper(sptr)))
            showall=1;
        else if(SecretChannel(wsopts.channel) && IsAdmin(sptr))
            showall=1;
index 9757250c1c7b28de1525dec57459cea54cf505dc..25789c01c47c686852aacdfc12db9ccd5ad69721 100644 (file)
@@ -1203,8 +1203,9 @@ void sendto_channel_butserv_me(aChannel *chptr, aClient *from, char *pattern, ..
 /*
  * sendto_channelopvoice_butserv_me
  * 
- * Send a message to all members of a channel that are connected to this
+ * Send a message to all opped or voiced members of a channel that are connected to this
  * server. Possibly hide the origin, if it's a server, with me.name if certain paranoia is on.
+ * IRC Operators will also receive this message (even if they're not opped/voiced).
  */
 void sendto_channelopvoice_butserv_me(aChannel *chptr, aClient *from, char *pattern, ...)
 {
@@ -1231,7 +1232,7 @@ void sendto_channelopvoice_butserv_me(aChannel *chptr, aClient *from, char *patt
     {
         if (MyConnect(acptr = cm->cptr))
         {
-            if(!is_chan_opvoice(acptr, chptr)) continue;
+            if(!is_chan_opvoice(acptr, chptr) && !IsAnOper(acptr)) continue;
             if (!didlocal)
             {
                 didlocal = prefix_buffer(0, from, pfix, sendbuf, pattern, vl);