[cvslog] (2003-05-12 23:32:50 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Mon May 12 17:32:51 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2003-05-12 23:32:50 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 modules/filesys/files.c modules/irc/cmdsirc.c
     modules/irc/mode.c scripts/autobotchk scripts/cmd_resolve.tcl
     scripts/getops.tcl src/cmds.c

Log message:

* Sync 1.6: key_locking, flushmode-key, bug315, has_flags-get_channel2,
            getops-timer, fixcodes-fix, (autobotchk stuff),
            (cmd_resolve stuff).

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/UPDATES1.6
diff -u eggdrop1.7/doc/UPDATES1.6:1.212 eggdrop1.7/doc/UPDATES1.6:1.213
--- eggdrop1.7/doc/UPDATES1.6:1.212	Mon Mar 10 21:53:37 2003
+++ eggdrop1.7/doc/UPDATES1.6	Mon May 12 18:32:39 2003
@@ -1,10 +1,38 @@
-$Id: UPDATES1.6,v 1.212 2003/03/11 03:53:37 wcc Exp $
+$Id: UPDATES1.6,v 1.213 2003/05/12 23:32:39 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
-1.6.14
+1.6.16
 Found by  Fixed by  What...
+Wanderer| Wcc       fixed output of tcl_duration to not return extra spaces
+paladinz  Wcc       don't compile inet_ntop compatability code unless USE_IPV6
+                    is defined
+KuNgFo0   Wcc       typedef socklen_t to int if non-existant
+various   TaKeDa    fixed an uninitialized variable in putlog()
+
+1.6.15 (04 May 2003)
+Found by  Fixed by  What...
+MORA      Wcc       fixed a patch.h compile error
+
+1.6.14 (04 May 2003)
+Found by  Fixed by  What...
+          poptix/   added support for the IPv6 protocol
+	  Wcc
+          guppy     fixed a couple of bugs in autobotchk and made the output
+	            cleaner
+          PPSlim    updated the logic of .fixcodes
+          KuNgFo0   added a missing cast in tcl_rand
+          PPSlim    fixed getops timer handling
+Paladin   Wcc       fixed access checking in -ban, -exempt, and -invite
+          TaKeDa    fixed a Tcl_Merge memleak
+          M. Koszik fixed a crash related to the cd command in filesys.mod
+          Eule      channel keys are now handled correctly in flush_mode()
+          Sven      locking a channel key/limit now enforces it from being
+                    changed as well as unset
+          Sven      don't bounce our own modes
+          Sven      q|q users can no longer obtain a channel voice, regardless
+                    of +autovoice
           Eule      users with appropriate flags can now halfop and voice
                     themselves
           Sven      -ban <number> now works for channel bans
@@ -23,7 +51,7 @@
           Sven      the WASHALFOP flag now works correctly
 fbs       Wcc       kill a transfer connection after sending a
                     TRANSFER_DCC_IGNORED notice to a user
-          ppslim    flood-pub should be flood-chan when using 'channel get'
+          PPSlim    flood-pub should be flood-chan when using 'channel get'
           BarkerJr  '~' and '&' are now correctly recognized as a meaning a
                     user has ops on a channel
           winkey    fixed uhost buffer length
@@ -189,7 +217,7 @@
 Found by  Fixed by  What...
 (^Baron^) Eule      protect(ops|friends) works with +bitch now
           guppy     reverted the handlen friendly patches
-MaSsKilla dw	    fixed a crash when trying to add an invalid chan using .+chan
+MaSsKilla dw        fixed a crash when trying to add an invalid chan using .+chan
 various   guppy     nick2hand didn't return "" on a nick that wasn't in the channel
 slennox   Wcc       fixed a few config file problems
 Paladin   Wcc       chattr's description in tcl-commands.doc was unclear relating to
@@ -218,7 +246,7 @@
                     friendly
           Amir      botlink() now safely copies the linker string
 various   Eule      fixed crashes relating to flushmodes
-Wanderer| dw	    tcl command modules missing in doc/tcl-commands.doc
+Wanderer| dw        tcl command modules missing in doc/tcl-commands.doc
           guppy     users with only +x can now only login via dcc chat, they cannot use
                     telnet
           Wcc       more documentation updates
@@ -260,8 +288,8 @@
           Wcc       fixed a couple of cosmetic problems in cmd_pls_user
           Wcc       do not eval init-server on rehash since this variable is used for
                     performing tcl commands on a succesful server connection
-MaSsKilla dw	    Couldn't introduce new users through telnet if a
-		      handle named "new" existed.
+MaSsKilla dw        Couldn't introduce new users through telnet if a
+                      handle named "new" existed.
 SiD3WiNDR Wcc       MISC_USERFCREATE1 should use origbotname instead of botnetnick
           Wcc       added a warning about allow-resync in the config file
           TaKeDa    prevent botnet flooding when adding ignores which already exist
@@ -383,7 +411,7 @@
           TaKeDa    fix 'setuser <hand> PASS' from crashing
 boro      bhab      stop_nethack_mode 4 oddity when a +a bot returns from a
                     split getting a -o+o (double negating mode)
-	  poptix    Testing some better socket code (++)++
+          poptix    Testing some better socket code (++)++
           Wcc       more typo fixing in the config files
           BarkerJr  more typo fixes
           Wcc       fixed several tons of spelling errors (really)
@@ -447,7 +475,7 @@
           Kirben    check whether cygwin requires -mwin32 to support
                     old versions of cygwin
           Kirben    check for bind in /usr/local/bind when using cygwin
-NeoN-	  dw	    a banreason wasn't used in some cases.
+NeoN-     dw        a banreason wasn't used in some cases.
 Noyga     Sup       Bot sent a useless TOPIC command to the server
                     when it joined a channel.
           SuperS    added QNX support
Index: eggdrop1.7/modules/filesys/files.c
diff -u eggdrop1.7/modules/filesys/files.c:1.12 eggdrop1.7/modules/filesys/files.c:1.13
--- eggdrop1.7/modules/filesys/files.c:1.12	Thu Mar  6 06:08:15 2003
+++ eggdrop1.7/modules/filesys/files.c	Mon May 12 18:32:40 2003
@@ -24,7 +24,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: files.c,v 1.12 2003/03/06 12:08:15 tothwolf Exp $";
+static const char rcsid[] = "$Id: files.c,v 1.13 2003/05/12 23:32:40 wcc Exp $";
 #endif
 */
 
@@ -304,9 +304,10 @@
       }
       free_fdbe(&fdbe);
       realloc_strcpy(s, *real);
