summaryrefslogtreecommitdiff
path: root/modules/commands/ns_set.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/ns_set.cpp')
-rw-r--r--modules/commands/ns_set.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index 91b27a6ff..f9351424e 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -361,8 +361,14 @@ class CommandNSSetDisplay : public Command
Log(user_na->nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change the display of " << user_na->nc->display << " to " << na->nick;
user_na->nc->SetDisplay(na);
- if (source.GetUser())
- IRCD->SendLogin(source.GetUser(), na);
+
+ /* Send updated account name */
+ for (std::list<User *>::iterator it = user_na->nc->users.begin(); it != user_na->nc->users.end(); ++it)
+ {
+ User *u = *it;
+ IRCD->SendLogin(u, user_na);
+ }
+
source.Reply(NICK_SET_DISPLAY_CHANGED, user_na->nc->display.c_str());
}