#include "xline.h"
#include "commands/cmd_nick.h"
-extern "C" command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
{
return new cmd_nick(Instance);
}
char oldnick[NICKMAX];
if (!*parameters[0] || !*user->nick)
+ {
+ /* We cant put blanks in the parameters, so for this (extremely rare) issue we just put '*' here. */
+ user->WriteServ("432 %s * :Erroneous Nickname", *user->nick ? user->nick : "*");
return CMD_FAILURE;
+ }
if (irc::string(user->nick) == irc::string(parameters[0]))
{
if (user->registered == REG_NICKUSER)
{
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
- FOREACH_MOD(I_OnUserRegister,OnUserRegister(user));
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnUserRegister,OnUserRegister(user));
+ if (MOD_RESULT > 0)
+ return CMD_FAILURE;
}
if (user->registered == REG_ALL)
{