|
From: Martijn <wa...@we...> - 2004-06-15 17:53:45
|
wasted 2004/06/15 09:45:54 PDT
Modified files:
src proto-p10.c
Log:
Fix TOPIC bug, add support for SVSNICK (I take no credit, nor blame for that function)
Revision Changes Path
1.2 +19 -2 wStats/src/proto-p10.c
Index: proto-p10.c
===================================================================
RCS file: /home/cvs/wstats/wStats/src/proto-p10.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- proto-p10.c 13 Dec 2003 13:36:25 -0000 1.1
+++ proto-p10.c 15 Jun 2004 16:45:53 -0000 1.2
@@ -18,7 +18,7 @@
* wStats is derrived from srvx (http://srvx.net), everything in here that's
* original srvx code, Copyrighted 2000-2003 srvx Development Team.
*
- * $Id: proto-p10.c,v 1.1 2003/12/13 13:36:25 wasted Exp $
+ * $Id: proto-p10.c,v 1.2 2004/06/15 16:45:53 wasted Exp $
*/
#include "proto-common.c"
@@ -902,6 +902,21 @@
return 1;
}
+static CMD_FUNC(cmd_svsnick)
+{
+ struct userNode *target, *dest;
+
+ if ((argc < 4) || !(target = GetUserN(argv[1]))
+ || !IsLocal(target) || (dest = GetUserH(argv[2])))
+ {
+ return 0;
+ }
+
+ NickChange(target, argv[2], 0);
+
+ return 1;
+}
+
static CMD_FUNC(cmd_account)
{
struct userNode *user;
@@ -1079,7 +1094,7 @@
{
static struct chanNode *cn;
- if (argc < 4) return 0;
+ if (argc < 3) return 0;
if (!(cn = GetChannel(argv[1]))) {
log_module(MAIN_LOG, LOG_ERROR, "Unable to find channel %s whose topic is being set", argv[1]);
return 0;
@@ -1366,6 +1381,8 @@
dict_insert(irc_func_dict, TOK_NOTICE, cmd_notice);
dict_insert(irc_func_dict, CMD_STATS, cmd_stats);
dict_insert(irc_func_dict, TOK_STATS, cmd_stats);
+ dict_insert(irc_func_dict, CMD_SVSNICK, cmd_svsnick);
+ dict_insert(irc_func_dict, TOK_SVSNICK, cmd_svsnick);
dict_insert(irc_func_dict, CMD_WHOIS, cmd_whois);
dict_insert(irc_func_dict, TOK_WHOIS, cmd_whois);
dict_insert(irc_func_dict, CMD_GLINE, cmd_gline);
|