[cvslog] Module eggdrop-devel: Change committed

cvslog cvs at tsss.iavalley.cc.ia.us
Thu Oct 19 11:33:00 CST 2000


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop-devel
Commit time: 2000-10-19 16:32:31 UTC

Modified files:
     doc/UPDATES1.5 src/chanprog.c src/modules.c src/patch.h
     src/proto.h src/mod/module.h src/mod/irc.mod/chan.c

Log message:

fabian: applied Eule's gotnick patch

---------------------- diff included ----------------------
Index: eggdrop-devel/doc/UPDATES1.5
diff -u eggdrop-devel/doc/UPDATES1.5:1.260 eggdrop-devel/doc/UPDATES1.5:1.261
--- eggdrop-devel/doc/UPDATES1.5:1.260	Thu Oct 19 11:31:30 2000
+++ eggdrop-devel/doc/UPDATES1.5	Thu Oct 19 11:32:20 2000
@@ -4,6 +4,8 @@
 
 1.5.5
 Found by  Fixed by  What...
+          Eule      Slightly optimised gotnick() by replacing the call to
+                      clear_chanlist() with a specialised loop.
 labtec    guppy     Instead of telnet!*@* we now use -telnet!*@* since no valid
                     IRC nicknames can be prefixed with a dash (per RFC1459).
           Eule      Added proper logics to the user{bans,exempts,invites}
Index: eggdrop-devel/src/chanprog.c
diff -u eggdrop-devel/src/chanprog.c:1.17 eggdrop-devel/src/chanprog.c:1.18
--- eggdrop-devel/src/chanprog.c:1.17	Mon Oct  2 17:35:42 2000
+++ eggdrop-devel/src/chanprog.c	Thu Oct 19 11:32:20 2000
@@ -7,7 +7,7 @@
  *   telling the current programmed settings
  *   initializing a lot of stuff and loading the tcl scripts
  * 
- * $Id: chanprog.c,v 1.17 2000/10/02 22:35:42 fabian Exp $
+ * $Id: chanprog.c,v 1.18 2000/10/19 16:32:20 fabian Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -168,6 +168,24 @@
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next)
       m->user = NULL;
+}
+
+/* Clear the user pointer of a specific nick in the chanlists.
+ *
+ * Necessary when a hostmask is added/removed, a nick changes, etc.
+ * Does not completely invalidate the channel cache like clear_chanlist().
+ */
+void clear_chanlist_member(const char *nick)
+{
+  register memberlist		*m;
+  register struct chanset_t	*chan;
+
+  for (chan = chanset; chan; chan = chan->next)
+    for (m = chan->channel.member; m && m->nick[0]; m = m->next)
+      if (!rfc_casecmp(m->nick, nick)) {
+	m->user = NULL;
+	break;
+      }
 }
 
 /* If this user at host is in a channel, set it (it was null)
Index: eggdrop-devel/src/mod/irc.mod/chan.c
diff -u eggdrop-devel/src/mod/irc.mod/chan.c:1.51 eggdrop-devel/src/mod/irc.mod/chan.c:1.52
--- eggdrop-devel/src/mod/irc.mod/chan.c:1.51	Thu Oct 19 11:30:32 2000
+++ eggdrop-devel/src/mod/irc.mod/chan.c	Thu Oct 19 11:32:21 2000
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  * 
- * $Id: chan.c,v 1.51 2000/10/19 16:30:32 fabian Exp $
+ * $Id: chan.c,v 1.52 2000/10/19 16:32:21 fabian Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -1853,7 +1853,7 @@
     }
     chan = chan->next;
   }
-  clear_chanlist();		/* Cache is meaningless now. */
+  clear_chanlist_member(msg);	/* Cache for nick 'msg' is meaningless now. */
   return 0;
 }
 
