diff options
author | Adam <Adam@anope.org> | 2016-07-03 12:27:01 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-07-03 12:27:01 -0400 |
commit | 284d95bfe2e076aadf1c6a4cb17cab06b3b2e876 (patch) | |
tree | 95f6e2c78ba1536542029eb1f31fc0ce52c850bd | |
parent | c7d5ee4becb70c8f44ca2d8882fc3df2b6d5e9db (diff) |
#1675: fix saset display to update the account name on the correct clients
-rw-r--r-- | modules/commands/ns_set.cpp | 10 |
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()); } |