Ver Fonte

* Fix cmd_botjoin not properly setting up addedby/addedts for the channel.

Bryan Drewery há 16 anos atrás
pai
commit
a7db2bb680
2 ficheiros alterados com 9 adições e 8 exclusões
  1. 1 0
      doc/UPDATES
  2. 8 8
      src/mod/channels.mod/cmdschan.c

+ 1 - 0
doc/UPDATES

@@ -77,6 +77,7 @@
   * Fix '+user user' with no hostmask adding the hostmask '*!*@' to the user.
   * Fix case where bot would not get the +e and +I lists when getting opped.
   * If a bot devoices a user in a +voice channel, the +y bot will no longer enforce this.
+  * Fix cmd_botjoin not properly setting up addedby/addedts for the channel.
 * Misc changes
   * Cleanup DCC/Telnet listening so bot only listens on IPV6 if it was specifically given an IPV6 IP.
   * CTCP bot CHAT will no longer work if the bot does not have an IPV4 IP set.

+ 8 - 8
src/mod/channels.mod/cmdschan.c

@@ -985,15 +985,15 @@ static void pls_chan(int idx, char *par, char *bot)
       dprintf(idx, " %s\n", result);
   } else {
     if ((chan = findchan_by_dname(chname))) {
-      if (!bot) {
-        char tmp[51] = "";
+      char tmp[51] = "";
 
-        simple_snprintf(tmp, sizeof(tmp), "addedby %s addedts %li", dcc[idx].nick, (long) now);
-        if (buf[0]) {
-          strlcat(buf, " ", sizeof(buf));
-          strlcat(buf, tmp, sizeof(buf));
-        }
-        do_chanset(NULL, chan, buf[0] ? buf : tmp, DO_LOCAL);
+      simple_snprintf(tmp, sizeof(tmp), "addedby %s addedts %li", dcc[idx].nick, (long) now);
+      if (buf[0]) {
+        strlcat(buf, " ", sizeof(buf));
+        strlcat(buf, tmp, sizeof(buf));
+      }
+      do_chanset(NULL, chan, buf[0] ? buf : tmp, DO_LOCAL);
+      if (!bot) {
         dprintf(idx, "Channel %s added to the botnet.\n", chname);
       } else {
         dprintf(idx, "Channel %s added to the bot: %s\n", chname, bot);