[eggheads-patches] PATCH: eggdrop_n.patch

Fabian Knittel fknittel at gmx.de
Tue Oct 5 20:28:30 CST 1999


[ eggdrop_n.patch ]

If you called eggdrop with the -n parameter, it displayed
almost everything twice. Once to stdout and once to stderr.
This patch makes everything go to stdout in that case.

Fabian
-------------- next part --------------
diff -urN eggdrop1.3~/doc/UPDATES1.3 eggdrop1.3/doc/UPDATES1.3
--- eggdrop1.3~/doc/UPDATES1.3	Tue Oct  5 16:39:48 1999
+++ eggdrop1.3/doc/UPDATES1.3	Tue Oct  5 23:03:44 1999
@@ -4,6 +4,7 @@
 
 1.3.29
 Foundby   Fixedby   What....
+SuperS	  Fabian    if run with '-n', eggdrop now only prints every line once
 mc	  Fabian    distributed Makefile now only issues a warning instead of
 		    automatically starting to configure and compile
 Ben	  Fabian    eggdrop.conf.dist now talks positively about allow-resync
diff -urN eggdrop1.3~/src/misc.c eggdrop1.3/src/misc.c
--- eggdrop1.3~/src/misc.c	Tue Oct  5 11:26:44 1999
+++ eggdrop1.3/src/misc.c	Tue Oct  5 23:01:55 1999
@@ -513,15 +513,15 @@
       }
     }
   }
-  if ((!backgrd) && (!con_chan) && (!term_z))
-    printf("%s", out);
   for (i = 0; i < dcc_total; i++)
     if ((dcc[i].type == &DCC_CHAT) && (dcc[i].u.chat->con_flags & type)) {
       if ((chname[0] == '*') || (dcc[i].u.chat->con_chan[0] == '*') ||
 	  (!rfc_casecmp(chname, dcc[i].u.chat->con_chan)))
 	dprintf(i, "%s", out);
     }
-  if ((type & LOG_MISC) && use_stderr) {
+  if ((!backgrd) && (!con_chan) && (!term_z))
+    printf("%s", out);
+  else if ((type & LOG_MISC) && use_stderr) {
     if (shtime)
       out += 8;
     dprintf(DP_STDERR, "%s", s);


More information about the Patches mailing list