-      if (s[0])
-	if (s[strlen(s) - 1] != '/')
-	  strcat(s, "/");
+      if (s[0] && s[strlen(s) - 1] != '/') {
+        s = nrealloc(s, strlen(s) + 2);
+        strcat(s, "/");
+      }
       work = malloc(strlen(s) + strlen(elem) + 1);
       sprintf(work, "%s%s", s, elem);
       realloc_strcpy(*real, work);
Index: eggdrop1.7/modules/irc/cmdsirc.c
diff -u eggdrop1.7/modules/irc/cmdsirc.c:1.18 eggdrop1.7/modules/irc/cmdsirc.c:1.19
--- eggdrop1.7/modules/irc/cmdsirc.c:1.18	Mon Mar 10 21:53:37 2003
+++ eggdrop1.7/modules/irc/cmdsirc.c	Mon May 12 18:32:40 2003
@@ -24,7 +24,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: cmdsirc.c,v 1.18 2003/03/11 03:53:37 wcc Exp $";
+static const char rcsid[] = "$Id: cmdsirc.c,v 1.19 2003/05/12 23:32:40 wcc Exp $";
 #endif
 */
 
@@ -273,12 +273,8 @@
     return;
   }
   get_user_flagrec(dcc[idx].user, &user, chan->dname);
-  if (!chan_op(user) && !glob_op(user)) {
-    dprintf(idx, _("You are not a channel op on %s.\n"), chan->dname);
-    return;
-  }
   m = ismember(chan, nick);
