Pārlūkot izejas kodu

* Fix bot not joining channels when invited

Bryan Drewery 16 gadi atpakaļ
vecāks
revīzija
045ea493fa
2 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 2 0
      doc/UPDATES
  2. 2 1
      src/mod/irc.mod/chan.c

+ 2 - 0
doc/UPDATES

@@ -1,3 +1,5 @@
+* Bot now attempts to join a channel immediately on invite.
+
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes
   * Binary error messages are no longer obscure numbers or fake segfaults. (Compile with OBSCURE_ERRORS to re-enable)

+ 2 - 1
src/mod/irc.mod/chan.c

@@ -2398,7 +2398,8 @@ static int gotinvite(char *from, char *msg)
   if (!chan)
     /* Might be a short-name */
     chan = findchan_by_dname(msg);
-  else {
+
+  if (chan) {
     if (channel_pending(chan) || channel_active(chan))
       dprintf(DP_HELP, "NOTICE %s :I'm already here.\n", nick);
     else if (shouldjoin(chan))