[eggheads-patches] PATCH:clearmodes.patch

Axel Franke eule at berlin.snafu.de
Tue Oct 3 17:11:06 CST 2000


Hi,

This patch removed the clearbansset, for this now a automatically 
call if no other opped bot present:
if use -userbans to resetbans
if use -userexempts to resetexempts
if use -userinvites to resetinvites 

Greeting Eule

-------------- next part --------------
diff -ur eggdrop1.5/doc/html/mod-channels.html eggneu/doc/html/mod-channels.html
--- eggdrop1.5/doc/html/mod-channels.html	Tue Oct  3 17:03:42 2000
+++ eggneu/doc/html/mod-channels.html	Tue Oct  3 03:34:38 2000
@@ -307,14 +307,6 @@
 
           <blockquote>
             <dl>
-              <dt><strong>clearbans</strong></dt>
-
-              <dd>
-                <p>clear all channel bans when the bot joins? (ie, force the
-                channel&#39;s ban list to match the bot&#39;s internal
-                list)</p>
-              </dd>
-
               <dt><strong>enforcebans</strong></dt>
 
               <dd>
@@ -506,7 +498,7 @@
        <strong><em>set global-flood-nick 5:60</em></strong></p>
 
       <p><strong><em>set global-chanset {</em></strong><br>
-       <strong><em>&nbsp; -clearbans -enforcebans</em></strong><br>
+       <strong><em>&nbsp; -nodesynch -enforcebans</em></strong><br>
        <strong><em>&nbsp; +dynamicbans +userbans</em></strong><br>
        <strong><em>&nbsp; -autoop -bitch</em></strong><br>
        <strong><em>&nbsp; +greet +protectops</em></strong><br>
@@ -517,7 +509,6 @@
        <strong><em>&nbsp; +shared -seen</em></strong><br>
        <strong><em>&nbsp; +userexempts +dynamicexempts</em></strong><br>
        <strong><em>&nbsp; +userinvites +dynamicinvites</em></strong><br>
-       <strong><em>&nbsp; -nodesynch</em></strong><br>
        <strong><em>}</em></strong></p>
 
       <p><strong><em>set global-chanmode
diff -ur eggdrop1.5/doc/settings/mod.channel eggneu/doc/settings/mod.channel
--- eggdrop1.5/doc/settings/mod.channel	Tue Oct  3 17:03:43 2000
+++ eggneu/doc/settings/mod.channel	Tue Oct  3 17:08:32 2000
@@ -178,10 +178,6 @@
     A complete list of all available channel settings:
 
 
-     clearbans
-      clear all channel bans when the bot joins?  (ie, force the
-      channel's ban list to match the bot's internal list)
-
      enforcebans
       when a ban is set, kick people who are on the channel and match
       the new ban?  (ie, they were on the channel before the ban)
@@ -295,18 +291,18 @@
 set global-flood-nick 5:60
 
 set global-chanset {
-        -clearbans      -enforcebans
-        +dynamicbans    +userbans
-        -autoop         -bitch
-        +greet          +protectops
-        +statuslog      -revenge
-        -secret         -autovoice
-        +cycle          +dontkickops
-        -inactive       -protectfriends
-        +shared         -seen
-	+userexempts	+dynamicexempts
-	+userinvites	+dynamicinvites
-	-nodesynch
+	-autoop		-autovoice
+	-bitch		+cycle
+	+dontkickops	+dynamicbans
+	+dynamicexempts	+dynamicinvites
+	-enforcebans	+greet
+	-inactive	-nodesynch
+	-protectfriends	+protectops
+	-revenge	-revengebot
+	-secret		-seen
+	+shared		+statuslog
+	+userbans	+userexempts
+	+userinvites
 }
 
 set global-chanmode "nt-likm"
