[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Sun Oct 14 10:07:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-10-14 15:06:44 UTC
Commited by: Tothwolf <tothwolf at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/patch.h src/mod/channels.mod/userchan.c
     src/mod/server.mod/servmsg.c

Log message:

* don't attempt to flood check server notices
* display global bans, exempts and invites even if not on a channel
* removed unused "existant" check from tell_bans(), tell_exempts(), and tell_invites()

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.191 eggdrop1.6/doc/UPDATES1.6:1.192
--- eggdrop1.6/doc/UPDATES1.6:1.191	Tue Oct  9 12:23:21 2001
+++ eggdrop1.6/doc/UPDATES1.6	Sun Oct 14 10:06:34 2001
@@ -1,10 +1,15 @@
-$Id: UPDATES1.6,v 1.191 2001/10/09 17:23:21 tothwolf Exp $
+$Id: UPDATES1.6,v 1.192 2001/10/14 15:06:34 tothwolf Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.7
 Found by  Fixed by  What...
+          Tothwolf  don't attempt to flood check server notices
+          Tothwolf  display global bans, exempts and invites even if
+                    not on a channel
+          Tothwolf  removed unused "existant" check from tell_bans(),
+                    tell_exempts(), and tell_invites()
           Tothwolf  fixed buffer overflow in adduser()
           Tothwolf  fixed typo in filedb3.c: EBUG_MEM -> DEBUG_MEM
           Tothwolf  removed extra egg_bzero call from filesys.c
Index: eggdrop1.6/src/mod/channels.mod/userchan.c
diff -u eggdrop1.6/src/mod/channels.mod/userchan.c:1.24 eggdrop1.6/src/mod/channels.mod/userchan.c:1.25
--- eggdrop1.6/src/mod/channels.mod/userchan.c:1.24	Sat Jun 30 01:29:56 2001
+++ eggdrop1.6/src/mod/channels.mod/userchan.c	Sun Oct 14 10:06:34 2001
@@ -1,7 +1,7 @@
 /*
  * userchan.c -- part of channels.mod
  *
- * $Id: userchan.c,v 1.24 2001/06/30 06:29:56 guppy Exp $
+ * $Id: userchan.c,v 1.25 2001/10/14 15:06:34 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -756,7 +756,7 @@
   /* Was a channel given? */
   if (match[0]) {
     chname = newsplit(&match);
-    if (chname[0] && (strchr(CHANMETA, chname[0]) != NULL)) {
+    if (chname[0] && (strchr(CHANMETA, chname[0]))) {
       chan = findchan_by_dname(chname);
       if (!chan) {
 	dprintf(idx, "%s.\n", CHAN_NOSUCH);
@@ -765,10 +765,13 @@
     } else
       match = chname;
   }
+
+  /* don't return here, we want to show global bans even if no chan */
   if (!chan && !(chan = findchan_by_dname(dcc[idx].u.chat->con_chan)) &&
       !(chan = chanset))
-    return;
-  if (show_inact)
+    chan = NULL;
+
+  if (chan && show_inact)
     dprintf(idx, "%s:   (! = %s %s)\n", BANS_GLOBAL,
 	    MODES_NOTACTIVE, chan->dname);
   else
@@ -783,50 +786,50 @@
     } else
       display_ban(idx, k++, u, chan, show_inact);
   }
-  if (show_inact)
-    dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
-	    BANS_BYCHANNEL, chan->dname,
-	    MODES_NOTACTIVE2, MODES_NOTBYBOT);
-  else
-    dprintf(idx, "%s %s:  (* = %s)\n",
-	    BANS_BYCHANNEL, chan->dname,
-	    MODES_NOTBYBOT);
-  for (u = chan->bans; u; u = u->next) {
-    if (match[0]) {
-      if ((wild_match(match, u->mask)) ||
-	  (wild_match(match, u->desc)) ||
-	  (wild_match(match, u->user)))
-	display_ban(idx, k, u, chan, 1);
-      k++;
-    } else
-      display_ban(idx, k++, u, chan, show_inact);
-  }
-  if (chan->status & CHAN_ACTIVE) {
-    masklist *b;
-    char s[UHOSTLEN], *s1, *s2, fill[256];
-    int min, sec;
-
-    for (b = chan->channel.ban; b && b->mask[0]; b = b->next) {    
-      if ((!u_equals_mask(global_bans, b->mask)) &&
-	  (!u_equals_mask(chan->bans, b->mask))) {
-	strcpy(s, b->who);
-	s2 = s;
-	s1 = splitnick(&s2);
-	if (s1[0])
-	  sprintf(fill, "%s (%s!%s)", b->mask, s1, s2);
-	else if (!egg_strcasecmp(s, "existant"))
-	  sprintf(fill, "%s (%s)", b->mask, s2);
-	else
-	  sprintf(fill, "%s (server %s)", b->mask, s2);
-	if (b->timer != 0) {
-	  min = (now - b->timer) / 60;
-	  sec = (now - b->timer) - (min * 60);
-	  sprintf(s, " (active %02d:%02d)", min, sec);
-	  strcat(fill, s);
-	}
-	if ((!match[0]) || (wild_match(match, b->mask)))
-	  dprintf(idx, "* [%3d] %s\n", k, fill);
+  if (chan) {
+    if (show_inact)
+      dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
+	      BANS_BYCHANNEL, chan->dname,
+	      MODES_NOTACTIVE2, MODES_NOTBYBOT);
+    else
+      dprintf(idx, "%s %s:  (* = %s)\n",
+	      BANS_BYCHANNEL, chan->dname,
+	      MODES_NOTBYBOT);
+    for (u = chan->bans; u; u = u->next) {
+      if (match[0]) {
+	if ((wild_match(match, u->mask)) ||
+	    (wild_match(match, u->desc)) ||
+	    (wild_match(match, u->user)))
+	  display_ban(idx, k, u, chan, 1);
 	k++;
+      } else
+	display_ban(idx, k++, u, chan, show_inact);
+    }
+    if (chan->status & CHAN_ACTIVE) {
+      masklist *b;
+      char s[UHOSTLEN], *s1, *s2, fill[256];
+      int min, sec;
+
+      for (b = chan->channel.ban; b && b->mask[0]; b = b->next) {    
+	if ((!u_equals_mask(global_bans, b->mask)) &&
+	    (!u_equals_mask(chan->bans, b->mask))) {
+	  strcpy(s, b->who);
+	  s2 = s;
+	  s1 = splitnick(&s2);
+	  if (s1[0])
+	    sprintf(fill, "%s (%s!%s)", b->mask, s1, s2);
+	  else
+	    sprintf(fill, "%s (server %s)", b->mask, s2);
+	  if (b->timer != 0) {
+	    min = (now - b->timer) / 60;
+	    sec = (now - b->timer) - (min * 60);
+	    sprintf(s, " (active %02d:%02d)", min, sec);
+	    strcat(fill, s);
+	  }
+	  if ((!match[0]) || (wild_match(match, b->mask)))
+	    dprintf(idx, "* [%3d] %s\n", k, fill);
+	  k++;
+	}
       }
     }
   }
@@ -855,10 +858,13 @@
     } else
       match = chname;
   }
