[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Tue Dec 18 10:42:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-12-18 16:41:08 UTC
Commited by: Jeff Fisher <guppy at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/patch.h src/mod/irc.mod/tclirc.c

Log message:

sped up hand2nick a ton (people using it alot on big userlists should notice the difference greatly)

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.250 eggdrop1.6/doc/UPDATES1.6:1.251
--- eggdrop1.6/doc/UPDATES1.6:1.250	Sun Dec 16 08:55:59 2001
+++ eggdrop1.6/doc/UPDATES1.6	Tue Dec 18 10:40:57 2001
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.250 2001/12/16 14:55:59 guppy Exp $
+$Id: UPDATES1.6,v 1.251 2001/12/18 16:40:57 guppy Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.8
 Found by  Fixed by  What...
+|^Raven^| guppy     made tcl_hand2nick _a lot_ faster
           Eule      more membercheck fixes for nick bans, nick +k users, -user, and
                     -host.
           BarkerJr  only show fake alerts once every 10 seconds to prevent flooding
Index: eggdrop1.6/src/mod/irc.mod/tclirc.c
diff -u eggdrop1.6/src/mod/irc.mod/tclirc.c:1.24 eggdrop1.6/src/mod/irc.mod/tclirc.c:1.25
--- eggdrop1.6/src/mod/irc.mod/tclirc.c:1.24	Sun Oct  7 09:09:12 2001
+++ eggdrop1.6/src/mod/irc.mod/tclirc.c	Tue Dec 18 10:40:58 2001
@@ -1,7 +1,7 @@
 /*
  * tclirc.c -- part of irc.mod
  *
- * $Id: tclirc.c,v 1.24 2001/10/07 14:09:12 poptix Exp $
+ * $Id: tclirc.c,v 1.25 2001/12/18 16:40:58 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -600,10 +600,10 @@
 static int tcl_hand2nick STDVAR
 {
   memberlist *m;
-  char s[161];
-  struct chanset_t *chan;
-  struct chanset_t *thechan = NULL;
+  char nuh[161];
+  struct chanset_t *chan, *thechan = NULL;
   struct userrec *u;
+  struct list_type *orig, *q;
 
   BADARGS(2, 3, " handle ?channel?");	/* drummer */
   if (argc > 2) {
@@ -613,21 +613,29 @@
       Tcl_AppendResult(irp, "invalid channel: ", argv[2], NULL);
       return TCL_ERROR;
     }
-  } else {
+  } else
     chan = chanset;
-  }
-  while ((chan != NULL) && ((thechan == NULL) || (thechan == chan))) {
+
+  u = get_user_by_handle(userlist, argv[1]);
+
+  if (!u)
+    return TCL_OK;
+
+  orig = get_user(&USERENTRY_HOSTS, u);
+
+  while (chan && (thechan == NULL || thechan == chan)) {
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
-      simple_sprintf(s, "%s!%s", m->nick, m->userhost);
-      u = get_user_by_host(s);
-      if (u && !egg_strcasecmp(u->handle, argv[1])) {
-	Tcl_AppendResult(irp, m->nick, NULL);
-	return TCL_OK;
+      simple_sprintf(nuh, "%s!%s", m->nick, m->userhost);
+      for (q = orig; q; q = q->next) {
+	if (wild_match(q->extra, nuh)) {
+	  Tcl_AppendResult(irp, m->nick, NULL);
+	  return TCL_OK;
+	}
       }
     }
     chan = chan->next;
   }
-  return TCL_OK;		/* blank */
+  return TCL_OK;
 }
 
 static int tcl_nick2hand STDVAR
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.627 eggdrop1.6/src/patch.h:1.628
--- eggdrop1.6/src/patch.h:1.627	Sun Dec 16 09:07:07 2001
+++ eggdrop1.6/src/patch.h	Tue Dec 18 10:40:57 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.627 2001/12/16 15:07:07 guppy Exp $
+ * $Id: patch.h,v 1.628 2001/12/18 16:40:57 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1008515164");		/* current unixtime */
+patch("1008693541");		/* current unixtime */
 /*
  *
  *
  */
-patch("membercheck2and3");
+patch("speedyhand2nick");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list