Index: eggdrop-devel/src/mod/module.h
diff -u eggdrop-devel/src/mod/module.h:1.34 eggdrop-devel/src/mod/module.h:1.35
--- eggdrop-devel/src/mod/module.h:1.34	Sat Sep 23 12:49:57 2000
+++ eggdrop-devel/src/mod/module.h	Thu Oct 19 11:32:21 2000
@@ -1,7 +1,7 @@
 /* 
  * module.h
  * 
- * $Id: module.h,v 1.34 2000/09/23 17:49:57 fabian Exp $
+ * $Id: module.h,v 1.35 2000/10/19 16:32:21 fabian Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -428,6 +428,7 @@
 /* 264 - 267 */
 #define str_unescape ((void (*)(char *, register const char))global[264])
 #define egg_strcatn ((int (*)(char *dst, const char *src, size_t max))global[265])
+#define clear_chanlist_member ((void (*)(const char *nick))global[266])
 
 /* This is for blowfish module, couldnt be bothered making a whole new .h
  * file for it ;)
Index: eggdrop-devel/src/modules.c
diff -u eggdrop-devel/src/modules.c:1.40 eggdrop-devel/src/modules.c:1.41
--- eggdrop-devel/src/modules.c:1.40	Sat Sep 23 12:49:56 2000
+++ eggdrop-devel/src/modules.c	Thu Oct 19 11:32:20 2000
@@ -4,7 +4,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: modules.c,v 1.40 2000/09/23 17:49:56 fabian Exp $
+ * $Id: modules.c,v 1.41 2000/10/19 16:32:20 fabian Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -334,7 +334,7 @@
   (Function) admin,		 /* char *				*/
   (Function) userfile,		 /* char *				*/
   (Function) ver,		 /* char *				*/
-     /* 120 - 123 */
+  /* 120 - 123 */
   (Function) notify_new,	 /* char *				*/
   (Function) helpdir,		 /* char *				*/
   (Function) version,		 /* char *				*/
@@ -524,7 +524,8 @@
   (Function) strchr_unescape,
   /* 264 - 267 */
   (Function) str_unescape,
-  (Function) egg_strcatn
+  (Function) egg_strcatn,
+  (Function) clear_chanlist_member
 };
 
 void init_modules(void)
Index: eggdrop-devel/src/patch.h
diff -u eggdrop-devel/src/patch.h:1.338 eggdrop-devel/src/patch.h:1.339
--- eggdrop-devel/src/patch.h:1.338	Thu Oct 19 11:31:30 2000
+++ eggdrop-devel/src/patch.h	Thu Oct 19 11:32:20 2000
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  * 
- * $Id: patch.h,v 1.338 2000/10/19 16:31:30 fabian Exp $
+ * $Id: patch.h,v 1.339 2000/10/19 16:32:20 fabian Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -40,11 +40,11 @@
 /*
  *
  */
-patch("971976040");	/* current unixtime */
+patch("971976090");	/* current unixtime */
 /*
  *
  */
-patch("bug83-telnetuser-v2");
+patch("gotnick");
 /*
  *
  */
Index: eggdrop-devel/src/proto.h
diff -u eggdrop-devel/src/proto.h:1.31 eggdrop-devel/src/proto.h:1.32
--- eggdrop-devel/src/proto.h:1.31	Sun Oct  1 14:11:43 2000
+++ eggdrop-devel/src/proto.h	Thu Oct 19 11:32:20 2000
@@ -7,7 +7,7 @@
  * because they use structures in those
  * (saves including those .h files EVERY time) - Beldin
  * 
- * $Id: proto.h,v 1.31 2000/10/01 19:11:43 fabian Exp $
+ * $Id: proto.h,v 1.32 2000/10/19 16:32:20 fabian Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -115,6 +115,7 @@
 void check_timers();
 void set_chanlist(const char *host, struct userrec *rec);
 void clear_chanlist(void);
+void clear_chanlist_member(const char *nick);
 
 /* cmds.c */
 int check_dcc_attrs(struct userrec *, int);
----------------------- End of diff -----------------------



More information about the Changes mailing list