Pārlūkot izejas kodu

* cmd_color now shows which color mode you are being shown

svn: 565
Bryan Drewery 22 gadi atpakaļ
vecāks
revīzija
612535724e
2 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  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.
 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.
 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.
 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.0.14
 1.Fixed order of log/info for cmd_whoami.
 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)
 static void cmd_color(struct userrec *u, int idx, char *par)
 {
 {
   module_entry *me;
   module_entry *me;
-
+  int ansi = 0;
   char *of;
   char *of;
+
   putlog(LOG_CMDS, "*", STR("#%s# color %s"), dcc[idx].nick, par);
   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]) {
   if (!par[0]) {
     dprintf(idx, STR("Usage: color <on/off>\n"));
     dprintf(idx, STR("Usage: color <on/off>\n"));
     if (dcc[idx].status & STAT_COLOR) 
     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
     else
       dprintf(idx, STR("Color is currently off.\n"));
       dprintf(idx, STR("Color is currently off.\n"));
     return;
     return;