[cvslog] (2002-09-22 08:12:40 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Sun Sep 22 03:13:01 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2002-09-22 08:12:40 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

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

Log message:

Fixed the logic in check_this_member().

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.411 eggdrop1.6/doc/UPDATES1.6:1.412
--- eggdrop1.6/doc/UPDATES1.6:1.411	Sat Sep 21 16:32:05 2002
+++ eggdrop1.6/doc/UPDATES1.6	Sun Sep 22 03:12:30 2002
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.411 2002/09/21 21:32:05 wcc Exp $
+$Id: UPDATES1.6,v 1.412 2002/09/22 08:12:30 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.13
 Found by  Fixed by  What...
+          Wcc       fixed the logic in check_this_member()
           BarkerJr  made the timestamp style definable in src/eggdrop.h
           Eule      added a missing return in bot_actchan()
 various   [sL]      fixed a problem with 'connect' and 'control' where the script
Index: eggdrop1.6/src/mod/irc.mod/chan.c
diff -u eggdrop1.6/src/mod/irc.mod/chan.c:1.95 eggdrop1.6/src/mod/irc.mod/chan.c:1.96
--- eggdrop1.6/src/mod/irc.mod/chan.c:1.95	Thu Aug 29 22:07:04 2002
+++ eggdrop1.6/src/mod/irc.mod/chan.c	Sun Sep 22 03:12:30 2002
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.95 2002/08/30 03:07:04 wcc Exp $
+ * $Id: chan.c,v 1.96 2002/09/22 08:12:30 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -713,42 +713,59 @@
   if (!m || match_my_nick(nick) || (!me_op(chan) && !me_halfop(chan)))
     return;
 
-  sprintf(s, "%s!%s", m->nick, m->userhost);
-  if (me_op(chan)) {
-    if (chan_hasop(m)) {
-      if (chan_deop(*fr) || (glob_deop(*fr) && !chan_op(*fr))) {
-        add_mode(chan, '-', 'o', m->nick);
-      } else if (channel_bitch(chan) && (!chan_op(*fr) && !(glob_op(*fr) &&
-	         !chan_deop(*fr)))) {
+  if (me_op(chan) || me_halfop(chan)) {
+    if (me_op(chan)) {
+      if (chan_hasop(m) && ((chan_deop(*fr) || (glob_deop(*fr) &&
+          !chan_op(*fr))) || (channel_bitch(chan) && (!chan_op(*fr) &&
+          !(glob_op(*fr) && !chan_deop(*fr)))))) {
         add_mode(chan, '-', 'o', m->nick);
       }
-    }
-    if (chan_hashalfop(m)) {
-      if (chan_dehalfop(*fr) || (glob_dehalfop(*fr) && !chan_halfop(*fr))) {
+      if (chan_hashalfop(m) && ((chan_dehalfop(*fr) || (glob_dehalfop(*fr) &&
+          !chan_halfop(*fr)) || (channel_bitch(chan) && (!chan_halfop(*fr) &&
+          !(glob_halfop(*fr) && !chan_dehalfop(*fr)))))))
         add_mode(chan, '-', 'h', m->nick);
-      } else if (channel_bitch(chan) && (!chan_halfop(*fr) &&
-	         !(glob_halfop(*fr) && !chan_dehalfop(*fr)))) {
-        add_mode(chan, '-', 'h', m->nick);
-      }
+      if (!chan_hasop(m) && (chan_op(*fr) || (glob_op(*fr) &&
+          !chan_deop(*fr))) && (channel_autoop(chan) || glob_autoop(*fr) ||
+          chan_autoop(*fr)))
+        if (!chan->aop_min)
+          add_mode(chan, '+', 'o', m->nick);
+        else {
+          set_delay(chan, m->nick);
+          m->flags |= SENTOP;
+	}
+      else if (!chan_hasop(m) && !chan_hashalfop(m) && (chan_halfop(*fr) ||
+               (glob_halfop(*fr) && !chan_dehalfop(*fr))) &&
+               (channel_autohalfop(chan) || glob_autohalfop(*fr) ||
+               chan_autohalfop(*fr)))
+        if (!chan->aop_min)
+          add_mode(chan, '+', 'h', m->nick);
+        else {
+          set_delay(chan, m->nick);
+          m->flags |= SENTHALFOP;
+	}
     }
+    if (chan_hasvoice(m) && (chan_quiet(*fr) || (glob_quiet(*fr) &&
+        !chan_voice(*fr))))
+      add_mode(chan, '-', 'v', m->nick);
+    if (!chan_hasvoice(m) && !chan_hasop(m) && !chan_hashalfop(m) &&
+        (chan_voice(*fr) || (glob_voice(*fr) && !chan_quiet(*fr))) &&
+        (channel_autovoice(chan) || glob_gvoice(*fr) || chan_gvoice(*fr)))
+      if (!chan->aop_min)
+        add_mode(chan, '+', 'v', m->nick);
+      else {
+        set_delay(chan, m->nick);
+        m->flags |= SENTVOICE;
+      }
   }
-  /* check vs invites */
-  if (use_invites &&
-      (u_match_mask(global_invites,s) ||
-       u_match_mask(chan->invites, s)))
+
+  sprintf(s, "%s!%s", m->nick, m->userhost);
+  if (use_invites && (u_match_mask(global_invites,s) ||
+      u_match_mask(chan->invites, s)))
     refresh_invite(chan, s);
-  /* don't kickban if permanent exempted */
-  if (!(use_exempts &&
-	(u_match_mask(global_exempts,s) ||
-	 u_match_mask(chan->exempts, s)))) {
-    /* if match a ban */
-    if (u_match_mask(global_bans, s) ||
-        u_match_mask(chan->bans, s)) {
-      /* bewm */
+  if (!(use_exempts && (u_match_mask(global_exempts ,s) ||
+      u_match_mask(chan->exempts, s)))) {
+    if (u_match_mask(global_bans, s) || u_match_mask(chan->bans, s))
       refresh_ban_kick(chan, s, m->nick);
-      /* ^ will use the ban comment */
-    }
-    /* are they +k ? */
     if (!chan_sentkick(m) && (chan_kick(*fr) || glob_kick(*fr)) &&
 	(me_op(chan) || (me_halfop(chan) && !chan_hasop(m)))) {
       check_exemptlist(chan, s);
@@ -759,31 +776,6 @@
       m->flags |= SENTKICK;
     }
   }
-  if (!chan_hasop(m) && me_op(chan) && (chan_op(*fr) || (glob_op(*fr) &&
-      !chan_deop(*fr))) && (channel_autoop(chan) || (glob_autoop(*fr) ||
-      chan_autoop(*fr)))) {
-    add_mode(chan, '+', 'o', m->nick);
-  } else if (me_op(chan) && !chan_hashalfop(m) && !chan_hasop(m)) {
-    if ((channel_autohalfop(chan) && !chan_dehalfop(*fr) &&
-	(chan_halfop(*fr) || glob_halfop(*fr))) || (!chan_dehalfop(*fr) &&
-	(glob_autohalfop(*fr) || chan_autohalfop(*fr)))) {
-      add_mode(chan, '+', 'h', m->nick);
-    }
-    if (chan_hashalfop(m) && (chan_dehalfop(*fr) || (glob_dehalfop(*fr) &&
-	!chan_halfop(*fr)))) {
-      add_mode(chan, '-', 'h', m->nick);
-    }
-  } else if (!chan_hasvoice(m) && !chan_hasop(m) && !chan_hashalfop(m)) {
-    if ((channel_autovoice(chan) && !chan_quiet(*fr) && (chan_voice(*fr) ||
-	glob_voice(*fr))) || (!chan_quiet(*fr) && (glob_gvoice(*fr) ||
-	chan_gvoice(*fr)))) {
-      add_mode(chan, '+', 'v', m->nick);
-    }
-    if (chan_hasvoice(m) && (chan_quiet(*fr) || (glob_quiet(*fr) &&
-	!chan_voice(*fr)))) {
-      add_mode(chan, '-', 'v', m->nick);
-    }
-  }
 }
 
 static void check_this_user(char *hand, int delete, char *host)
@@ -1539,11 +1531,11 @@
   if (count)
     for (m2 = chan->channel.member; m2 && m2->nick[0]; m2 = m2->next)
       if (m2->delay && !(m2->flags & FULL_DELAY)) {
- m2->delay = a_delay;
- if (count + 1 >=  modesperline)
-   m2->flags |= FULL_DELAY;
+        m2->delay = a_delay;
+        if (count + 1 >=  modesperline)
+          m2->flags |= FULL_DELAY;
       }
-  if (count + 1 >=modesperline)
+  if (count + 1 >= modesperline)
     m->flags |= FULL_DELAY;
   m->delay = a_delay;
 }
Index: eggdrop1.6/src/mod/irc.mod/irc.h
diff -u eggdrop1.6/src/mod/irc.mod/irc.h:1.18 eggdrop1.6/src/mod/irc.mod/irc.h:1.19
--- eggdrop1.6/src/mod/irc.mod/irc.h:1.18	Thu Jun 13 15:43:08 2002
+++ eggdrop1.6/src/mod/irc.mod/irc.h	Sun Sep 22 03:12:30 2002
@@ -1,7 +1,7 @@
 /*
  * irc.h -- part of irc.mod
  *
- * $Id: irc.h,v 1.18 2002/06/13 20:43:08 wcc Exp $
+ * $Id: irc.h,v 1.19 2002/09/22 08:12:30 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -54,6 +54,7 @@
 static int hand_on_chan(struct chanset_t *, struct userrec *);
 static char *getchanmode(struct chanset_t *);
 static void flush_mode(struct chanset_t *, int);
+static void set_delay(struct chanset_t *, char *);
 
 /* reset(bans|exempts|invites) are now just macros that call resetmasks
  * in order to reduce the code duplication. <cybah>
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.826 eggdrop1.6/src/patch.h:1.827
--- eggdrop1.6/src/patch.h:1.826	Sat Sep 21 23:11:08 2002
+++ eggdrop1.6/src/patch.h	Sun Sep 22 03:12:30 2002
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.826 2002/09/22 04:11:08 wcc Exp $
+ * $Id: patch.h,v 1.827 2002/09/22 08:12:30 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1032667620");		/* current unixtime */
+patch("1032682100");		/* current unixtime */
 /*
  *
  *
  */
-patch("sockfix7");
+patch("auto-logic");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list