+
+  /* don't return here, we want to show global exempts even if no chan */
   if (!chan && !(chan = findchan_by_dname(dcc[idx].u.chat->con_chan))
       && !(chan = chanset))
-    return;
-  if (show_inact)
+    chan = NULL;
+
+  if (chan && show_inact)
     dprintf(idx, "%s:   (! = %s %s)\n", EXEMPTS_GLOBAL,
 	    MODES_NOTACTIVE, chan->dname);
   else
@@ -873,51 +879,51 @@
     } else
       display_exempt(idx, k++, u, chan, show_inact);
   }
-  if (show_inact)
-    dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
-	    EXEMPTS_BYCHANNEL, chan->dname,
-	    MODES_NOTACTIVE2,
-	    MODES_NOTBYBOT);
-  else
-    dprintf(idx, "%s %s:  (* = %s)\n",
-	    EXEMPTS_BYCHANNEL, chan->dname,
-	    MODES_NOTBYBOT);
-  for (u = chan->exempts; u; u = u->next) {
-    if (match[0]) {
-      if ((wild_match(match, u->mask)) ||
-	  (wild_match(match, u->desc)) ||
-	  (wild_match(match, u->user)))
-	display_exempt(idx, k, u, chan, 1);
-      k++;
-    } else
-      display_exempt(idx, k++, u, chan, show_inact);
-  }
-  if (chan->status & CHAN_ACTIVE) {
-    masklist *e;
-    char s[UHOSTLEN], *s1, *s2,fill[256];
-    int min, sec;
-
-    for (e = chan->channel.exempt; e && e->mask[0]; e = e->next) {
-      if ((!u_equals_mask(global_exempts,e->mask)) &&
-	  (!u_equals_mask(chan->exempts, e->mask))) {
-	strcpy(s, e->who);
-	s2 = s;
-	s1 = splitnick(&s2);
-	if (s1[0])
-	  sprintf(fill, "%s (%s!%s)", e->mask, s1, s2);
-	else if (!egg_strcasecmp(s, "existant"))
-	  sprintf(fill, "%s (%s)", e->mask, s2);
-	else
-	  sprintf(fill, "%s (server %s)", e->mask, s2);
-	if (e->timer != 0) {
-	  min = (now - e->timer) / 60;
-	  sec = (now - e->timer) - (min * 60);
-	  sprintf(s, " (active %02d:%02d)", min, sec);
-	  strcat(fill, s);
-	}
-	if ((!match[0]) || (wild_match(match, e->mask)))
-	  dprintf(idx, "* [%3d] %s\n", k, fill);
+  if (chan) {
+    if (show_inact)
+      dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
+	      EXEMPTS_BYCHANNEL, chan->dname,
+	      MODES_NOTACTIVE2,
+	      MODES_NOTBYBOT);
+    else
+      dprintf(idx, "%s %s:  (* = %s)\n",
+	      EXEMPTS_BYCHANNEL, chan->dname,
+	      MODES_NOTBYBOT);
+    for (u = chan->exempts; u; u = u->next) {
+      if (match[0]) {
+	if ((wild_match(match, u->mask)) ||
+	    (wild_match(match, u->desc)) ||
+	    (wild_match(match, u->user)))
+	  display_exempt(idx, k, u, chan, 1);
 	k++;
+      } else
+	display_exempt(idx, k++, u, chan, show_inact);
+    }
+    if (chan->status & CHAN_ACTIVE) {
+      masklist *e;
+      char s[UHOSTLEN], *s1, *s2,fill[256];
+      int min, sec;
+
+      for (e = chan->channel.exempt; e && e->mask[0]; e = e->next) {
+	if ((!u_equals_mask(global_exempts,e->mask)) &&
+	    (!u_equals_mask(chan->exempts, e->mask))) {
+	  strcpy(s, e->who);
+	  s2 = s;
+	  s1 = splitnick(&s2);
+	  if (s1[0])
+	    sprintf(fill, "%s (%s!%s)", e->mask, s1, s2);
+	  else
+	    sprintf(fill, "%s (server %s)", e->mask, s2);
+	  if (e->timer != 0) {
+	    min = (now - e->timer) / 60;
+	    sec = (now - e->timer) - (min * 60);
+	    sprintf(s, " (active %02d:%02d)", min, sec);
+	    strcat(fill, s);
+	  }
+	  if ((!match[0]) || (wild_match(match, e->mask)))
+	    dprintf(idx, "* [%3d] %s\n", k, fill);
+	  k++;
+	}
       }
     }
   }
@@ -946,10 +952,13 @@
     } else
       match = chname;
   }
