[eggheads-patches] PATCH: stop_selfdeop.patch

Fabian Knittel fknittel at gmx.de
Tue Oct 19 14:56:20 CST 1999


[ stop_selfdeop.patch ]

This patch stops the bot from deop'ing itsself when
getting op. The bugs was caused because of my earlier
patch related to nethack and bitch problems.

In detail:

  got_op() was modified to set the op flag at the top
  of the function to stop add_mode() from misbehaving,
  this caused the small "bug" which this patch now
  attempts to fix.

This bug annoyed me enough to stop school work for a
few minutes... I hope I doesn't duplicate work.

Fabian
-------------- next part --------------
diff -urN eggdrop1.3~/doc/UPDATES1.3 eggdrop1.3/doc/UPDATES1.3
--- eggdrop1.3~/doc/UPDATES1.3	Tue Oct 19 20:41:38 1999
+++ eggdrop1.3/doc/UPDATES1.3	Tue Oct 19 20:54:39 1999
@@ -4,6 +4,7 @@
 
 1.3.29
 Foundby   Fixedby   What....
+	  Fabian    bot was deop'ing itsself in got_op()
 	  drummer   tidy-up of write_channels()
 	  Tothwolf  various configure/Makefile changes again
 	  rtc       fixed one more SEGV case that was revealed by another patch
diff -urN eggdrop1.3~/src/mod/irc.mod/mode.c eggdrop1.3/src/mod/irc.mod/mode.c
--- eggdrop1.3~/src/mod/irc.mod/mode.c	Tue Oct 19 20:41:39 1999
+++ eggdrop1.3/src/mod/irc.mod/mode.c	Tue Oct 19 20:52:16 1999
@@ -400,7 +400,7 @@
 				 * for stopnethack */
     if (!nick[0] &&
 	!(chan_op(victim) || (glob_op(victim) && !chan_deop(victim))) &&
-	me_op(chan) && channel_stopnethack(chan)) {
+	me_op(chan) && channel_stopnethack(chan) && !match_my_nick(who)) {
       add_mode(chan, '-', 'o', who);
       m->flags |= FAKEOP;
     } else {


More information about the Patches mailing list