Sfoglia il codice sorgente

* Display channel name from console if one is not used with cmd_chanset

svn: 1928
Bryan Drewery 21 anni fa
parent
commit
2d57d076dd
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 1 0
      doc/UPDATES
  2. 4 2
      src/mod/channels.mod/cmdschan.c

+ 1 - 0
doc/UPDATES

@@ -55,6 +55,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Fixed double cmd log with cmd_whom.
 * The mode queue being flushed could cause excess flood, reverted back to eggdrop code for flushing the mode queue.
 * Added errno output to "Can't create new socket" error.
+* Display channel name from console if one is not used with cmd_chanset
 
 1.2.1
 

+ 4 - 2
src/mod/channels.mod/cmdschan.c

@@ -1287,9 +1287,8 @@ static void cmd_chanset(int idx, char *par)
   struct chanset_t *chan = NULL;
   int all = 0;
 
-  putlog(LOG_CMDS, "*", "#%s# chanset %s", dcc[idx].nick, par);
-
   if (!par[0]) {
+    putlog(LOG_CMDS, "*", "#%s# chanset %s", dcc[idx].nick, par);
     dprintf(idx, "Usage: chanset [%schannel|*] <settings>\n", CHANMETA);
     return;
   }
@@ -1336,6 +1335,9 @@ static void cmd_chanset(int idx, char *par)
       return;
     }
   }
+
+  putlog(LOG_CMDS, "*", "#%s# chanset (%s) %s", dcc[idx].nick, chan->dname, par);
+  
   if (do_chanset(result, all ? NULL : chan, par, DO_LOCAL | DO_NET) == ERROR) {
     dprintf(idx, "Error trying to set { %s } on %s: %s\n", par, all ? "all channels" : chan->dname, result);
     return;