public:
/** Constructor for nick.
*/
- CommandNick (InspIRCd* Instance, Module* parent) : Command(Instance,parent,"NICK", 0, 1, true, 3) { syntax = "<newnick>"; }
+ CommandNick ( Module* parent) : Command(parent,"NICK", 1, 1) { works_before_reg = true; syntax = "<newnick>"; Penalty = 3; }
/** Handle command.
* @param parameters The parameters to the comamnd
* @param pcnt The number of parameters passed to teh command
*/
oldnick.assign(user->nick, 0, IS_LOCAL(user) ? ServerInstance->Config->Limits.NickMax : MAXBUF);
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(ServerInstance, OnUserPreNick, MOD_RESULT, (user,parameters[0]));
+ FIRST_MOD_RESULT(OnUserPreNick, MOD_RESULT, (user,parameters[0]));
if (MOD_RESULT == MOD_RES_DENY)
return CMD_FAILURE;
if (user->registered == REG_ALL)
{
if (user->registered == REG_ALL)
{
- ServerInstance->SNO->WriteToSnoMask('x', "Q-Lined nickname %s from %s!%s@%s: %s",
+ ServerInstance->SNO->WriteGlobalSno('a', "Q-Lined nickname %s from %s!%s@%s: %s",
parameters[0].c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str(), mq->reason.c_str());
}
user->WriteNumeric(432, "%s %s :Invalid nickname: %s",user->nick.c_str(), parameters[0].c_str(), mq->reason.c_str());
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(ServerInstance, OnUserPreNick, MOD_RESULT, (user, parameters[0]));
+ FIRST_MOD_RESULT(OnUserPreNick, MOD_RESULT, (user, parameters[0]));
if (MOD_RESULT == MOD_RES_DENY)
// if a module returns true, the nick change is silently forbidden.
return CMD_FAILURE;
if (user->registered == REG_NICKUSER)
{
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
- FIRST_MOD_RESULT(ServerInstance, OnUserRegister, MOD_RESULT, (user));
+ FIRST_MOD_RESULT(OnUserRegister, MOD_RESULT, (user));
if (MOD_RESULT == MOD_RES_DENY)
return CMD_FAILURE;