Bläddra i källkod

* Setting -take now automatically sets +fastop as well (#13).

svn: 1957
Bryan Drewery 21 år sedan
förälder
incheckning
49cb4a6ed4
2 ändrade filer med 4 tillägg och 1 borttagningar
  1. 1 0
      doc/UPDATES
  2. 3 1
      src/mod/channels.mod/tclchan.c

+ 1 - 0
doc/UPDATES

@@ -50,6 +50,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Default UID is now: -1 (Fixes running as root by accident. #12)
 * Default UID is now: -1 (Fixes running as root by accident. #12)
 * Added some error logging for failed bind() listen() and getsockname()
 * Added some error logging for failed bind() listen() and getsockname()
 * Fixed DNS returning a blank reply for reverse lookups with missing records.
 * Fixed DNS returning a blank reply for reverse lookups with missing records.
+* Setting -take now automatically sets +fastop as well (#13).
 
 
 1.2.2
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 3 - 1
src/mod/channels.mod/tclchan.c

@@ -527,8 +527,10 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item)
       chan->status &= ~CHAN_CLOSED;
       chan->status &= ~CHAN_CLOSED;
     else if (!strcmp(item[i], "+take"))
     else if (!strcmp(item[i], "+take"))
       chan->status |= CHAN_TAKE;
       chan->status |= CHAN_TAKE;
-    else if (!strcmp(item[i], "-take"))
+    else if (!strcmp(item[i], "-take")) {
       chan->status &= ~CHAN_TAKE;
       chan->status &= ~CHAN_TAKE;
+      chan->status |= CHAN_FASTOP;		// to avoid bots still mass opping from +take from not using cookies
+    }
     else if (!strcmp(item[i], "+voice"))
     else if (!strcmp(item[i], "+voice"))
       chan->status |= CHAN_VOICE;
       chan->status |= CHAN_VOICE;
     else if (!strcmp(item[i], "-voice"))
     else if (!strcmp(item[i], "-voice"))