+
+  /* don't return here, we want to show global invites even if no chan */
   if (!chan && !(chan = findchan_by_dname(dcc[idx].u.chat->con_chan))
       && !(chan = chanset))
-    return;
-  if (show_inact)
+    chan = NULL;
+
+  if (chan && show_inact)
     dprintf(idx, "%s:   (! = %s %s)\n", INVITES_GLOBAL,
 	    MODES_NOTACTIVE, chan->dname);
   else
@@ -964,51 +973,51 @@
     } else
       display_invite(idx, k++, u, chan, show_inact);
   }
-  if (show_inact)
-    dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
-	    INVITES_BYCHANNEL, chan->dname,
-	    MODES_NOTACTIVE2,
-	    MODES_NOTBYBOT);
-  else
-    dprintf(idx, "%s %s:  (* = %s)\n",
-	    INVITES_BYCHANNEL, chan->dname,
-	    MODES_NOTBYBOT);
-  for (u = chan->invites; u; u = u->next) {
-    if (match[0]) {
-      if ((wild_match(match, u->mask)) ||
-	  (wild_match(match, u->desc)) ||
-	  (wild_match(match, u->user)))
-	display_invite(idx, k, u, chan, 1);
-      k++;
-    } else
-      display_invite(idx, k++, u, chan, show_inact);
-  }
-  if (chan->status & CHAN_ACTIVE) {
-    masklist *i;
-    char s[UHOSTLEN], *s1, *s2,fill[256];
-    int min, sec;
-
-    for (i = chan->channel.invite; i && i->mask[0]; i = i->next) {
-      if ((!u_equals_mask(global_invites,i->mask)) &&
-	  (!u_equals_mask(chan->invites, i->mask))) {
-	strcpy(s, i->who);
-	s2 = s;
-	s1 = splitnick(&s2);
-	if (s1[0])
-	  sprintf(fill, "%s (%s!%s)", i->mask, s1, s2);
-	else if (!egg_strcasecmp(s, "existant"))
-	  sprintf(fill, "%s (%s)", i->mask, s2);
-	else
-	  sprintf(fill, "%s (server %s)", i->mask, s2);
-	if (i->timer != 0) {
-	  min = (now - i->timer) / 60;
-	  sec = (now - i->timer) - (min * 60);
-	  sprintf(s, " (active %02d:%02d)", min, sec);
-	  strcat(fill, s);
-	}
-	if ((!match[0]) || (wild_match(match, i->mask)))
-	  dprintf(idx, "* [%3d] %s\n", k, fill);
+  if (chan) {
+    if (show_inact)
+      dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
+	      INVITES_BYCHANNEL, chan->dname,
+	      MODES_NOTACTIVE2,
+	      MODES_NOTBYBOT);
+    else
+      dprintf(idx, "%s %s:  (* = %s)\n",
+	      INVITES_BYCHANNEL, chan->dname,
+	      MODES_NOTBYBOT);
+    for (u = chan->invites; u; u = u->next) {
+      if (match[0]) {
+	if ((wild_match(match, u->mask)) ||
+	    (wild_match(match, u->desc)) ||
+	    (wild_match(match, u->user)))
+	  display_invite(idx, k, u, chan, 1);
 	k++;
+      } else
+	display_invite(idx, k++, u, chan, show_inact);
+    }
+    if (chan->status & CHAN_ACTIVE) {
+      masklist *i;
+      char s[UHOSTLEN], *s1, *s2,fill[256];
+      int min, sec;
+
+      for (i = chan->channel.invite; i && i->mask[0]; i = i->next) {
+	if ((!u_equals_mask(global_invites,i->mask)) &&
+	    (!u_equals_mask(chan->invites, i->mask))) {
+	  strcpy(s, i->who);
+	  s2 = s;
+	  s1 = splitnick(&s2);
+	  if (s1[0])
+	    sprintf(fill, "%s (%s!%s)", i->mask, s1, s2);
+	  else
+	    sprintf(fill, "%s (server %s)", i->mask, s2);
+	  if (i->timer != 0) {
+	    min = (now - i->timer) / 60;
+	    sec = (now - i->timer) - (min * 60);
+	    sprintf(s, " (active %02d:%02d)", min, sec);
+	    strcat(fill, s);
+	  }
+	  if ((!match[0]) || (wild_match(match, i->mask)))
+	    dprintf(idx, "* [%3d] %s\n", k, fill);
+	  k++;
+	}
       }
     }
   }
Index: eggdrop1.6/src/mod/server.mod/servmsg.c
diff -u eggdrop1.6/src/mod/server.mod/servmsg.c:1.59 eggdrop1.6/src/mod/server.mod/servmsg.c:1.60
--- eggdrop1.6/src/mod/server.mod/servmsg.c:1.59	Sun Sep 23 23:25:40 2001
+++ eggdrop1.6/src/mod/server.mod/servmsg.c	Sun Oct 14 10:06:34 2001
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.59 2001/09/24 04:25:40 guppy Exp $
+ * $Id: servmsg.c,v 1.60 2001/10/14 15:06:34 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -619,14 +619,14 @@
       putlog(LOG_MSGS | LOG_SERV, "*", "-%s (%s) to %s- %s",
 	     nick, uhost, to, msg);
     } else {
-      detect_flood(nick, uhost, from, FLOOD_NOTICE);
-      u = get_user_by_host(from);
       /* Server notice? */
-      if ((from[0] == 0) || (nick[0] == 0)) {
+      if ((nick[0] == 0) || (uhost[0] == 0)) {
 	/* Hidden `250' connection count message from server */
 	if (strncmp(msg, "Highest connection count:", 25))
 	  putlog(LOG_SERV, "*", "-NOTICE- %s", msg);
       } else {
+        detect_flood(nick, uhost, from, FLOOD_NOTICE);
+        u = get_user_by_host(from);
         if (!ignoring || trigger_on_ignore)
           check_tcl_notc(nick, uhost, u, botname, msg);
         if (!ignoring)
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.562 eggdrop1.6/src/patch.h:1.563
--- eggdrop1.6/src/patch.h:1.562	Thu Oct 11 14:47:04 2001
+++ eggdrop1.6/src/patch.h	Sun Oct 14 10:06:34 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.562 2001/10/11 19:47:04 tothwolf Exp $
+ * $Id: patch.h,v 1.563 2001/10/14 15:06:34 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1002830004");		/* current unixtime */
+patch("1003072578");		/* current unixtime */
 /*
  *
  *
  */
-patch("adduser");
+patch("floodcheck");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list