Преглед изворни кода

* cmd_color now shows which color mode you are being shown

svn: 565
Bryan Drewery пре 22 година
родитељ
комит
612535724e
2 измењених фајлова са 6 додато и 2 уклоњено
  1. 1 0
      doc/UPDATES
  2. 5 2
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -15,6 +15,7 @@ This is a summary of ChangeLog basically.
 12.Bots now check if they need op every 5 seconds and not every 3.
 13.Removed 98% of Debug Contexts; they were slowing the bot down and eating resources.
 14.Removed and reorganized some various excess system calls in the core.
+15.cmd_color now tells you which color mode you are shown.
 
 1.0.14
 1.Fixed order of log/info for cmd_whoami.

+ 5 - 2
src/cmds.c

@@ -2662,14 +2662,17 @@ static void cmd_echo(struct userrec *u, int idx, char *par)
 static void cmd_color(struct userrec *u, int idx, char *par)
 {
   module_entry *me;
-
+  int ansi = 0;
   char *of;
+
   putlog(LOG_CMDS, "*", STR("#%s# color %s"), dcc[idx].nick, par);
 
+  if ((idx && ((dcc[idx].type != &DCC_RELAYING) && (dcc[idx].status & STAT_TELNET))) || !backgrd)
+    ansi++;
   if (!par[0]) {
     dprintf(idx, STR("Usage: color <on/off>\n"));
     if (dcc[idx].status & STAT_COLOR) 
-      dprintf(idx, STR("Color is currently on.\n"));
+      dprintf(idx, STR("Color is currently on. (%s)\n"), ansi ? "ANSI" : "mIRC");
     else
       dprintf(idx, STR("Color is currently off.\n"));
     return;