[eggheads-patches] PATCH:stopnethack_exempt.patch

Axel Franke eule at berlin.snafu.de
Mon Oct 23 22:59:00 CST 2000


Hi,

This patch added as global and channelflag the e-flag for exempt from 
stopnethack.

Greeting Eule

-------------- next part --------------
diff -ur eggdrop1.5/help/cmds2.help eggneu/help/cmds2.help
--- eggdrop1.5/help/cmds2.help	Mon Oct 23 19:09:34 2000
+++ eggneu/help/cmds2.help	Mon Oct 23 19:14:50 2000
@@ -322,6 +322,7 @@
       a   global auto-op (always op this user on join)
       h   high-light flag, user sees highlighting in text output
       w   wasop-test (needs wasop test for +stopnethack procedure)
+      e   global exempted from stopnethack
       g   give auto-voice (works as +a but for voice instead)
       (plus 26 user-defined flags, A-Z)
    
@@ -338,6 +339,7 @@
       q   quiet (user never gets +v on +autovoice channels)
       a   auto-op (always op this user on join)
       w   wasop-test (needs wasop test for +stopnethack procedure)
+      e   exempted from stopnethack
       g   give auto-voice (works as +a but for voice instead)
       (plus 26 user-defined flags, A-Z)
    
diff -ur eggdrop1.5/src/flags.h eggneu/src/flags.h
--- eggdrop1.5/src/flags.h	Mon Oct 23 19:09:36 2000
+++ eggneu/src/flags.h	Tue Oct 24 05:49:45 2000
@@ -44,21 +44,21 @@
 
 /* 
  * userflags:
- *             abcd?fgh?jk?mnopq??tuvwx??
+ *             abcdefgh?jk?mnopq??tuvwx??
  * + user defined A-Z
- *   unused letters: eilrsyz
+ *   unused letters: ilrsyz
  * 
  * botflags:
  *   0123456789ab????ghi??l???p?rs???????
  *   unused letters: cdefjkmnoqtuvwxyz
  * 
  * chanflags:
- *             a??d?fg???k?mno?q???uv????
+ *             a??defg???k?mno?q???uv????
  * + user defined A-Z
- *   unused letters: bcehijlprstwxyz
+ *   unused letters: bchijlprstwxyz
  */
-#define USER_VALID    0x00f9f6ef	/* all USER_ flags in use	 */
-#define CHAN_VALID    0x00757469	/* all flags that can be chan
+#define USER_VALID    0x00f9f6ff	/* all USER_ flags in use	 */
+#define CHAN_VALID    0x00757479	/* all flags that can be chan
 					   specific			 */
 #define BOT_VALID     0x7fe689C1	/* all BOT_ flags in use	 */
 
@@ -68,7 +68,7 @@
 #define USER_COMMON   0x00000004	/* c  user is actually a public
 					      irc site			 */
 #define USER_DEOP     0x00000008	/* d  user is global de-op	 */
-#define USER_E        0x00000010	/* e  unused			 */
+#define USER_EXEMPT   0x00000010	/* e  exempted from stopnethack	 */
 #define USER_FRIEND   0x00000020	/* f  user is global friend	 */
 #define USER_GVOICE   0x00000040	/* g  give voice true auto	 */
 #define USER_HIGHLITE 0x00000080	/* h  highlighting (bold)	 */
@@ -169,6 +169,8 @@
 #define glob_party(x)		((x).global & USER_PARTY)
 #define glob_xfer(x)		((x).global & USER_XFER)
 #define glob_hilite(x) 		((x).global & USER_HIGHLITE)
+#define chan_exempt(x)		((x).chan & USER_EXEMPT)
+#define glob_exempt(x)		((x).global & USER_EXEMPT)
 
 #define bot_global(x)		((x).bot & BOT_GLOBAL)
 #define bot_chan(x)		((x).chan & BOT_AGGRESSIVE)
diff -ur eggdrop1.5/src/mod/irc.mod/mode.c eggneu/src/mod/irc.mod/mode.c
--- eggdrop1.5/src/mod/irc.mod/mode.c	Mon Oct 23 19:09:38 2000
+++ eggneu/src/mod/irc.mod/mode.c	Mon Oct 23 19:16:05 2000
@@ -432,7 +432,8 @@
     if (chan_deop(victim) || (glob_deop(victim) && !chan_op(victim))) {
       m->flags |= FAKEOP;
       add_mode(chan, '-', 'o', who);
-    } else if (snm > 0 && snm < 7 && !(m->delay)) {
+    } else if (snm > 0 && snm < 7 && !(m->delay) &&
+	       !glob_exempt(victim) && !chan_exempt(victim)) {
       if (snm == 5) snm = channel_bitch(chan) ? 1 : 3;
       if (snm == 6) snm = channel_bitch(chan) ? 4 : 2;
       if (chan_wasoptest(victim) || glob_wasoptest(victim) ||


More information about the Patches mailing list