-  if (m) {
+  if (m && !chan_op(user)  && !glob_op(user)) {
     snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
     u2 = m->user ? m->user : get_user_by_host(s);
 
@@ -326,12 +322,8 @@
     return;
   }
   get_user_flagrec(dcc[idx].user, &user, chan->dname);
-  if (!chan_op(user) && !glob_op(user)) {
-    dprintf(idx, _("You are not a channel op on %s.\n"), chan->dname);
-    return;
-  }
   m = ismember(chan, nick);
-  if (m) {
+  if (m && !chan_op(user)  && !glob_op(user)) {
     snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
     u2 = m->user ? m->user : get_user_by_host(s);
 
Index: eggdrop1.7/modules/irc/mode.c
diff -u eggdrop1.7/modules/irc/mode.c:1.24 eggdrop1.7/modules/irc/mode.c:1.25
--- eggdrop1.7/modules/irc/mode.c:1.24	Thu Mar  6 06:08:15 2003
+++ eggdrop1.7/modules/irc/mode.c	Mon May 12 18:32:40 2003
@@ -25,7 +25,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: mode.c,v 1.24 2003/03/06 12:08:15 tothwolf Exp $";
+static const char rcsid[] = "$Id: mode.c,v 1.25 2003/05/12 23:32:40 wcc Exp $";
 #endif
 */
 
@@ -72,8 +72,7 @@
   chan->bytes = 0;
   chan->compat = 0;
 
-  /* +k or +l ? */
-  if (chan->key) {
+  if (chan->key && !chan->rmkey) {
     if (plus != 1) {
       *p++ = '+';
       plus = 1;
@@ -367,15 +366,20 @@
 static void got_key(struct chanset_t *chan, char *nick, char *from,
 		    char *key)
 {
-  if ((!nick[0]) && (bounce_modes))
+  if (!nick[0] && bounce_modes)
     reversing = 1;
-  if (((reversing) && !(chan->key_prot[0])) ||
-      ((chan->mode_mns_prot & CHANKEY) &&
-       !(glob_master(user) || glob_bot(user) || chan_master(user)))) {
-    if (strlen(key) != 0) {
-      add_mode(chan, '-', 'k', key);
-    } else {
-      add_mode(chan, '-', 'k', "");
+
+  if (!(glob_master(user) || glob_bot(user) || chan_master(user)) &&
+      !match_my_nick(nick)) {
+    if ((reversing && !chan->key_prot[0]) || (chan->mode_mns_prot & CHANKEY)) {
+      if (strlen(key) != 0)
+        add_mode(chan, '-', 'k', key);
+      else
+        add_mode(chan, '-', 'k', "");
+    }
+    if ((chan->mode_pls_prot & CHANKEY) && (chan->key_prot[0] != 0) &&
+        strcmp(key, chan->key_prot)) {
+      add_mode(chan, '+', 'k', chan->key_prot);
     }
   }
 }
@@ -424,7 +428,7 @@
   if (channel_pending(chan))
     return;
 
-  if (me_op(chan) && reversing && !match_my_nick(who))
+  if (me_op(chan) && reversing && !match_my_nick(who) && !match_my_nick(nick))
     add_mode(chan, '-', 'o', who);
   m->flags |= WASOP;
   if (check_chan)
@@ -733,10 +737,10 @@
       dprintf(DP_SERVER, "PART %s\n", ch);
     } else if (channel_active(chan) || channel_pending(chan)) {
       z = strlen(msg);
-      if (msg[--z] == ' ')	/* I hate cosmetic bugs :P -poptix */
-	msg[z] = 0;
+      if (msg[--z] == ' ')
+        msg[z] = 0;
       putlog(LOG_MODES, chan->dname, "%s: mode change '%s %s' by %s",
-	     ch, chg, msg, from);
+             ch, chg, msg, from);
       u = get_user_by_host(from);
       get_user_flagrec(u, &user, ch);
       strlcpy(buf, from, sizeof buf);
@@ -744,245 +748,245 @@
       uhost = strtok(NULL, "!");
       m = ismember(chan, nick);
       if (m)
-	m->last = now;
+        m->last = now;
       if (channel_active(chan) && m && me_op(chan)  && !(glob_friend(user) ||
           chan_friend(user) || (channel_dontkickops(chan) && (chan_op(user) ||
-          glob_op(user))))) {
-	if (chan_fakeop(m)) {
-	  putlog(LOG_MODES, ch, _("Mode change by fake op on %s!  Reversing..."), ch);
-	  dprintf(DP_MODE, "KICK %s %s :%s\n", ch, nick,
-		  _("Abusing ill-gained server ops"));
-	  m->flags |= SENTKICK;
-	  reversing = 1;
-	} else if (!chan_hasop(m) && !channel_nodesynch(chan)) {
-	  putlog(LOG_MODES, ch, _("Mode change by non-chanop on %s!  Reversing..."), ch);
-	  dprintf(DP_MODE, "KICK %s %s :%s\n", ch, nick,
-		  _("Abusing desync"));
-	  m->flags |= SENTKICK;
-	  reversing = 1;
-	}
+          glob_op(user)))) && !match_my_nick(from)) {
+        if (chan_fakeop(m)) {
+          putlog(LOG_MODES, ch, _("Mode change by fake op on %s!  Reversing..."), ch);
+          dprintf(DP_MODE, "KICK %s %s :%s\n", ch, nick,
+                  _("Abusing ill-gained server ops"));
+          m->flags |= SENTKICK;
+          reversing = 1;
+        } else if (!chan_hasop(m) && !channel_nodesynch(chan)) {
+          putlog(LOG_MODES, ch,
+                 _("Mode change by non-chanop on %s!  Reversing..."), ch);
+          dprintf(DP_MODE, "KICK %s %s :%s\n", ch, nick, _("Abusing desync"));
+          m->flags |= SENTKICK;
+          reversing = 1;
+        }
       }
       ms2[0] = '+';
       ms2[2] = 0;
       while ((ms2[1] = *chg)) {
-	int todo = 0;
+        int todo = 0;
 
-	switch (*chg) {
-	case '+':
-	  ms2[0] = '+';
-	  break;
-	case '-':
-	  ms2[0] = '-';
-	  break;
-	case 'i':
-	  todo = CHANINV;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'p':
-	  todo = CHANPRIV;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 's':
-	  todo = CHANSEC;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'm':
-	  todo = CHANMODER;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'c':
-	  todo = CHANNOCLR;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'R':
-	  todo = CHANREGON;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'M':
-	  todo = CHANMODREG;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 't':
-	  todo = CHANTOPIC;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'n':
-	  todo = CHANNOMSG;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'a':
-	  todo = CHANANON;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'q':
-	  todo = CHANQUIET;
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  break;
-	case 'l':
-	  if (!nick && bounce_modes)
-	    reversing = 1;
-	  if (ms2[0] == '-') {
-	    check_tcl_mode(nick, uhost, u, chan->dname, ms2, "");
-	    if (channel_active(chan)) {
-	      if ((reversing) && (chan->channel.maxmembers != 0)) {
-		simple_sprintf(s, "%d", chan->channel.maxmembers);
-		add_mode(chan, '+', 'l', s);
-	      } else if ((chan->limit_prot != 0) && !glob_master(user) &&
-			 !chan_master(user)) {
-		simple_sprintf(s, "%d", chan->limit_prot);
-		add_mode(chan, '+', 'l', s);
-	      }
-	    }
-	    chan->channel.maxmembers = 0;
-	  } else {
-	    op = newsplit(&msg);
-	    fixcolon(op);
-	    if (op == '\0')
-	      break;
-	    chan->channel.maxmembers = atoi(op);
-	    check_tcl_mode(nick, uhost, u, chan->dname, ms2,
-			   int_to_base10(chan->channel.maxmembers));
-	    if (channel_pending(chan))
-	      break;
-	    if (((reversing) &&
-		 !(chan->mode_pls_prot & CHANLIMIT)) ||
-		((chan->mode_mns_prot & CHANLIMIT) &&
-		 !glob_master(user) && !chan_master(user))) 
-	      add_mode(chan, '-', 'l', "");
-	    if ((chan->limit_prot != chan->channel.maxmembers) &&
-		(chan->mode_pls_prot & CHANLIMIT) &&
-		(chan->limit_prot != 0) &&	/* arthur2 */
-		!glob_master(user) && !chan_master(user)) {
-	      simple_sprintf(s, "%d", chan->limit_prot);
-	      add_mode(chan, '+', 'l', s);
-	    }
-	  }
-	  break;
-	case 'k':
- 	  if (ms2[0] == '+')
-	    chan->channel.mode |= CHANKEY;
-	  else
+        switch (*chg) {
+        case '+':
+          ms2[0] = '+';
+          break;
+        case '-':
+          ms2[0] = '-';
+          break;
+        case 'i':
+          todo = CHANINV;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'p':
+          todo = CHANPRIV;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 's':
+          todo = CHANSEC;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'm':
+          todo = CHANMODER;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'c':
+          todo = CHANNOCLR;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'R':
+          todo = CHANREGON;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'M':
+          todo = CHANMODREG;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 't':
+          todo = CHANTOPIC;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'n':
+          todo = CHANNOMSG;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'a':
+          todo = CHANANON;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'q':
+          todo = CHANQUIET;
+          if (!nick && bounce_modes)
+            reversing = 1;
+          break;
+        case 'l':
+          if (!nick && bounce_modes)
+            reversing = 1;
+          if (ms2[0] == '-') {
+            check_tcl_mode(nick, uhost, u, chan->dname, ms2, "");
+            if (channel_active(chan)) {
+              if (reversing && (chan->channel.maxmembers != 0)) {
+                simple_sprintf(s, "%d", chan->channel.maxmembers);
+                add_mode(chan, '+', 'l', s);
+              } else if ((chan->limit_prot != 0) && !glob_master(user) &&
+                         !chan_master(user) && !match_my_nick(nick)) {
+                simple_sprintf(s, "%d", chan->limit_prot);
+                add_mode(chan, '+', 'l', s);
+              }
+            }
+            chan->channel.maxmembers = 0;
+          } else {
+            op = newsplit(&msg);
+            fixcolon(op);
+            if (op == '\0')
+              break;
+            chan->channel.maxmembers = atoi(op);
+            check_tcl_mode(nick, uhost, u, chan->dname, ms2,
+                           int_to_base10(chan->channel.maxmembers));
+            if (channel_pending(chan))
+              break;
+            if ((reversing && !(chan->mode_pls_prot & CHANLIMIT)) ||
+                ((chan->mode_mns_prot & CHANLIMIT) && !glob_master(user) &&
+                !chan_master(user))) 
+              add_mode(chan, '-', 'l', "");
+            if ((chan->limit_prot != chan->channel.maxmembers) &&
+                (chan->mode_pls_prot & CHANLIMIT) && (chan->limit_prot != 0) &&
+                glob_master(user) && !chan_master(user)) {
+              simple_sprintf(s, "%d", chan->limit_prot);
+              add_mode(chan, '+', 'l', s);
+            }
+          }
+          break;
+        case 'k':
+          if (ms2[0] == '+')
+            chan->channel.mode |= CHANKEY;
+          else
             chan->channel.mode &= ~CHANKEY;
           op = newsplit(&msg);
-	  fixcolon(op);
-	  if (op == '\0') {
-	    break;
-	  }
-	  check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
-	  if (ms2[0] == '+') {
-	    set_key(chan, op);
-	    if (channel_active(chan))
-	      got_key(chan, nick, uhost, op);
-	  } else {
-	    if (channel_active(chan)) {
-	      if ((reversing) && (chan->channel.key[0]))
-		add_mode(chan, '+', 'k', chan->channel.key);
-	      else if ((chan->key_prot[0]) && !glob_master(user)
-		       && !chan_master(user))
-		add_mode(chan, '+', 'k', chan->key_prot);
-	    }
-	    set_key(chan, NULL);
-	  }
-	  break;
-	case 'o':
-	  op = newsplit(&msg);
-	  fixcolon(op);
-	  if (ms2[0] == '+')
-	    got_op(chan, nick, uhost, op, u, &user);
-	  else
-	    got_deop(chan, nick, uhost, op, u);
-	  break;
-	case 'v':
-	  op = newsplit(&msg);
-	  fixcolon(op);
-	  m = ismember(chan, op);
-	  if (!m) {
-	    if (channel_pending(chan))
-	      break;
-	    putlog(LOG_MISC, chan->dname,
-		   _("* Mode change on %s for nonexistant %s!"), chan->dname, op);
-	    dprintf(DP_MODE, "WHO %s\n", op);
-	  } else {
-	    simple_sprintf(s, "%s!%s", m->nick, m->userhost);
-	    get_user_flagrec(m->user ? m->user : get_user_by_host(s),
-			     &victim, chan->dname);
-	    if (ms2[0] == '+') {
-	      m->flags &= ~SENTVOICE;
-	      m->flags |= CHANVOICE;
-	      check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
-	    } else {
-	      m->flags &= ~SENTDEVOICE;
-	      m->flags &= ~CHANVOICE;
-	      check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
-	      if (channel_active(chan) &&
-		  !glob_master(user) && !chan_master(user)) {
-		if ((channel_autovoice(chan) && (chan_voice(victim) ||
+          fixcolon(op);
+          if (op == '\0') {
+            break;
+          }
+          check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
+          if (ms2[0] == '+') {
+            set_key(chan, op);
+            if (channel_active(chan))
+              got_key(chan, nick, uhost, op);
+          } else {
+            if (channel_active(chan)) {
+              if (reversing && chan->channel.key[0])
+                add_mode(chan, '+', 'k', chan->channel.key);
+              else if (chan->key_prot[0] && !glob_master(user) &&
+                       !chan_master(user))
+                add_mode(chan, '+', 'k', chan->key_prot);
+            }
+            set_key(chan, NULL);
+          }
+          break;
+        case 'o':
+          op = newsplit(&msg);
+          fixcolon(op);
+          if (ms2[0] == '+')
+            got_op(chan, nick, uhost, op, u, &user);
+          else
+            got_deop(chan, nick, uhost, op, u);
+          break;
+        case 'v':
+          op = newsplit(&msg);
+          fixcolon(op);
+          m = ismember(chan, op);
+          if (!m) {
+            if (channel_pending(chan))
+              break;
+            putlog(LOG_MISC, chan->dname,
+                   _("* Mode change on %s for nonexistant %s!"), chan->dname,
+                   op);
+            dprintf(DP_MODE, "WHO %s\n", op);
+          } else {
+            simple_sprintf(s, "%s!%s", m->nick, m->userhost);
+            get_user_flagrec(m->user ? m->user : get_user_by_host(s),
+                             &victim, chan->dname);
+            if (ms2[0] == '+') {
+              m->flags &= ~SENTVOICE;
+              m->flags |= CHANVOICE;
+              check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
+            } else {
+              m->flags &= ~SENTDEVOICE;
+              m->flags &= ~CHANVOICE;
+              check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
+              if (channel_active(chan) &&
+                  !glob_master(user) && !chan_master(user)) {
+                if ((channel_autovoice(chan) && (chan_voice(victim) ||
                     glob_voice(victim))) || glob_gvoice(victim) ||
                     chan_gvoice(victim)) {
-		  add_mode(chan, '+', 'v', op);
-		} else if (reversing)
-		  add_mode(chan, '+', 'v', op);
-	      }
-	    }
-	  }
-	  break;
-	case 'b':
-	  op = newsplit(&msg);
-	  fixcolon(op);
-	  check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
-	  if (ms2[0] == '+')
-	    got_ban(chan, nick, uhost, op);
-	  else
-	    got_unban(chan, nick, uhost, op, u);
-	  break;
-	case 'e':
-	  op = newsplit(&msg);
-	  fixcolon(op);
-	  check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
-	  if (ms2[0] == '+')
-	    got_exempt(chan, nick, uhost, op);
-	  else
-	    got_unexempt(chan, nick, uhost, op, u);
-	  break;
-	case 'I':
-	  op = newsplit(&msg);
-	  fixcolon(op);
-	  check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
-	  if (ms2[0] == '+')
-	    got_invite(chan, nick, uhost, op);
-	  else
-	    got_uninvite(chan, nick, uhost, op, u);
-	  break;
-	}
-	if (todo) {
-	  check_tcl_mode(nick, uhost, u, chan->dname, ms2, "");
-	  if (ms2[0] == '+')
-	    chan->channel.mode |= todo;
-	  else
-	    chan->channel.mode &= ~todo;
-	  if (channel_active(chan)) {
-	    if ((((ms2[0] == '+') && (chan->mode_mns_prot & todo)) ||
-		 ((ms2[0] == '-') && (chan->mode_pls_prot & todo))) &&
-		!glob_master(user) && !chan_master(user))
-	      add_mode(chan, ms2[0] == '+' ? '-' : '+', *chg, "");
-	    else if (reversing &&
-		     ((ms2[0] == '+') || (chan->mode_pls_prot & todo)) &&
-		     ((ms2[0] == '-') || (chan->mode_mns_prot & todo)))
-	      add_mode(chan, ms2[0] == '+' ? '-' : '+', *chg, "");
-	  }
-	}
-	chg++;
+                  add_mode(chan, '+', 'v', op);
+                } else if (reversing)
+                  add_mode(chan, '+', 'v', op);
+              }
+            }
+          }
+          break;
+        case 'b':
+          op = newsplit(&msg);
+          fixcolon(op);
+          check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
+          if (ms2[0] == '+')
+            got_ban(chan, nick, uhost, op);
+          else
+            got_unban(chan, nick, uhost, op, u);
+          break;
+        case 'e':
+          op = newsplit(&msg);
+          fixcolon(op);
+          check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
+          if (ms2[0] == '+')
+            got_exempt(chan, nick, uhost, op);
+          else
+            got_unexempt(chan, nick, uhost, op, u);
+          break;
+        case 'I':
+          op = newsplit(&msg);
+          fixcolon(op);
+          check_tcl_mode(nick, uhost, u, chan->dname, ms2, op);
+          if (ms2[0] == '+')
+            got_invite(chan, nick, uhost, op);
+          else
+            got_uninvite(chan, nick, uhost, op, u);
+          break;
+        }
+        if (todo) {
+          check_tcl_mode(nick, uhost, u, chan->dname, ms2, "");
+          if (ms2[0] == '+')
+            chan->channel.mode |= todo;
+          else
+            chan->channel.mode &= ~todo;
+          if (channel_active(chan)) {
+            if ((((ms2[0] == '+') && (chan->mode_mns_prot & todo)) ||
+                ((ms2[0] == '-') && (chan->mode_pls_prot & todo))) &&
+                !glob_master(user) && !chan_master(user) &&
+                !match_my_nick(nick))
+              add_mode(chan, ms2[0] == '+' ? '-' : '+', *chg, "");
+            else if (reversing &&
+                     ((ms2[0] == '+') || (chan->mode_pls_prot & todo)) &&
+                     ((ms2[0] == '-') || (chan->mode_mns_prot & todo)))
+              add_mode(chan, ms2[0] == '+' ? '-' : '+', *chg, "");
+          }
+        }
+        chg++;
       }
       if (!me_op(chan) && !nick)
         chan->status |= CHAN_ASKEDMODES;
Index: eggdrop1.7/scripts/autobotchk
diff -u eggdrop1.7/scripts/autobotchk:1.7 eggdrop1.7/scripts/autobotchk:1.8
--- eggdrop1.7/scripts/autobotchk:1.7	Thu Feb  7 16:19:04 2002
+++ eggdrop1.7/scripts/autobotchk	Mon May 12 18:32:40 2003
@@ -29,168 +29,203 @@
 done; \
 exec tclsh$lastver "$0" "$@"
 #
-# AutoBotchk, (C)2001, 2002 Jeff Fisher (guppy at eggheads.org)
+# AutoBotchk - An eggdrop utility to autogenerate botchk/crontab entries
 #
-# updates
-# -------
-#  03Feb99: wrote the first version and it worked
-#  04Feb99: made it easier to use, how? ./autobotchk
-#           <config> will create the botchk and crontab
-#           automatically, no command line options now.
-#  20Feb99: added a '-noemail' setting for [s]
-#  21Feb99: added '-5' '-10' '-15' '-30' to allow people to
-#           use a diff time value then 10 minutes.
-#  10May99: to be compatible, don't use */XX's, etc (Ernst)
-#  23Oct99: updated the internal botchk to reflect Tothwolf's
-#           changes in the eggdrop copy.
-#  13Apr01: borrowed code from Tothwolf's Wolfpack to find tclsh
-#           better
-#  27Sep01: added new pidfile setting
-#
-# $Id: autobotchk,v 1.7 2002/02/07 22:19:04 wcc Exp $
+# Copyright (C) 1999, 2000, 2001, 2002 Jeff Fisher (guppy at eggheads.org)
 #
-# how to use
+# How to use
 # ----------
-#  well, first you need to put the program into your Eggdrop
-#  directory (the one you run from hopefully). then you should
-#  probably type 'chmod u+x autobotchk' so the file permissions
-#  are set correctly. and finally, type './autobotchk <config>'
-#  replacing <config> with the name of your config file right?
-#
-#  in 1.05z, because of [z], you can now specify the bot directory
-#  to use, for example, './autobotchk eggdrop.conf -dir /home/bot'
-#  this now allows you to run the program from any dir :P~
+#
+#   Most people begin to use AutoBotchk by moving it from the script
+# directory to their Eggdrop directory -- this will save you from having to
+# use the -dir option.
+#
+#   If you run AutoBotchk without any arguments, it will present you with
+# a list of valid ones. Most people run AutoBotchk by doing:
+#
+#     ./autobotchk <config file>
+#
+#   This will setup crontab to check every 10 minutes to see whether or not
+# your bot needs to be restarted and it will e-mail if a restart was
+# performed. A lot of people turn off crontab e-mail support; however, I do
+# not recommend this since you will be unable to see any errors that might
+# happen.
+#
+# Updates
+# -------
+#   27Sep2001: added new pidfile setting
+#   14Nov2001: removed old autobotchk update entries and updated the help
+#              section a little bit. also made autobotchk move down one
+#              directory if being run from the scripts directory.
+#   15Apr2003: cleaned up a few things, fixed a few bugs, and made a little
+#              love! j/k
+#
+# $Id: autobotchk,v 1.8 2003/05/12 23:32:40 wcc Exp $
 #
 
 if {$argc == 0} {
- puts "\nusage: $argv0 <eggdrop config> \[options\]"
- puts " -dir     (bot directory to use instead of \[pwd\])"
- puts " -noemail (will make crontab not mail you)"
- puts " -5       (5 minute checks)"
- puts " -10      (10 minute checks)"
- puts " -15      (15 minute checks)"
- puts " -30      (30 minute checks)\n\n"
- exit
-} {
- puts "\nAutoBotchk 1.09, (C)2001, 2002 Jeff Fisher (guppy at eggheads.org)"
- puts "----------------------------------------------------------"
+  puts "\nusage: $argv0 <eggdrop config> \[options\]"
+  puts " -dir     (directory to run autobotchk in)"
+  puts " -noemail (discard crontab e-mails)"
+  puts " -5       (5 minute checks)"
+  puts " -10      (10 minute checks)"
+  puts " -15      (15 minute checks)"
+  puts " -30      (30 minute checks)"
+  puts ""
+  exit
+}
+
+fconfigure stdout -buffering none
+
+proc newsplit {text {split " "}} {
+  upvar $text ours
+  append ours $split
+  set index [string first $split $ours]
+  if {$index == -1} {
+    set ours ""
+    return ""
+  }
+  set tmp [string trim [string range $ours 0 $index]]
+  set ours [string trim [string range $ours [expr $index + [string length $split]] end]]
+  return $tmp
+}
+
+puts "\nautobotchk 1.10, (C) 2003 Jeff Fisher (guppy at eggheads.org)"
+puts "------------------------------------------------------------\n"
+
+set config [newsplit argv]
+set dir [pwd]
+set delay 10
+set email 1
 
- set x [join [lindex [split $argv] 0]]
- set q [lrange $argv 1 end]
- set dir [pwd]
- set delay 10
- set email 1
- for {set z 0} {$z < [llength $q]} {incr z} {
-  set opt [join [lindex $q $z]]
+# If you renamed your eggdrop binary, you should change this variable
+set binary "eggdrop"
+
+while {[set opt [newsplit argv]] != ""} {
   switch -- $opt {
-   -time -
-   -1 {set delay 1}
-   -5 {set delay 5}
-   -10 {set delay 10}
-   -15 {set delay 15}
-   -20 {set delay 20}
-   -30 {set delay 30}
-   -nomail -
-   -noemail {set email 0}
-   -dir {
-    set dir [string trimright [join [lindex $q [expr $z + 1]]] /]
-    if {[string match -* $dir]} {
-     puts " *** ERROR: you did not supply a directory name\n\n"
-     exit
-    }
-    if {![file isdirectory $dir]} {
-     puts " *** ERROR: the directory you supplied is not a directory\n\n"
-     exit
+   "-time" -
+   "-1" { set delay 1 }
+   "-5" { set delay 5 }
+   "-10" { set delay 10 } 
+   "-15" { set delay 15 }
+   "-20" { set delay 20 }
+   "-30" { set delay 30 }
+   "-nomail" -
+   "-noemail" {set email 0}
+   "-dir" {
+      set dir [newsplit argv]
+      if {[string match -* $dir]} {
+        puts "*** ERROR: you did not supply a directory name"
+        puts ""
+        exit
+      }
+      if {![file isdirectory $dir]} {
+        puts "*** ERROR: the directory you supplied is not a directory"
+        puts ""
+        exit
+      }
     }
-    incr z
-   }
   }
- }
- switch -- $delay {
-  30 { set minutes "0,30" }
-  15 { set minutes "0,15,30,45" }
-   5 { set minutes "0,5,10,15,20,25,30,35,40,45,50,55" }
-   1 { set minutes "*" }
+}
+
+switch -- $delay {
+  "30" { set minutes "0,30" }
+  "20" { set minutes "0,20,40" }
+  "15" { set minutes "0,15,30,45" }
+  "5" { set minutes "0,5,10,15,20,25,30,35,40,45,50,55" }
+  "1" { set minutes "*" }
   default { set minutes "0,10,20,30,40,50" }
- }
- if {![file exists $dir/$x]} {
-  puts " *** ERROR: you supplied a non-existant filename\n\n"
-  exit
- } elseif {![file isfile $dir/$x]} {
-  puts " *** ERROR: unknown filetype, config files should be text files\n\n"
-  exit
- } elseif {![file readable $dir/$x]} {
-  puts " *** ERROR: unable to open the file, permission denied\n\n"
+}
+
+if {[string match "*/scripts" $dir]} {
+  set dir [string range $dir 0 [expr [string length $dir] - 8]]
+}
+
+set dir [string trimright $dir /]
+
+if {![file exists $dir/help] || ![file isdirectory $dir/help]} {
+  puts "*** ERROR: are you sure you are running from a bot directory?"
+  puts ""
   exit
- } elseif {![file exists $dir/help] || ![file isdirectory $dir/help]} {
-  puts " *** ERROR: are you sure you are running from a bot directory?\n\n"
+} elseif {![file exists $dir/$binary]} {
+  puts "*** ERROR: are you sure you are running from a bot directory?"
+  puts ""
   exit
- } elseif {![file exists $dir/eggdrop]} {
-  puts " *** ERROR: are you sure you are running from a bot directory?\n\n"
+}
+
+puts -nonewline "Opening '$config' for processing ... "
+
+if {[catch {open $dir/$config r} fd]} {
+  puts "error:"
+  puts "  $fd\n"
   exit
- }
- puts " *** Attempting to process '$x', be patient ..."
+} else {
+  puts "done"
+}
+
+set count 0
+puts -nonewline "Scanning the config file "
 
- set f [open $dir/$x r]
- while {![eof $f]} {
-  set z [split [gets $f]]
-  if {[join [lindex $z 0]] != "set"} {continue}
-  switch -- [join [lindex $z 1]] {
-   pidfile -
-   nick -
-   userfile -
-   botnet-nick {
-    set [join [lindex $z 1]] [join [lindex $z 2]]
-    puts "     !! scanned: [join $z]"
-   }
+while {![eof $fd]} {
+  incr count
+  if {$count == 100} {
+    puts -nonewline "."
+    set count 0
   }
- }
- close $f
+  set line [gets $fd]
+  if {[set blarg [newsplit line]] != "set"} {
+    continue
+  }
+  switch -- [set opt [newsplit line]] {
+    "pidfile" -
+    "nick" -
+    "userfile" -
+    "botnet-nick" {
+      set $opt [string trim [newsplit line] " \""]
+    }
+  }
+}
+close $fd
+
+if {$count != 0} {
+  puts -nonewline "."
+}
+
+puts " done"
+
  if {![info exists {botnet-nick}] && [info exists nick]} {
-  puts "         !! setting \$botnet-nick to $nick"
+  puts "  Defaulting \$botnet-nick to \"$nick\""
   set botnet-nick $nick
  }
  if {![info exists pidfile]} {
-  puts "         !! setting \$pidfile to pid.${botnet-nick}"
+  puts "  Defaulting \$pidfile to \"pid.${botnet-nick}\""
   set pidfile "pid.${botnet-nick}"
  }
  if {![info exists {botnet-nick}] || ![info exists userfile]} {
-  puts " *** ERROR: could not find either \$userfile or \$botnet-nick"
-  puts "      !! you sure its a valid Eggdrop config file?\n\n"
+  puts "  *** ERROR: could not find either \$userfile or \$botnet-nick"
+  puts ""
+  puts "  Are you sure this is a valid eggdrop config file?"
+  puts ""
   exit
  }
  if {[catch {open $dir/${botnet-nick}.botchk w} fd]} {
-  puts " *** ERROR: unable to open '${botnet-nick}.botchk' for writing"
-  puts "      !! without this, this program is useless\n\n"
+  puts "  *** ERROR: unable to open '${botnet-nick}.botchk' for writing"
+  puts ""
   exit
  }
- puts $fd "
-#! /bin/sh
-#
-# botchk
+ puts $fd "#! /bin/sh
 #
-# Created on: [clock format [clock seconds] -format "%B %d, %Y @ %I:%M%p"]
-# Created by: AutoBotchk 1.09 (C)2001, 2002 Jeff Fisher
+# ${botnet-nick}.botchk (generated on [clock format [clock seconds] -format "%B %d, %Y @ %I:%M%p"])
 #
-# This is a script suitable for use in a crontab.  It checks to make sure
-# your bot is running.  YOU NEED A SEPARATE CRON JOB FOR EACH BOT.  If your
-# bot isn't found, it'll try to start it back up.
-#
-# You'll need to edit this script for your bot.
-#
-# To check for your bot every 10 minutes, put the following line in your
-# crontab:
-#    0,10,20,30,40,50 * * * *   /home/mydir/botchk
-# And if you don't want to get email from crontab when it checks you bot,
-# put the following in your crontab:
-#    0,10,20,30,40,50 * * * *   /home/mydir/botchk >/dev/null 2>&1
+# Generated by AutoBotchk 1.10
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Jeff Fisher <guppy at eggheads.org>
 #
 
 # change this to the directory you run your bot from:
 botdir=\"$dir\"
 
 # change this to the name of your bot's script in that directory:
-botscript=\"eggdrop $x\"
+botscript=\"$binary $config\"
 
 # change this to the nickname of your bot (capitalization COUNTS)
 botname=\"${botnet-nick}\"
@@ -271,52 +306,65 @@
 exit 0
  "
  close $fd
- puts " *** Wrote '${botnet-nick}.botchk' successfully ([file size $dir/${botnet-nick}.botchk] bytes)"
+ puts "Wrote '${botnet-nick}.botchk' successfully ([file size $dir/${botnet-nick}.botchk] bytes)"
  if {[catch {exec chmod u+x $dir/${botnet-nick}.botchk} 0]} {
-  puts "      *** ERROR: unable to 'chmod u+x' the output file\n\n"
+  puts "  *** ERROR: unable to 'chmod u+x' the output file"
+  puts ""
   exit
  }
- puts "      !! chmod u+x completed"
- puts " *** Crontab mode?? Heaven forbid I automated this ..."
- set tmp "[pwd]/.autobotchk"
- if {$delay != "10"} {puts "      *** Using a time delay of $delay minutes."}
- if {$email} {
+ puts -nonewline "Scanning crontab entries ... "
+ 
+set tmp ".autobotchk[clock clicks].[pid]"
+if {$email} {
   set line "$minutes \* \* \* \* $dir/${botnet-nick}.botchk"
- } {
+} {
   set line "$minutes \* \* \* \* $dir/${botnet-nick}.botchk >\/dev\/null 2>&1"
-  puts "      *** Making crontab line to NOT send e-mail."
- }
- if {[catch {exec crontab -l > $tmp} error ]} {
+}
+
+if {[catch {exec crontab -l > $tmp} error ]} {
   if {![string match "*no*cron*" [string tolower $error]] &&
       ![string match "*can't open*" [string tolower $error]]} {
-   catch {exec rm -rf $tmp} 0
-   puts "      *** ERROR: unable to get crontab listing"
-   puts "           *** MSG: $error\n\n"
-   exit
+    catch {file delete -force $tmp} 0
+    puts "error: unable to get crontab listing"
+    puts ""
+    puts $error
+    puts ""
+    exit
   }
- }
- set fd [open $tmp r]
- while {![eof $fd]} {
-  set z [split [gets $fd]]
-  if {[string match "*$dir/${botnet-nick}.botch*" $z]} {
-   puts "      !! ${botnet-nick}.botchk is already crontab'd, but why?\n\n"
-   exit
+}
+
+set fd [open $tmp r]
+while {![eof $fd]} {
+  set z [gets $fd]
+  if {[string match "*$dir/${botnet-nick}.botchk*" $z] ||
+      [string match "*$dir//${botnet-nick}.botchk*" $z]} {
+    puts "found an existing entry, we're done now"
+    puts ""
+    exit
   }
- }
- close $fd
- set fd [open $tmp a]
- puts $fd $line
- puts "      !! adding new crontab line to existing crontab"
- close $fd
- if {[catch {exec crontab $tmp} error]} {
-  puts "      *** ERROR: unable to do 'crontab $tmp'"
-  puts "           *** MSG: $error\n\n"
+}
+
+close $fd
+
+puts "done"
+
+puts -nonewline "Adding the new crontab entry ... "
+set fd [open $tmp a]
+puts $fd $line
+close $fd
+
+if {[catch {exec crontab $tmp} error]} {
+  puts "error: unable to do 'crontab $tmp'"
+  puts ""
+  puts $error
+  puts ""
   exit
- }
- catch {exec rm -rf $tmp} 0
- puts "      !! crontab reloaded"
- puts ""
- puts "      !! Use 'crontab -r' to remove all your crontab entries"
- puts "      !!     'crontab -l' to view the current crontabs\n\n"
- exit
+} else {
+  catch {file delete -force $tmp} 0
 }
+
+puts "done"
+puts ""
+puts "Use 'crontab -l' to view all your current crontab entries"
+puts "    'crontab -r' to remove all your crontab entries"
+puts ""
Index: eggdrop1.7/scripts/cmd_resolve.tcl
diff -u eggdrop1.7/scripts/cmd_resolve.tcl:1.1 eggdrop1.7/scripts/cmd_resolve.tcl:1.2
--- eggdrop1.7/scripts/cmd_resolve.tcl:1.1	Sun Nov  5 15:36:47 2000
+++ eggdrop1.7/scripts/cmd_resolve.tcl	Mon May 12 18:32:40 2003
@@ -2,47 +2,47 @@
 # cmd_resolve.tcl
 #  written by Jeff Fisher (guppy at eggheads.org)
 #
-# This script adds the command '.resolve' which can be used to lookup hostnames
-# or ip addresses in the partyline without causing the bot to block while doing
-# so thanks to the dns module.
+# This script adds the commands '.resolve' and '.dns' which can be used to
+# lookup hostnames or ip addresses in the partyline without causing the bot
+# to block while doing so thanks to the dns module.
 #
 # updates
 # -------
+#  15Apr2003: fixed a logging bug and stop using regexp incorrectly
 #  05Nov2000: fixed a nasty security hole, .resolve [die] <grin>
 #  04Nov2000: first version
 #
-# $Id: cmd_resolve.tcl,v 1.1 2000/11/05 21:36:47 fabian Exp $
+# $Id: cmd_resolve.tcl,v 1.2 2003/05/12 23:32:40 wcc Exp $
 
 bind dcc -|- resolve resolve_cmd
 bind dcc -|- dns resolve_cmd
 
 proc resolve_cmd {hand idx arg} {
+  global lastbind
   if {[scan $arg "%s" hostip] != 1} {
-    global lastbind
     putidx $idx "Usage: $lastbind <host or ip>"
   } else {
     putidx $idx "Looking up $hostip ..."
     set hostip [split $hostip]
-    dnslookup $hostip resolve_callback $idx $hostip
+    dnslookup $hostip resolve_callback $idx $hostip $lastbind
   }
   return 0
 }
 
-proc resolve_callback {ip host status idx hostip} {
+proc resolve_callback {ip host status idx hostip cmd} {
   if {![valididx $idx]} {
     return 0
   } elseif {!$status} {
     putidx $idx "Unable to resolve $hostip"
-  } elseif {[regexp -nocase -- $ip $hostip]} {
+  } elseif {[string tolower $ip] == [string tolower $hostip]} {
     putidx $idx "Resolved $ip to $host"
   } else {
     putidx $idx "Resolved $host to $ip"
   }
-  putcmdlog "#[idx2hand $idx]# resolve $hostip"
+  putcmdlog "#[idx2hand $idx]# $cmd $hostip"
   return 0
 }
 
 loadhelp cmd_resolve.help
 
-putlog " * Loaded [file tail [info script]] successfully."
-
+putlog "Loaded cmd_resolve.tcl successfully."
Index: eggdrop1.7/scripts/getops.tcl
diff -u eggdrop1.7/scripts/getops.tcl:1.13 eggdrop1.7/scripts/getops.tcl:1.14
--- eggdrop1.7/scripts/getops.tcl:1.13	Sat Aug 11 02:29:26 2001
+++ eggdrop1.7/scripts/getops.tcl	Mon May 12 18:32:40 2003
@@ -1,7 +1,7 @@
 
 # Getops 2.3b
 
-# $Id: getops.tcl,v 1.13 2001/08/11 07:29:26 guppy Exp $
+# $Id: getops.tcl,v 1.14 2003/05/12 23:32:40 wcc Exp $
 
 # This script is used for bots to request and give ops to each other.
 # For this to work, you'll need:
@@ -22,6 +22,10 @@
 
 # -----------------------------------------------------------------------------
 
+# 2.3c by PPSlim <ppslim at ntlworld.com>
+#  - Small fix on timer hanlding.
+#    Not list formatted, allowing command parsing of channel name
+
 # 2.3b by gregul <unknown>
 #  - small fix in getbot
 
@@ -91,7 +95,7 @@
 
 # Previously by The_O, dtM.
 
-# Originial incarnation by poptix (poptix at poptix.net)
+# Original incarnation by poptix (poptix at poptix.net)
 
 # -----------------------------------------------------------------------------
 
@@ -357,11 +361,11 @@
 
 proc gop_join { nick uhost hand chan } {
  if {[isbotnick $nick]} {
- utimer 3 "requestop $chan"
+ utimer 3 [list requestop $chan]
  }
  return 0
 }
 
 set getops_loaded 1
 
-putlog "GetOps v2.3a loaded."
+putlog "GetOps v2.3c loaded."
Index: eggdrop1.7/src/cmds.c
diff -u eggdrop1.7/src/cmds.c:1.117 eggdrop1.7/src/cmds.c:1.118
--- eggdrop1.7/src/cmds.c:1.117	Thu Mar  6 06:08:15 2003
+++ eggdrop1.7/src/cmds.c	Mon May 12 18:32:40 2003
@@ -24,7 +24,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: cmds.c,v 1.117 2003/03/06 12:08:15 tothwolf Exp $";
+static const char rcsid[] = "$Id: cmds.c,v 1.118 2003/05/12 23:32:40 wcc Exp $";
 #endif
 
 #include "main.h"
@@ -1429,19 +1429,16 @@
 
 static int cmd_fixcodes(user_t *u, int idx, char *par)
 {
-  if (dcc[idx].status & STAT_ECHO) {
-    dcc[idx].status |= STAT_TELNET;
-    dcc[idx].status &= ~STAT_ECHO;
-    dprintf(idx, _("Turned on telnet codes\n"));
-    putlog(LOG_CMDS, "*", "#%s# fixcodes (telnet on)", dcc[idx].nick);
-    return(0);
-  }
   if (dcc[idx].status & STAT_TELNET) {
     dcc[idx].status |= STAT_ECHO;
     dcc[idx].status &= ~STAT_TELNET;
-    dprintf(idx, _("Turned off telnet codes\n"));
+    dprintf(idx, _("Turned off telnet codes.\n"));
     putlog(LOG_CMDS, "*", "#%s# fixcodes (telnet off)", dcc[idx].nick);
-    return(0);
+  } else {
+    dcc[idx].status |= STAT_TELNET;
+    dcc[idx].status &= ~STAT_ECHO;
+    dprintf(idx, _("Turned on telnet codes.\n)");
+    putlog(LOG_CMDS, "*", "#%s# fixcodes (telnet on)", dcc[idx].nick);
   }
   return(1);
 }
----------------------- End of diff -----------------------


More information about the Changes mailing list