[eggheads-patches] PATCH: old-chat-behavior.diff

Tothwolf tothwolf at concentric.net
Tue Oct 19 14:39:31 CST 1999


old-chat-behavior.diff:
  Restores original behavior of the '.chat' command.

-Toth
-------------- next part --------------
Index: doc/UPDATES1.3
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/doc/UPDATES1.3,v
retrieving revision 1.185
diff -u -r1.185 UPDATES1.3
--- doc/UPDATES1.3	1999/10/18 19:59:50	1.185
+++ doc/UPDATES1.3	1999/10/19 06:03:45
@@ -112,8 +112,7 @@
 Ben	  Fabian    minor doc changes to eggdrop.conf.dist
           rtc       fixed .whois to properly display local channels in 
                     console records
-          rtc       .chat should only care about the first argument and
-                    tell the user's current channel if not given one
+          rtc       .chat should only care about the first argument given
           rtc       save console settings on '.page', '.chat', '.echo' and
                     '.strip', not on '.quit' and dcc disconnect.
           drummer   misc blowfish bug fixes
Index: src/cmds.c
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/src/cmds.c,v
retrieving revision 1.23
diff -u -r1.23 cmds.c
--- src/cmds.c	1999/10/17 20:27:29	1.23
+++ src/cmds.c	1999/10/19 06:03:56
@@ -1750,31 +1750,13 @@
   int newchan, oldchan;
   module_entry *me;
 
-  if (!par[0]) {
-    oldchan = dcc[idx].u.chat->channel;
-    switch (oldchan) {
-    case -1:
-      dprintf(idx, "You're currently not in chat mode\n");
-      break;
-    case 0:
-      dprintf(idx, "You're currently on the party line\n");
-      break;
-    default:
-      dprintf(idx, "You're currently on channel %s%d!\n",
-              (oldchan < 100000) ? "" : "*", oldchan % 100000);
-      break;
-    }
-    return;
-  }
-
   arg = newsplit(&par);
-
   if (!strcasecmp(arg, "off")) {
     /* turn chat off */
     if (dcc[idx].u.chat->channel < 0) {
       dprintf(idx, "You weren't in chat anyway!\n");
       return;
-    }  else {
+    } else {
       dprintf(idx, "Leaving chat mode...\n");
       check_tcl_chpt(botnetnick, dcc[idx].nick, dcc[idx].sock,
 		     dcc[idx].u.chat->channel);
@@ -1790,7 +1772,7 @@
     if (arg[0] == '*') {
       if (((arg[1] < '0') || (arg[1] > '9'))) {
 	if (arg[1] == 0)
- 	  newchan = 0;
+	  newchan = 0;
 	else {
 	  Tcl_SetVar(interp, "chan", arg, 0);
 	  if ((Tcl_VarEval(interp, "assoc ", "$chan", NULL) == TCL_OK) &&


More information about the Patches mailing list