diff -ur eggdrop1.5/eggdrop.advanced.conf eggneu/eggdrop.advanced.conf
--- eggdrop1.5/eggdrop.advanced.conf	Tue Oct  3 17:03:43 2000
+++ eggneu/eggdrop.advanced.conf	Tue Oct  3 17:06:56 2000
@@ -385,17 +385,17 @@
 
 set global-chanset {
 	-autoop		-autovoice
-	-bitch		-clearbans
-	+cycle		+dontkickops
-	+dynamicbans	+dynamicexempts
-	+dynamicinvites	-enforcebans
-	+greet		-inactive
-	-nodesynch	-protectfriends
-	+protectops	-revenge
-	-revengebot	-secret
-	-seen		+shared
-	+statuslog	+userbans
-	+userexempts	+userinvites
+	-bitch		+cycle
+	+dontkickops	+dynamicbans
+	+dynamicexempts	+dynamicinvites
+	-enforcebans	+greet
+	-inactive	-nodesynch
+	-protectfriends	+protectops
+	-revenge	-revengebot
+	-secret		-seen
+	+shared		+statuslog
+	+userbans	+userexempts
+	+userinvites
 }
 
 set global-chanmode "nt"
@@ -485,10 +485,6 @@
 #   +autoop
 # to turn it off, put:
 #   -autoop
-
-#   clear all channel bans when the bot joins?  (i.e., force the channel's
-#   ban list to match the bot's internal list)
-channel set #lamest -clearbans
 
 #   when a ban is set, kick people who are on the channel and match the
 #   new ban?  (i.e., they were on the channel before the ban)
diff -ur eggdrop1.5/eggdrop.complete.conf eggneu/eggdrop.complete.conf
--- eggdrop1.5/eggdrop.complete.conf	Tue Oct  3 17:03:43 2000
+++ eggneu/eggdrop.complete.conf	Tue Oct  3 17:07:02 2000
@@ -451,17 +451,17 @@
 
 set global-chanset {
 	-autoop		-autovoice
-	-bitch		-clearbans
-	+cycle		+dontkickops
-	+dynamicbans	+dynamicexempts
-	+dynamicinvites	-enforcebans
-	+greet		-inactive
-	-nodesynch	-protectfriends
-	+protectops	-revenge
-	-revengebot	-secret
-	-seen		+shared
-	+statuslog	+userbans
-	+userexempts	+userinvites
+	-bitch		+cycle
+	+dontkickops	+dynamicbans
+	+dynamicexempts	+dynamicinvites
+	-enforcebans	+greet
+	-inactive	-nodesynch
+	-protectfriends	+protectops
+	-revenge	-revengebot
+	-secret		-seen
+	+shared		+statuslog
+	+userbans	+userexempts
+	+userinvites
 }
 
 set global-chanmode "nt"
@@ -552,10 +552,6 @@
 # to turn it off, put:
 #   -autoop
 
-#   clear all channel bans when the bot joins?  (ie, force the channel's
-#   ban list to match the bot's internal list)
-channel set #lamest -clearbans
-
 #   when a ban is set, kick people who are on the channel and match the
 #   new ban?  (ie, they were on the channel before the ban)
 channel set #lamest +enforcebans
@@ -658,7 +654,7 @@
   chanmode "+mntisl 1"
   idle-kick 1
 }
-channel set #botcentral +bitch +clearbans +enforcebans -greet +revenge
+channel set #botcentral +bitch +enforcebans -greet +revenge
 
 
 ##### SERVER MODULE #####
diff -ur eggdrop1.5/eggdrop.simple.conf eggneu/eggdrop.simple.conf
--- eggdrop1.5/eggdrop.simple.conf	Tue Oct  3 17:03:43 2000
+++ eggneu/eggdrop.simple.conf	Tue Oct  3 17:07:13 2000
@@ -55,7 +55,7 @@
   stopnethack-mode 0
 }
 
-channel set #lamest -clearbans +enforcebans +dynamicbans +userbans
+channel set #lamest +enforcebans +dynamicbans +userbans
 channel set #lamest +dynamicexempts +userexempts +dynamicinvites +userinvites
 channel set #lamest -autoop -bitch +protectops +protectfriends +dontkickops
 channel set #lamest +greet +statuslog
