ソースを参照

* Fixed bot sending +Ie modes before recieving list after opping.
(Also rechecking invites/exempts after recieving the lists)


svn: 1942

Bryan Drewery 21 年 前
コミット
a5344d5ffb
2 ファイル変更17 行追加4 行削除
  1. 1 0
      doc/UPDATES
  2. 16 4
      src/mod/irc.mod/chan.c

+ 1 - 0
doc/UPDATES

@@ -44,6 +44,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Added channel flag +|-botbitch, when set only bots will be allowed to be opped, users be auto-deopped.
 * chanset -bitch/-private/-botbitch/+botbitch/+closed/+private will now trigger bots to recheck channel (op/deop/kick people)
 * Fixed bot not updating it's hostmask when reconnecting to server
+* Fixed bot sending +Ie modes before recieving list after opping.
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 16 - 4
src/mod/irc.mod/chan.c

@@ -1244,13 +1244,13 @@ void recheck_channel(struct chanset_t *chan, int dobans)
       resetbans(chan);
     else
       recheck_bans(chan);
-    if (use_invites) {
+    if (use_invites && !(chan->ircnet_status & CHAN_ASKED_INVITES)) {
       if (channel_nouserinvites(chan) && !stop_reset)
 	resetinvites(chan);
       else
 	recheck_invites(chan);
     }
-    if (use_exempts) {
+    if (use_exempts && !(chan->ircnet_status & CHAN_ASKED_EXEMPTS)) {
       if (channel_nouserexempts(chan) && !stop_reset)
 	resetexempts(chan);
       else
@@ -1811,6 +1811,12 @@ static int got349(char *from, char *msg)
     if (chan) {
       putlog(LOG_DEBUG, "*", "END +e %s", chan->dname);
       chan->ircnet_status &= ~CHAN_ASKED_EXEMPTS;
+      
+      if (channel_nouserexempts(chan))
+        resetexempts(chan);
+      else
+        recheck_exempts(chan);
+
       if (channel_enforcebans(chan))
         enforce_bans(chan);
     }
@@ -1872,8 +1878,14 @@ static int got347(char *from, char *msg)
     newsplit(&msg);
     chname = newsplit(&msg);
     chan = findchan(chname);
-    if (chan)
-      chan->ircnet_status &= ~CHAN_ASKED_INVITES;
+    if (chan) {
+      chan->ircnet_status &= ~CHAN_ASKED_INVITESD;
+
+      if (channel_nouserinvites(chan))
+        resetinvites(chan);
+      else
+        recheck_invites(chan);
+    }
   }
   return 0;
 }