[cvslog] Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Wed Dec 19 00:30:03 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2001-12-19 06:28:13 UTC
Commited by: Jeff Fisher <guppy at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 modules/irc/chan.c modules/irc/mode.c src/patch.h

Log message:

added Eule's small-fixes patch from eggdrop1.6

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/UPDATES1.6
diff -u eggdrop1.7/doc/UPDATES1.6:1.173 eggdrop1.7/doc/UPDATES1.6:1.174
--- eggdrop1.7/doc/UPDATES1.6:1.173	Wed Dec 19 00:25:08 2001
+++ eggdrop1.7/doc/UPDATES1.6	Wed Dec 19 00:28:02 2001
@@ -1,10 +1,12 @@
-$Id: UPDATES1.6,v 1.173 2001/12/19 06:25:08 guppy Exp $
+$Id: UPDATES1.6,v 1.174 2001/12/19 06:28:02 guppy Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.8
 Found by  Fixed by  What...
+          Eule      a bunch of small fixes to gotjoin, gotkick, got367, a
+                    modes-per-line calcuation, and to include_lk
 |^Raven^| guppy     made tcl_hand2nick _a lot_ faster
           Eule      more membercheck fixes for nick bans, nick +k users, -user, and
                     -host.
Index: eggdrop1.7/modules/irc/chan.c
diff -u eggdrop1.7/modules/irc/chan.c:1.6 eggdrop1.7/modules/irc/chan.c:1.7
--- eggdrop1.7/modules/irc/chan.c:1.6	Wed Dec 19 00:25:08 2001
+++ eggdrop1.7/modules/irc/chan.c	Wed Dec 19 00:28:03 2001
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.6 2001/12/19 06:25:08 guppy Exp $
+ * $Id: chan.c,v 1.7 2001/12/19 06:28:03 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -399,7 +399,7 @@
   m = ismember(chan, nick);
   if (!m)
     return;