diff -ur eggdrop1.5/src/chan.h eggneu/src/chan.h
--- eggdrop1.5/src/chan.h	Tue Oct  3 17:03:44 2000
+++ eggneu/src/chan.h	Tue Oct  3 17:12:08 2000
@@ -176,28 +176,27 @@
 };
 
 /* behavior modes for the channel */
-#define CHAN_CLEARBANS      0x0001	/* clear bans on join		      */
-#define CHAN_ENFORCEBANS    0x0002	/* kick people who match channel bans */
-#define CHAN_DYNAMICBANS    0x0004	/* only activate bans when needed     */
-#define CHAN_NOUSERBANS     0x0008	/* don't let non-bots place bans      */
-#define CHAN_OPONJOIN       0x0010	/* op +o people as soon as they join  */
-#define CHAN_BITCH          0x0020	/* be a tightwad with ops	      */
-#define CHAN_GREET          0x0040	/* greet people with their info line  */
-#define CHAN_PROTECTOPS     0x0080	/* re-op any +o people who get deop'd */
-#define CHAN_LOGSTATUS      0x0100	/* log channel status every 5 mins    */
-#define CHAN_REVENGE        0x0200	/* get revenge on bad people	      */
-#define CHAN_SECRET         0x0400	/* don't advertise channel on botnet  */
-#define CHAN_AUTOVOICE      0x0800	/* dish out voice stuff automatically */
-#define CHAN_CYCLE          0x1000	/* cycle the channel if possible      */
-#define CHAN_DONTKICKOPS    0x2000	/* never kick +o flag people
+#define CHAN_ENFORCEBANS    0x0001	/* kick people who match channel bans */
+#define CHAN_DYNAMICBANS    0x0002	/* only activate bans when needed     */
+#define CHAN_NOUSERBANS     0x0004	/* don't let non-bots place bans      */
+#define CHAN_OPONJOIN       0x0008	/* op +o people as soon as they join  */
+#define CHAN_BITCH          0x0010	/* be a tightwad with ops	      */
+#define CHAN_GREET          0x0020	/* greet people with their info line  */
+#define CHAN_PROTECTOPS     0x0040	/* re-op any +o people who get deop'd */
+#define CHAN_LOGSTATUS      0x0080	/* log channel status every 5 mins    */
+#define CHAN_REVENGE        0x0100	/* get revenge on bad people	      */
+#define CHAN_SECRET         0x0200	/* don't advertise channel on botnet  */
+#define CHAN_AUTOVOICE      0x0400	/* dish out voice stuff automatically */
+#define CHAN_CYCLE          0x0800	/* cycle the channel if possible      */
+#define CHAN_DONTKICKOPS    0x1000	/* never kick +o flag people
 					   -arthur2			      */
-#define CHAN_INACTIVE       0x4000	/* no irc support for this channel
+#define CHAN_INACTIVE       0x2000	/* no irc support for this channel
 					   - drummer			      */
-#define CHAN_PROTECTFRIENDS 0x8000	/* re-op any +f people who get deop'd */
-#define CHAN_SHARED         0x10000	/* channel is being shared	      */
-#define CHAN_SEEN           0x20000
-#define CHAN_REVENGEBOT     0x40000	/* revenge on actions against the bot */
-#define CHAN_NODESYNCH      0x80000
+#define CHAN_PROTECTFRIENDS 0x4000	/* re-op any +f people who get deop'd */
+#define CHAN_SHARED         0x8000	/* channel is being shared	      */
+#define CHAN_SEEN           0x10000
+#define CHAN_REVENGEBOT     0x20000	/* revenge on actions against the bot */
+#define CHAN_NODESYNCH      0x40000
 /*			    0x100000 */
 #define CHAN_ACTIVE         0x1000000	/* like i'm actually on the channel
 					   and stuff			      */
@@ -235,7 +234,6 @@
 #define channel_autovoice(chan) (chan->status & CHAN_AUTOVOICE)
 #define channel_greet(chan) (chan->status & CHAN_GREET)
 #define channel_logstatus(chan) (chan->status & CHAN_LOGSTATUS)
