Kaynağa Gözat

* Removed unused variable use_console_r and DP_LOG

svn: 2177
Bryan Drewery 21 yıl önce
ebeveyn
işleme
79d44ef33a
5 değiştirilmiş dosya ile 7 ekleme ve 13 silme
  1. 1 4
      src/dccutil.c
  2. 1 1
      src/dccutil.h
  3. 0 1
      src/log.c
  4. 1 1
      src/log.h
  5. 4 6
      src/mod/server.mod/servmsg.c

+ 1 - 4
src/dccutil.c

@@ -240,16 +240,13 @@ dprintf(int idx, const char *format, ...)
   if (idx < 0) {
     tputs(-idx, buf, len);
   } else if (idx > 0x7FF0) {
-    if (idx == DP_LOG || idx == DP_STDOUT || idx == DP_STDOUT) {
+    if (idx == DP_STDOUT || idx == DP_STDOUT) {
       colorbuf(buf, len, -1);
       buf[sizeof(buf) - 1] = 0;
       len = strlen(buf);
     }
 
     switch (idx) {
-      case DP_LOG:
-        putlog(LOG_MISC, "*", "%s", buf);
-        break;
       case DP_STDOUT:
         tputs(STDOUT, buf, len);
         break;

+ 1 - 1
src/dccutil.h

@@ -17,7 +17,7 @@ struct portmap {
 /* Fake idx's for dprintf - these should be ridiculously large +ve nums
  */
 #define DP_STDOUT       0x7FF1
-#define DP_LOG          0x7FF2
+//#define DP_LOG          0x7FF2
 #define DP_SERVER       0x7FF3
 #define DP_HELP         0x7FF4
 #define DP_STDERR       0x7FF5

+ 0 - 1
src/log.c

@@ -28,7 +28,6 @@
 
 int	conmask = LOG_MODES | LOG_CMDS | LOG_MISC; /* Console mask */
 bool	debug_output = 1;      /* Disply output to server to LOG_SERVEROUT */
-bool 	use_console_r = 1;      /* Allow users to set their console +r  */
 
 typedef struct {
 	int flag;

+ 1 - 1
src/log.h

@@ -36,6 +36,6 @@ char *maskname(int);
 void irc_log(struct chanset_t *, const char *, ...) __attribute__((format(printf, 2, 3)));
 
 extern int		conmask;
-extern bool		debug_output, use_console_r;
+extern bool		debug_output;
 
 #endif /* !_LOG_H */

+ 4 - 6
src/mod/server.mod/servmsg.c

@@ -1055,13 +1055,11 @@ static void server_activity(int idx, char *msg, int len)
  
   code = newsplit(&msg);
 
-  if (use_console_r) {
-    if (!strcmp(code, "PRIVMSG") || !strcmp(code, "NOTICE")) {
-      if (!match_ignore(from))
-	putlog(LOG_RAW, "@", "[@] %s %s %s", from, code, msg);
-    } else
+  if (!strcmp(code, "PRIVMSG") || !strcmp(code, "NOTICE")) {
+    if (!match_ignore(from))
       putlog(LOG_RAW, "@", "[@] %s %s %s", from, code, msg);
-  }
+  } else
+    putlog(LOG_RAW, "@", "[@] %s %s %s", from, code, msg);
 
   /* This has GOT to go into the raw binding table, * merely because this
    * is less effecient.