From 284d95bfe2e076aadf1c6a4cb17cab06b3b2e876 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 3 Jul 2016 12:27:01 -0400 Subject: [PATCH] #1675: fix saset display to update the account name on the correct clients --- modules/commands/ns_set.cpp | 10 ++++++++-- 1 file 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::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()); }