-#define channel_clearbans(chan) (chan->status & CHAN_CLEARBANS)
 #define channel_enforcebans(chan) (chan->status & CHAN_ENFORCEBANS)
 #define channel_revenge(chan) (chan->status & CHAN_REVENGE)
 #define channel_dynamicbans(chan) (chan->status & CHAN_DYNAMICBANS)
diff -ur eggdrop1.5/src/mod/channels.mod/channels.c eggneu/src/mod/channels.mod/channels.c
--- eggdrop1.5/src/mod/channels.mod/channels.c	Tue Oct  3 17:03:45 2000
+++ eggneu/src/mod/channels.mod/channels.c	Tue Oct  3 17:13:25 2000
@@ -396,7 +396,7 @@
 need-op %s need-invite %s need-key %s need-unban %s need-limit %s \
 flood-chan %d:%d flood-ctcp %d:%d flood-join %d:%d \
 flood-kick %d:%d flood-deop %d:%d flood-nick %d:%d \
-%cclearbans %cenforcebans %cdynamicbans %cuserbans %cautoop %cbitch \
+%cenforcebans %cdynamicbans %cuserbans %cautoop %cbitch \
 %cgreet %cprotectops %cprotectfriends %cdontkickops \
 %cstatuslog %crevenge %crevengebot %cautovoice %csecret \
 %cshared %ccycle %cseen %cinactive %cdynamicexempts %cuserexempts \
@@ -414,7 +414,6 @@
         chan->flood_kick_thr, chan->flood_kick_time,
         chan->flood_deop_thr, chan->flood_deop_time,
 	chan->flood_nick_thr, chan->flood_nick_time,
-	PLSMNS(channel_clearbans(chan)),
 	PLSMNS(channel_enforcebans(chan)),
 	PLSMNS(channel_dynamicbans(chan)),
 	PLSMNS(!channel_nouserbans(chan)),
