summaryrefslogtreecommitdiff
path: root/modules/m_svsnick.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/m_svsnick.c')
-rw-r--r--modules/m_svsnick.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/modules/m_svsnick.c b/modules/m_svsnick.c
index cabefbe..999cf56 100644
--- a/modules/m_svsnick.c
+++ b/modules/m_svsnick.c
@@ -1,8 +1,8 @@
/*
- * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
- * Copyright (C) 1999 by the Bahamut Development Team.
- * Copyright (C) 2011 by the Hybrid Development Team.
+ * Copyright (c) 1999 Bahamut development team.
+ * Copyright (c) 2011-2014 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
* \version $Id$
*/
+
#include "stdinc.h"
#include "client.h"
#include "ircd.h"
@@ -56,21 +57,21 @@
* - parv[2] = new nickname
* - parv[3] = timestamp
*/
-static void
+static int
ms_svsnick(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
struct Client *target_p = NULL, *exists_p = NULL;
if (!HasFlag(source_p, FLAGS_SERVICE) || !valid_nickname(parv[2], 1))
- return;
+ return 0;
if (hunt_server(client_p, source_p, ":%s SVSNICK %s %s :%s",
1, parc, parv) != HUNTED_ISME)
- return;
+ return 0;
if ((target_p = find_person(client_p, parv[1])) == NULL)
- return;
+ return 0;
assert(MyClient(target_p));
@@ -81,7 +82,7 @@ ms_svsnick(struct Client *client_p, struct Client *source_p,
else
{
exit_client(target_p, &me, "SVSNICK Collide");
- return;
+ return 0;
}
}
@@ -104,11 +105,9 @@ ms_svsnick(struct Client *client_p, struct Client *source_p,
whowas_add_history(target_p, 1);
- sendto_server(NULL, CAP_TS6, NOCAPS,
- ":%s NICK %s :%lu",
+ sendto_server(NULL, CAP_TS6, NOCAPS, ":%s NICK %s :%lu",
ID(target_p), parv[2], (unsigned long)target_p->tsinfo);
- sendto_server(NULL, NOCAPS, CAP_TS6,
- ":%s NICK %s :%lu",
+ sendto_server(NULL, NOCAPS, CAP_TS6, ":%s NICK %s :%lu",
target_p->name, parv[2], (unsigned long)target_p->tsinfo);
hash_del_client(target_p);
@@ -118,9 +117,11 @@ ms_svsnick(struct Client *client_p, struct Client *source_p,
watch_check_hash(target_p, RPL_LOGON);
fd_note(&target_p->localClient->fd, "Nick: %s", parv[2]);
+ return 0;
}
-static struct Message svsnick_msgtab = {
+static struct Message svsnick_msgtab =
+{
"SVSNICK", 0, 0, 4, MAXPARA, MFLG_SLOW, 0,
{m_ignore, m_ignore, ms_svsnick, m_ignore, m_ignore, m_ignore}
};
@@ -137,7 +138,8 @@ module_exit(void)
mod_del_cmd(&svsnick_msgtab);
}
-struct module module_entry = {
+struct module module_entry =
+{
.node = { NULL, NULL, NULL },
.name = NULL,
.version = "$Revision$",