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

* Fixed a color display bug

svn: 764
Bryan Drewery 22 лет назад
Родитель
Сommit
bd8a1bd94a
2 измененных файлов с 4 добавлено и 0 удалено
  1. 1 0
      doc/UPDATES
  2. 3 0
      src/misc.c

+ 1 - 0
doc/UPDATES

@@ -6,6 +6,7 @@ This is a summary of ChangeLog basically.
 3.cmd_dccstat is now available on leaf bots for (+a|-)
 4.Remote idx's now set their socket to -1 (shouldnt cause any problems)
 5.Removed 'ppid: ' from startup.
+6.Fixed colors being shown even if .color was set to OFF.
 
 1.1.1
 1.Fixed a problem with using /DCC CHAT <bot>

+ 3 - 0
src/misc.c

@@ -1285,6 +1285,9 @@ char *color(int idx, int type, int color)
   /* if user is connected over TELNET or !backgrd, show ANSI
    * if they are relaying, they are most likely on an IRC client and should have mIRC codes
    */
+  if (!(dcc[idx].status & STAT_COLOR))
+    return "";
+
   if ((idx && (idx != -1 && (dcc[idx].type != &DCC_RELAYING) && (dcc[idx].status & STAT_TELNET))) 
      || (idx == -1 || !backgrd)) ansi++;