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

* Fix cmd_mop logging on invalid channels (addresses #392)

svn: 3615
Bryan Drewery 18 лет назад
Родитель
Сommit
6fd10fdced
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      doc/UPDATES
  2. 2 2
      src/mod/irc.mod/cmdsirc.c

+ 1 - 1
doc/UPDATES

@@ -51,7 +51,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Bots will now cycle nicks on servers which claim their nick is invalid. (fixes #311)
 * Bots will now cycle nicks on servers which claim their nick is invalid. (fixes #311)
 * Limit bots no longer set limit when 'chanmode -l' is set. (fixes #294)
 * Limit bots no longer set limit when 'chanmode -l' is set. (fixes #294)
 * Fixed +closed from interfering with 'chanmode -pi'. (fixes #294)
 * Fixed +closed from interfering with 'chanmode -pi'. (fixes #294)
-* Fix logging/usage bug in cmd_mop. (fixes #313)
+* Fix misc bugs with cmd_mop. (fixes #313 and #392)
 * Bad uname EMAILS now include the localhub's nick. (fixes #354)
 * Bad uname EMAILS now include the localhub's nick. (fixes #354)
 * -host now accepts partial host masks, ie, '-host user@host'.
 * -host now accepts partial host masks, ie, '-host user@host'.
 * Rewrote cmd_mdop into cmd_mmode. See 'help mmode' on a leaf bot.
 * Rewrote cmd_mdop into cmd_mmode. See 'help mmode' on a leaf bot.

+ 2 - 2
src/mod/irc.mod/cmdsirc.c

@@ -1163,11 +1163,11 @@ static void cmd_mop(int idx, char *par)
       chan = get_channel(idx, "", 0);
       chan = get_channel(idx, "", 0);
   }
   }
 
 
-  putlog(LOG_CMDS, "*", "#%s# (%s) mop %s", dcc[idx].nick, all ? "*" : (chan ? chan->dname : ""), par);
-
   if (!chan)
   if (!chan)
     return;
     return;
 
 
+  putlog(LOG_CMDS, "*", "#%s# (%s) mop %s", dcc[idx].nick, all ? "*" : chan->dname, par);
+
   if (!all) {
   if (!all) {
     dprintf(idx, "Usage: mop <channel|*>\n");
     dprintf(idx, "Usage: mop <channel|*>\n");
     return;
     return;