summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 2ae4e0049..ef95d1f3f 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1650,9 +1650,11 @@ void handle_nick(char **parameters, int pcnt, userrec *user)
char buffer[MAXBUF];
snprintf(buffer,MAXBUF,"n %s %s",user->nick,parameters[0]);
NetSendToAll(buffer);
-
}
+ char oldnick[NICKMAX];
+ strlcpy(oldnick,user->nick,NICKMAX);
+
/* change the nick of the user in the users_hash */
user = ReHashNick(user->nick, parameters[0]);
/* actually change the nick within the record */
@@ -1677,6 +1679,10 @@ void handle_nick(char **parameters, int pcnt, userrec *user)
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
ConnectUser(user);
}
+ if (user->registered == 7)
+ {
+ FOREACH_MOD OnUserPostNick(user,oldnick);
+ }
}