[cvslog] [CVS] Module eggdrop1.6: Change committed

cvs at eggheads.org cvs at eggheads.org
Wed Jan 21 20:14:55 CST 2009


Committer  : cvs
CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2009-01-22 02:14:55 UTC

Modified files:
     doc/Changes1.6 src/cmds.c

Log message:

Reverted "Allow any user to .whois their own handle." 1.6.16 changes. These
changes broke '.whois' behavior in that previously a global op or channel op
had full access to '.whois'. After the changes only a global op or channel
master could use '.whois' on other handles. The hard coded access flag
checks also made it impossible to rebind the '.whois' command with different
access flags.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.17 eggdrop1.6/doc/Changes1.6:1.18
--- eggdrop1.6/doc/Changes1.6:1.17	Sat Nov 29 08:39:46 2008
+++ eggdrop1.6/doc/Changes1.6	Wed Jan 21 20:14:45 2009
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.17 2008/11/29 14:39:46 tothwolf Exp $
+$Id: Changes1.6,v 1.18 2009/01/22 02:14:45 tothwolf Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,14 @@
 
 1.6.20 (CVS):
 
+  - Reverted "Allow any user to .whois their own handle." 1.6.16 changes. 
+    These changes broke '.whois' behavior in that previously a global op or
+    channel op had full access to '.whois'. After the changes only a global
+    op or channel master could use '.whois' on other handles. The hard
+    coded access flag checks also made it impossible to rebind the '.whois'
+    command with different access flags.
+    Patch by: Tothwolf
+
   - Removed 'Maintainer:' hacks from the doc/Changes files. Switched to
     using '# Released by:' and '# Patch by:' for processing now.
   - Further expanded 1.0, 1.1alpha, and 1.1.x information.
Index: eggdrop1.6/src/cmds.c
diff -u eggdrop1.6/src/cmds.c:1.117 eggdrop1.6/src/cmds.c:1.118
--- eggdrop1.6/src/cmds.c:1.117	Fri Oct 31 16:07:14 2008
+++ eggdrop1.6/src/cmds.c	Wed Jan 21 20:14:45 2009
@@ -3,7 +3,7 @@
  *   commands from a user via dcc
  *   (split in 2, this portion contains no-irc commands)
  *
- * $Id: cmds.c,v 1.117 2008/10/31 22:07:14 tothwolf Exp $
+ * $Id: cmds.c,v 1.118 2009/01/22 02:14:45 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -513,24 +513,13 @@
 
 static void cmd_whois(struct userrec *u, int idx, char *par)
 {
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0 };
-  char *handle;
-
   if (!par[0]) {
     dprintf(idx, "Usage: whois <handle>\n");
     return;
   }
 
-  handle = newsplit(&par);
-  get_user_flagrec(u, &fr, NULL);
-  if (egg_strcasecmp(handle, dcc[idx].nick) && !glob_botmast(fr) &&
-      !glob_op(fr) && !chan_master(fr)) {
-    dprintf(idx, "You do not have access to whois handles other than your "
-            "own.\n");
-    return;
-  }
-  putlog(LOG_CMDS, "*", "#%s# whois %s", dcc[idx].nick, handle);
-  tell_user_ident(idx, handle, u ? (u->flags & USER_MASTER) : 0);
+  putlog(LOG_CMDS, "*", "#%s# whois %s", dcc[idx].nick, par);
+  tell_user_ident(idx, par, u ? (u->flags & USER_MASTER) : 0);
 }
 
 static void cmd_match(struct userrec *u, int idx, char *par)
@@ -2856,7 +2845,7 @@
   {"uptime",    "m|m",  (Function) cmd_uptime,     NULL},
   {"vbottree",  "",     (Function) cmd_vbottree,   NULL},
   {"who",       "",     (Function) cmd_who,        NULL},
-  {"whois",     "",     (Function) cmd_whois,      NULL},
+  {"whois",     "to|o", (Function) cmd_whois,      NULL},
   {"whom",      "",     (Function) cmd_whom,       NULL},
   {"traffic",   "m|m",  (Function) cmd_traffic,    NULL},
   {"whoami",    "",     (Function) cmd_whoami,     NULL},
----------------------- End of diff -----------------------



More information about the Changes mailing list