[eggheads-patches] PATCH: cmd_channel-fixes.diff

Tothwolf tothwolf at concentric.net
Sun Oct 3 13:42:52 CST 1999


cmd_channel-fixes.diff - removed redundant code, reordered status flag
                         display
-------------- next part --------------
Index: doc/UPDATES1.3
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/doc/UPDATES1.3,v
retrieving revision 1.167
diff -u -r1.167 UPDATES1.3
--- doc/UPDATES1.3	1999/10/02 22:31:10	1.167
+++ doc/UPDATES1.3	1999/10/03 00:08:35
@@ -4,6 +4,8 @@
 
 1.3.29
 Foundby   Fixedby   What....
+          Tothwolf  fixed cmd_channel() calling get_user_flagrec() twice,
+                    ordering of status char, and removed redundant checking
           dw        it said 'JOIN flood from @%s!  Banning.'
                     for nick floods.
 reddawg   rtc       md5 make could fail on some OS
Index: src/mod/irc.mod/cmdsirc.c
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/src/mod/irc.mod/cmdsirc.c,v
retrieving revision 1.13
diff -u -r1.13 cmdsirc.c
--- src/mod/irc.mod/cmdsirc.c	1999/09/27 20:26:37	1.13
+++ src/mod/irc.mod/cmdsirc.c	1999/10/03 00:08:38
@@ -510,8 +510,6 @@
       }
       get_user_flagrec(m->user, &user, chan->name);
       /* determine status char to use */
-      get_user_flagrec(m->user, &user, chan->name);
-      /* determine status char to use */
       if (glob_bot(user))
 	atrflag = 'b';
       else if (glob_owner(user))
@@ -522,30 +520,30 @@
 	atrflag = 'M';
       else if (chan_master(user))
 	atrflag = 'm';
-      else if (glob_op(user) && !chan_deop(user))
-	atrflag = 'O';
-      else if (chan_op(user) && !chan_deop(user))
-	atrflag = 'o';
-      else if (glob_autoop(user) && !chan_deop(user))
-	atrflag = 'A';
-      else if (chan_autoop(user) && !chan_deop(user))
-	atrflag = 'a';
-      else if (glob_deop(user) && !chan_op(user))
+      else if (glob_deop(user))
 	atrflag = 'D';
       else if (chan_deop(user))
 	atrflag = 'd';
-      else if (glob_voice(user) && !chan_quiet(user))
-	atrflag = 'V';
-      else if (chan_voice(user))
-	atrflag = 'v';
-      else if (glob_gvoice(user) && !chan_quiet(user))
-	atrflag = 'G';
-      else if (chan_gvoice(user))
-	atrflag = 'g';
-      else if (glob_quiet(user) && !chan_voice(user))
+      else if (glob_autoop(user))
+	atrflag = 'A';
+      else if (chan_autoop(user))
+	atrflag = 'a';
+      else if (glob_op(user))
+	atrflag = 'O';
+      else if (chan_op(user))
+	atrflag = 'o';
+      else if (glob_quiet(user))
 	atrflag = 'Q';
       else if (chan_quiet(user))
 	atrflag = 'q';
+      else if (glob_gvoice(user))
+	atrflag = 'G';
+      else if (chan_gvoice(user))
+	atrflag = 'g';
+      else if (glob_voice(user))
+	atrflag = 'V';
+      else if (chan_voice(user))
+	atrflag = 'v';
       else
 	atrflag = ' ';
       if (chan_hasop(m))


More information about the Patches mailing list