[cvslog] (2003-05-08 00:20:19 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Wed May 7 18:20:19 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2003-05-08 00:20:19 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     src/mod/irc.mod/cmdsirc.c

Log message:

* Fix .voice/.devoice logic

---------------------- diff included ----------------------
Index: eggdrop1.6/src/mod/irc.mod/cmdsirc.c
diff -u eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.53 eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.54
--- eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.53	Tue Mar 18 18:13:22 2003
+++ eggdrop1.6/src/mod/irc.mod/cmdsirc.c	Wed May  7 19:20:09 2003
@@ -2,7 +2,7 @@
  * chancmds.c -- part of irc.mod
  *   handles commands directly relating to channel interaction
  *
- * $Id: cmdsirc.c,v 1.53 2003/03/19 00:13:22 wcc Exp $
+ * $Id: cmdsirc.c,v 1.54 2003/05/08 00:20:09 stdarg Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -528,8 +528,12 @@
 
   get_user_flagrec(dcc[idx].user, &user, chan->dname);
   m = ismember(chan, nick);
-  if (m && !chan_op(user) && !chan_halfop(user) && ((!glob_op(user) ||
-      chan_deop(user)) || (!glob_halfop(user) || chan_dehalfop(user)))) {
+
+  /* By factoring out a !, this code becomes a lot clearer.
+   * If you are... not a (channel op, or a channel half op, or a global op
+   * without channel deop, or a global halfop without channel dehalfop)...
+   * - stdarg */
+  if (m && !(chan_op(user) || chan_halfop(user) || (glob_op(user) && !chan_deop(user)) || (glob_halfop(user) && !chan_dehalfop(user)))) {
     egg_snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
     u2 = m->user ? m->user : get_user_by_host(s);
 
@@ -582,8 +586,7 @@
 
   get_user_flagrec(dcc[idx].user, &user, chan->dname);
   m = ismember(chan, nick);
-  if (m && !chan_op(user) && !chan_halfop(user) && ((!glob_op(user) ||
-      chan_deop(user)) || (!glob_halfop(user) || chan_dehalfop(user)))) {
+  if (m && !(chan_op(user) || chan_halfop(user) || (glob_op(user) && !chan_deop(user)) || (glob_halfop(user) && !chan_dehalfop(user)))) {
     egg_snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
     u2 = m->user ? m->user : get_user_by_host(s);
 
----------------------- End of diff -----------------------


More information about the Changes mailing list