Selaa lähdekoodia

* Ported [2825] to 1.2.10
* cmd_checkchannels now states if a bot is not online. (fixes #239)


svn: 2826

Bryan Drewery 20 vuotta sitten
vanhempi
commit
cbc4349af5
2 muutettua tiedostoa jossa 10 lisäystä ja 6 poistoa
  1. 1 0
      doc/UPDATES
  2. 9 6
      src/mod/channels.mod/channels.c

+ 1 - 0
doc/UPDATES

@@ -19,6 +19,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_set list removal bugs. (fixes #246)
 * Fixed cmd_set list removal bugs. (fixes #246)
 * Fixed chanmode -i conflicting with closed-invite 1. (fixes #249)
 * Fixed chanmode -i conflicting with closed-invite 1. (fixes #249)
 * Fixed yet another .relay bug (YARB) (fixes #250)
 * Fixed yet another .relay bug (YARB) (fixes #250)
+* cmd_checkchannels now states if a bot is not online. (fixes #239)
 
 
 1.2.9 - http://tracker.shatow.net/milestone/1.2.9
 1.2.9 - http://tracker.shatow.net/milestone/1.2.9
 * Fixed cmd_[un]stick not properly using numbers for channel masks. (#160)
 * Fixed cmd_[un]stick not properly using numbers for channel masks. (#160)

+ 9 - 6
src/mod/channels.mod/channels.c

@@ -188,14 +188,17 @@ static void got_chans(char *botnick, char *code, char *par)
   struct chanset_t *chan = NULL;
   struct chanset_t *chan = NULL;
   char buf[1024] = "";
   char buf[1024] = "";
 
 
-  for (chan = chanset; chan; chan = chan->next) {
-    if (shouldjoin(chan) && !channel_active(chan)) {
-      simple_snprintf(buf, sizeof(buf), "%s%s%s", buf[0] ? buf : "", buf[0] ? " " : "", chan->dname);
+  if (server_online) {
+    for (chan = chanset; chan; chan = chan->next) {
+      if (shouldjoin(chan) && !channel_active(chan)) {
+        simple_snprintf(buf, sizeof(buf), "%s%s%s", buf[0] ? buf : "", buf[0] ? " " : "", chan->dname);
+      }
     }
     }
-  }
 
 
-  if (buf[0])
-    putlog(LOG_MISC, "*", "I am not in: %s", buf);
+    if (buf[0])
+      putlog(LOG_MISC, "*", "I am not in: %s", buf);
+  } else
+    putlog(LOG_MISC, "*", "I am not online.");
 }
 }
 
 
 static void got_cjoin(char *botnick, char *code, char *par)
 static void got_cjoin(char *botnick, char *code, char *par)