@@ -588,8 +587,6 @@
       if (details) {
 	s[0] = 0;
 	i = 0;
-	if (channel_clearbans(chan))
-	  i += my_strcpy(s + i, "clear-bans ");
 	if (channel_enforcebans(chan))
 	  i += my_strcpy(s + i, "enforce-bans ");
 	if (channel_dynamicbans(chan))
@@ -894,7 +891,7 @@
   udef = NULL;
   global_stopnethack_mode = 0;
   strcpy(glob_chanset, "\
--clearbans -enforcebans +dynamicbans +userbans -autoop -bitch +greet \
+-enforcebans +dynamicbans +userbans -autoop -bitch +greet \
 +protectops +statuslog -revenge -secret -autovoice +cycle \
 +dontkickops -inactive -protectfriends +shared -seen \
 +userexempts +dynamicexempts +userinvites +dynamicinvites -revengebot \
diff -ur eggdrop1.5/src/mod/channels.mod/cmdschan.c eggneu/src/mod/channels.mod/cmdschan.c
--- eggdrop1.5/src/mod/channels.mod/cmdschan.c	Tue Oct  3 17:03:45 2000
+++ eggneu/src/mod/channels.mod/cmdschan.c	Wed Oct  4 00:15:48 2000
@@ -1201,38 +1201,35 @@
 	dprintf(idx, "When channel full (need-limit):\n%s\n", chan->need_limit);
     }
     dprintf(idx, "Other modes:\n");
-    dprintf(idx, "     %cclearbans  %cenforcebans  %cdynamicbans  %cuserbans\n",
-	    (chan->status & CHAN_CLEARBANS) ? '+' : '-',
-	    (chan->status & CHAN_ENFORCEBANS) ? '+' : '-',
-	    (chan->status & CHAN_DYNAMICBANS) ? '+' : '-',
-	    (chan->status & CHAN_NOUSERBANS) ? '-' : '+');
-    dprintf(idx, "     %cautoop     %cbitch        %cgreet        %cprotectops\n",
-	    (chan->status & CHAN_OPONJOIN) ? '+' : '-',
-	    (chan->status & CHAN_BITCH) ? '+' : '-',
-	    (chan->status & CHAN_GREET) ? '+' : '-',
-	    (chan->status & CHAN_PROTECTOPS) ? '+' : '-');
-    dprintf(idx, "     %cstatuslog  %crevenge      %csecret\n",
+    dprintf(idx, "     %cinactive       %cstatuslog      %csecret         %cshared\n",
+	    (chan->status & CHAN_INACTIVE) ? '+' : '-',
 	    (chan->status & CHAN_LOGSTATUS) ? '+' : '-',
+	    (chan->status & CHAN_SECRET) ? '+' : '-',
+	    (chan->status & CHAN_SHARED) ? '+' : '-');
+    dprintf(idx, "     %cgreet          %cseen           %ccycle          %cdontkickops\n",
+	    (chan->status & CHAN_GREET) ? '+' : '-',
+	    (chan->status & CHAN_SEEN) ? '+' : '-',
+	    (chan->status & CHAN_CYCLE) ? '+' : '-',
+	    (chan->status & CHAN_DONTKICKOPS) ? '+' : '-');
+    dprintf(idx, "     %cprotectops     %cprotectfriends %crevenge        %crevengebot\n",
+	    (chan->status & CHAN_PROTECTOPS) ? '+' : '-',
+            (chan->status & CHAN_PROTECTFRIENDS) ? '+' : '-',
 	    (chan->status & CHAN_REVENGE) ? '+' : '-',
-	    (chan->status & CHAN_SECRET) ? '+' : '-');
-    dprintf(idx, "     %cshared     %cautovoice    %ccycle        %cseen\n",
-	    (chan->status & CHAN_SHARED) ? '+' : '-',
+	    (chan->status & CHAN_REVENGEBOT) ? '+' : '-');
+    dprintf(idx, "     %cbitch          %cautoop         %cautovoice      %cnodesynch\n",
+	    (chan->status & CHAN_BITCH) ? '+' : '-',
+	    (chan->status & CHAN_OPONJOIN) ? '+' : '-',
 	    (chan->status & CHAN_AUTOVOICE) ? '+' : '-',
-	    (chan->status & CHAN_CYCLE) ? '+' : '-',
-	    (chan->status & CHAN_SEEN) ? '+' : '-');
-    dprintf(idx, "     %cdontkickops              %cinactive\n",
-	    (chan->status & CHAN_DONTKICKOPS) ? '+' : '-',
-	    (chan->status & CHAN_INACTIVE) ? '+' : '-');
-    dprintf(idx, "     %cdynamicexempts           %cuserexempts\n",
+	    (chan->status & CHAN_NODESYNCH) ? '+' : '-');
+    dprintf(idx, "     %cenforcebans    %cdynamicbans    %cuserbans\n",
+	    (chan->status & CHAN_ENFORCEBANS) ? '+' : '-',
+	    (chan->status & CHAN_DYNAMICBANS) ? '+' : '-',
+	    (chan->status & CHAN_NOUSERBANS) ? '-' : '+');
+    dprintf(idx, "     %cdynamicexempts %cuserexempts    %cdynamicinvites %cuserinvites\n",
 	    (chan->ircnet_status & CHAN_DYNAMICEXEMPTS) ? '+' : '-',
-	    (chan->ircnet_status & CHAN_NOUSEREXEMPTS) ? '-' : '+');
-    dprintf(idx, "     %cdynamicinvites           %cuserinvites\n",
+	    (chan->ircnet_status & CHAN_NOUSEREXEMPTS) ? '-' : '+',
 	    (chan->ircnet_status & CHAN_DYNAMICINVITES) ? '+' : '-',
 	    (chan->ircnet_status & CHAN_NOUSERINVITES) ? '-' : '+');
-    dprintf(idx, "     %cprotectfriends           %crevengebot   %cnodesynch\n",
-            (chan->status & CHAN_PROTECTFRIENDS) ? '+' : '-',
-	    (chan->status & CHAN_REVENGEBOT) ? '+' : '-',
-	    (chan->status & CHAN_NODESYNCH) ? '+' : '-');
 
     ii = 1;
     tmp = 0;
diff -ur eggdrop1.5/src/mod/channels.mod/help/chaninfo.help eggneu/src/mod/channels.mod/help/chaninfo.help
--- eggdrop1.5/src/mod/channels.mod/help/chaninfo.help	Tue Oct  3 17:03:45 2000
+++ eggneu/src/mod/channels.mod/help/chaninfo.help	Tue Oct  3 17:12:34 2000
@@ -31,9 +31,7 @@
                          if channel +bitch: see stopnethack-mode 1
                        6 if channel -bitch: see stopnethack-mode 2
                          if channel +bitch: see stopnethack-mode 4
-     The following can be set + or - (eg .chanset #channel -clearbans)
-        %bclearbans%b      clear all the channel bans when the bot joins the 
-	               channel?
+     The following can be set + or - (eg .chanset #channel -enforcebans)
 	%benforcebans%b    kicks people who match channel bans?
 	%bdynamicbans%b    only activate bans on channel when they are needed
 	%buserbans%b       allow other users to place bans on the channel
diff -ur eggdrop1.5/src/mod/channels.mod/tclchan.c eggneu/src/mod/channels.mod/tclchan.c
--- eggdrop1.5/src/mod/channels.mod/tclchan.c	Tue Oct  3 17:03:45 2000
+++ eggneu/src/mod/channels.mod/tclchan.c	Tue Oct  3 17:13:33 2000
@@ -768,10 +768,6 @@
   Tcl_AppendElement(irp, s);
   simple_sprintf(s, "%d:%d", chan->flood_nick_thr, chan->flood_nick_time);
   Tcl_AppendElement(irp, s);
-  if (chan->status & CHAN_CLEARBANS)
-    Tcl_AppendElement(irp, "+clearbans");
-  else
-    Tcl_AppendElement(irp, "-clearbans");
   if (chan->status & CHAN_ENFORCEBANS)
     Tcl_AppendElement(irp, "+enforcebans");
   else
@@ -1018,10 +1014,6 @@
       }
       chan->stopnethack_mode = atoi(item[i]);
     }
-    else if (!strcmp(item[i], "+clearbans"))
-      chan->status |= CHAN_CLEARBANS;
-    else if (!strcmp(item[i], "-clearbans"))
-      chan->status &= ~CHAN_CLEARBANS;
     else if (!strcmp(item[i], "+enforcebans"))
       chan->status |= CHAN_ENFORCEBANS;
     else if (!strcmp(item[i], "-enforcebans"))
@@ -1114,11 +1106,13 @@
       chan->ircnet_status|= CHAN_NOUSERINVITES;
     else if (!strcmp(item[i], "+userinvites"))
       chan->ircnet_status&= ~CHAN_NOUSERINVITES;
-    /* ignore wasoptest and stopnethack in chanfile, remove these lines later */
+    /* ignore wasoptest, stopnethack and clearbans in chanfile, remove this later */
     else if (!strcmp(item[i], "-stopnethack"))  ;
     else if (!strcmp(item[i], "+stopnethack"))  ;
     else if (!strcmp(item[i], "-wasoptest"))  ;
     else if (!strcmp(item[i], "+wasoptest"))  ;  /* Eule 01.2000 */
+    else if (!strcmp(item[i], "+clearbans"))  ;
+    else if (!strcmp(item[i], "-clearbans"))  ;
     else if (!strncmp(item[i], "flood-", 6)) {
       int *pthr = 0, *ptime;
       char *p;
diff -ur eggdrop1.5/src/mod/irc.mod/chan.c eggneu/src/mod/irc.mod/chan.c
--- eggdrop1.5/src/mod/irc.mod/chan.c	Tue Oct  3 17:03:46 2000
+++ eggneu/src/mod/irc.mod/chan.c	Tue Oct  3 17:13:54 2000
@@ -685,6 +685,7 @@
   char s[UHOSTLEN], *p;
   struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
   static int stacking = 0;
+  int stop_reset = 0;
 
   if (stacking)
     return;			/* wewps */
@@ -703,6 +704,8 @@
     if (!match_my_nick(m->nick)) {
       /* if channel user is current a chanop */
       if (chan_hasop(m)) {
+	if (glob_bot(fr))
+	  stop_reset = 1;
 	/* if user is channel deop */
 	if (chan_deop(fr) ||
 	/* OR global deop and NOT channel op */
@@ -773,11 +776,22 @@
     m = m->next;
   }
   if (dobans) {
-    recheck_bans(chan);
-    if (use_invites)
-      recheck_invites(chan);
-    if (use_exempts)
-      recheck_exempts(chan);
+    if (channel_nouserbans(chan) && !stop_reset)
+      resetbans(chan);
+    else
+      recheck_bans(chan);
+    if (use_invites) {
+      if (channel_nouserinvites(chan) && !stop_reset)
+	resetinvites(chan);
+      else
+	recheck_invites(chan);
+    }
+    if (use_exempts) {
+      if (channel_nouserexempts(chan) && !stop_reset)
+	resetexempts(chan);
+      else
+	recheck_exempts(chan);
+    }
     if (channel_enforcebans(chan))
       enforce_bans(chan);
     if ((chan->status & CHAN_ASKEDMODES) &&
@@ -1043,11 +1057,8 @@
   newsplit(&msg);
   chname = newsplit(&msg);
   chan = findchan(chname);
-  if (chan) {
+  if (chan)
     chan->status &= ~CHAN_ASKEDBANS;
-    if (channel_clearbans(chan))
-      resetbans(chan);
-  }
   /* If i sent a mode -b on myself (deban) in got367, either
    * resetbans() or recheck_bans() will flush that.
    */
@@ -1095,11 +1106,8 @@
     newsplit(&msg);
     chname = newsplit(&msg);
     chan = findchan(chname);
-    if (chan) {
+    if (chan)
       chan->ircnet_status &= ~CHAN_ASKED_EXEMPTS;
-      if (channel_clearbans(chan))
-	resetexempts(chan);
-    }  
   }
   return 0;
 }
@@ -1144,11 +1152,8 @@
     newsplit(&msg);
     chname = newsplit(&msg);
     chan = findchan(chname);
-    if (chan) {
+    if (chan)
       chan->ircnet_status &= ~CHAN_ASKED_INVITED;
-      if (channel_clearbans(chan))
-	resetinvites(chan);
-    }
   }
   return 0;
 }
diff -ur eggdrop1.5/src/mod/irc.mod/irc.c eggneu/src/mod/irc.mod/irc.c
--- eggdrop1.5/src/mod/irc.mod/irc.c	Tue Oct  3 17:03:46 2000
+++ eggneu/src/mod/irc.mod/irc.c	Tue Oct  3 17:14:02 2000
@@ -610,7 +610,7 @@
 	  sfrom = s;
 	  snick = splitnick(&sfrom);
 	  
-	  if (force_expire || channel_clearbans(chan) ||
+	  if (force_expire ||
 	      !(snick[0] && egg_strcasecmp(sfrom, botuserhost) &&
 		(m = ismember(chan, snick)) &&
 		m->user && (m->user->flags & USER_BOT) && chan_hasop(m))) {
@@ -631,7 +631,7 @@
 	  strcpy(s, e->who);
 	  sfrom = s;
 	  snick = splitnick(&sfrom);
-	  if (force_expire || channel_clearbans(chan) ||
+	  if (force_expire ||
 	      !(snick[0] && egg_strcasecmp(sfrom, botuserhost) &&
 		(m = ismember(chan, snick)) &&
 		m->user && (m->user->flags & USER_BOT) && chan_hasop(m))) {
@@ -673,7 +673,7 @@
 	  sfrom = s;
 	  snick = splitnick(&sfrom);
 
-	  if (force_expire || channel_clearbans(chan) ||
+	  if (force_expire ||
 	      !(snick[0] && egg_strcasecmp(sfrom, botuserhost) &&
 		(m = ismember(chan, snick)) &&
 		m->user && (m->user->flags & USER_BOT) && chan_hasop(m))) {


More information about the Patches mailing list