Просмотр исходного кода

* Fixed unsetting a global ban when the same ban is local to a chan causes the bots to unban it. (#24)

svn: 2002
Bryan Drewery 21 лет назад
Родитель
Сommit
4a9ed5d6dd
3 измененных файлов с 9 добавлено и 3 удалено
  1. 1 0
      doc/UPDATES
  2. 1 0
      src/mod/irc.mod/mode.c
  3. 7 3
      src/mod/share.mod/share.c

+ 1 - 0
doc/UPDATES

@@ -71,6 +71,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Now using ANSI color code *0* to close bold (as opposed to new standard: 22)
 * Fixed some excess newlines when a user is booted for losing hub/leaf access.
 * cmd_find now optional takes a username instead of a nick!user@host to search for.
+* Fixed unsetting a global ban when the same ban is local to a chan causes the bots to unban it. (#24)
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 1 - 0
src/mod/irc.mod/mode.c

@@ -547,6 +547,7 @@ got_op(struct chanset_t *chan, memberlist *m, memberlist *mv)
     if (reversing || chk_deop(victim, chan) || (!loading && userlist && chan_bitch(chan) && !chk_op(victim, chan))) {     /* chk_op covers +private */
       int num = randint(10);
       char outbuf[101] = ""; 
+/* should kick the oppee first, then deal with the opper */
 
       if (num == 4) {
         simple_sprintf(outbuf, "MODE %s -o %s\r\n", chan->name, mv->nick);

+ 7 - 3
src/mod/share.mod/share.c

@@ -714,9 +714,13 @@ static void share_mns_mask(int idx, char *par)
     if (u_delmask(type, NULL, par, 1) > 0) {
       if (!conf.bot->hub) {
         struct chanset_t *chan = NULL;
-
-        for (chan = chanset; chan; chan = chan->next)
-          add_delay(chan, '-', type, par);
+        masklist *channel_list = (type == 'b' ? chan->channel.ban : type == 'e' ? 
+                                  chan->channel.exempt : chan->channel.invite);
+        
+        for (chan = chanset; chan; chan = chan->next) {
+          if (!ismasked(channel_list, par))
+            add_delay(chan, '-', type, par);
+        }
       }
     }
     noshare = 0;