-  /* Check channel bans in first cycle and global bans
+  /* Check global bans in first cycle and channel bans
      in second cycle. */
   for (cycle = 0; cycle < 2; cycle++) {
     for (b = cycle ? chan->bans : global_bans; b; b = b->next) {
@@ -436,7 +436,7 @@
   masklist	*b;
   int		 cycle;
 
-  /* Check channel exempts in first cycle and global exempts
+  /* Check global exempts in first cycle and channel exempts
      in second cycle. */
   for (cycle = 0; cycle < 2; cycle++) {
     for (e = cycle ? chan->exempts : global_exempts; e; e = e->next) {
@@ -459,7 +459,7 @@
   maskrec	*i;
   int		 cycle;
 
-  /* Check channel invites in first cycle and global invites
+  /* Check global invites in first cycle and channel invites
      in second cycle. */
   for (cycle = 0; cycle < 2; cycle++) {
     for (i = cycle ? chan->invites : global_invites; i; i = i->next) {
@@ -503,7 +503,7 @@
   maskrec	*u;
   int		 cycle;
 
-  /* Check channel bans in first cycle and global bans
+  /* Check global bans in first cycle and channel bans
      in second cycle. */
   for (cycle = 0; cycle < 2; cycle++) {
     for (u = cycle ? chan->bans : global_bans; u; u = u->next)
@@ -524,7 +524,7 @@
   masklist	*b;
   int		 cycle;
 
-  /* Check channel exempts in first cycle and global exempts
+  /* Check global exempts in first cycle and channel exempts
      in second cycle. */
   for (cycle = 0; cycle < 2; cycle++) {
     for (e = cycle ? chan->exempts : global_exempts; e; e = e->next) {
@@ -551,7 +551,7 @@
   maskrec	*ir;
   int		 cycle;
 
-  /* Check channel invites in first cycle and global invites
+  /* Check global invites in first cycle and channel invites
      in second cycle. */
   for (cycle = 0; cycle < 2; cycle++)  {
     for (ir = cycle ? chan->invites : global_invites; ir; ir = ir->next) {
@@ -730,7 +730,7 @@
       /* ^ will use the ban comment */
     }
     /* are they +k ? */
-    if (chan_kick(*fr) || glob_kick(*fr)) {
+    if (!chan_sentkick(m) && (chan_kick(*fr) || glob_kick(*fr))) {
       check_exemptlist(chan, s);
       quickban(chan, m->userhost);
       p = get_user(&USERENTRY_COMMENT, m->user);
@@ -1043,10 +1043,8 @@
  */
 static int got367(char *from, char *ignore, char *origmsg)
 {
-  char s[UHOSTLEN], *ban, *who, *chname, buf[511], *msg;
+  char *ban, *who, *chname, buf[511], *msg;
   struct chanset_t *chan;
-  struct userrec *u;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
 
   strncpy(buf, origmsg, 510);
   buf[510] = 0;
@@ -1063,16 +1061,6 @@
     newban(chan, ban, who);
   else
     newban(chan, ban, "existent");
-  simple_sprintf(s, "%s!%s", botname, botuserhost);
-  if (wild_match(ban, s))
-    add_mode(chan, '-', 'b', ban);
-  u = get_user_by_host(ban);
-  if (u) {		/* Why bother check no-user :) - of if Im not an op */
-    get_user_flagrec(u, &fr, chan->dname);
-    if (chan_op(fr) || (glob_op(fr) && !chan_deop(fr)))
-      add_mode(chan, '-', 'b', ban);
-    /* These will be flushed by 368: end of ban info */
-  }
   return 0;
 }
 
@@ -1706,7 +1694,7 @@
 	      u_match_mask(chan->bans, from)) {
 	    refresh_ban_kick(chan, from, nick);
 	  /* Likewise for kick'ees */
-	  } else if (glob_kick(fr) || chan_kick(fr)) {
+	  } else if (!chan_sentkick(m) && (glob_kick(fr) || chan_kick(fr))) {
 	    check_exemptlist(chan, from);
 	    quickban(chan, from);
 	    p = get_user(&USERENTRY_COMMENT, m->user);
@@ -1895,11 +1883,12 @@
       sprintf(s1, "%s!%s", msg, uhost);
       strcpy(m->nick, msg);
       detect_chan_flood(msg, uhost, from, chan, FLOOD_NICK, NULL);
-      /* Any pending kick to the old nick is lost. Ernst 18/3/1998 */
-      if (chan_sentkick(m)) {
-	m->flags &= ~SENTKICK;
+      /* don't fill the serverqueue with modes or kicks in a nickflood */
+      if (chan_sentkick(m) || chan_sentdeop(m) || chan_sentop(m) ||
+	  chan_sentdevoice(m) || chan_sentvoice(m))
 	m->flags |= STOPCHECK;
-      }
+      /* Any pending kick or mode to the old nick is lost. */
+	m->flags &= ~(SENTKICK | SENTDEOP | SENTOP | SENTVOICE | SENTDEVOICE);
       /* nick-ban or nick is +k or something? */
       if (!chan_stopcheck(m)) {
 	get_user_flagrec(m->user ? m->user : get_user_by_host(s1), &fr, chan->dname);
Index: eggdrop1.7/modules/irc/mode.c
diff -u eggdrop1.7/modules/irc/mode.c:1.5 eggdrop1.7/modules/irc/mode.c:1.6
--- eggdrop1.7/modules/irc/mode.c:1.5	Sun Dec  2 21:25:53 2001
+++ eggdrop1.7/modules/irc/mode.c	Wed Dec 19 00:28:03 2001
@@ -4,7 +4,7 @@
  *   channel mode changes and the bot's reaction to them
  *   setting and getting the current wanted channel modes
  *
- * $Id: mode.c,v 1.5 2001/12/03 03:25:53 ite Exp $
+ * $Id: mode.c,v 1.6 2001/12/19 06:28:03 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -329,13 +329,13 @@
   for (i = 0; i < modesperline; i++)
     if (chan->cmode[i].type)
       modes--;
-  if (include_lk && chan->limit != -1)
+  if (include_lk && chan->limit)
     modes--;
   if (include_lk && chan->rmkey)
     modes--;
   if (include_lk && chan->key)
     modes--;
-  if (modes < 0)
+  if (modes < 1)
     flush_mode(chan, NORMAL);		/* Full buffer! Flush modes. */
 }
 
Index: eggdrop1.7/src/patch.h
diff -u eggdrop1.7/src/patch.h:1.559 eggdrop1.7/src/patch.h:1.560
--- eggdrop1.7/src/patch.h:1.559	Wed Dec 19 00:25:08 2001
+++ eggdrop1.7/src/patch.h	Wed Dec 19 00:28:03 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.559 2001/12/19 06:25:08 guppy Exp $
+ * $Id: patch.h,v 1.560 2001/12/19 06:28:03 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,17 +41,17 @@
  *
  *
  */
-patch("1008742958");		/* current unixtime */
+patch("1008743180");		/* current unixtime */
 /*
  *
  *
  */
-patch("membercheck2and3");
+patch("small-fixes");
 /*
  *
  *
  */
-patch("membercheck2and3");
+patch("small-fixes");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list