}
}
- if (user->registered == REG_ALL)
- {
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(user,parameters[0]));
- if (MOD_RESULT) {
- // if a module returns true, the nick change is silently forbidden.
- return CMD_FAILURE;
- }
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(user,parameters[0]));
+ if (MOD_RESULT)
+ // if a module returns true, the nick change is silently forbidden.
+ return CMD_FAILURE;
+ if (user->registered == REG_ALL)
user->WriteCommon("NICK %s",parameters[0]);
- }
-
strlcpy(oldnick, user->nick, NICKMAX - 1);
/* change the nick of the user in the users_hash */
user = user->UpdateNickHash(parameters[0]);
/* actually change the nick within the record */
- if (!user) return CMD_FAILURE;
- if (!*user->nick) return CMD_FAILURE;
+ if (!user)
+ return CMD_FAILURE;
+ if (!*user->nick)
+ return CMD_FAILURE;
strlcpy(user->nick, parameters[0], NICKMAX - 1);