From d6eb4a1fc5b86bfb5467108d89923c7b64f27aed Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 1 Mar 2016 16:17:14 +0100 Subject: Send NOTICEs that can go to both local and remote users with User::WriteRemoteNotice() --- src/configreader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index 1ac6b445a..e607c6e7d 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -612,7 +612,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) std::cout << line << std::endl; // If a user is rehashing, tell them directly if (user) - user->SendText(":%s NOTICE %s :*** %s", ServerInstance->Config->ServerName.c_str(), user->nick.c_str(), line.c_str()); + user->WriteRemoteNotice(InspIRCd::Format("*** %s", line.c_str())); // Also tell opers ServerInstance->SNO->WriteGlobalSno('a', line); } @@ -652,8 +652,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) ApplyModules(user); if (user) - user->SendText(":%s NOTICE %s :*** Successfully rehashed server.", - ServerInstance->Config->ServerName.c_str(), user->nick.c_str()); + user->WriteRemoteNotice("*** Successfully rehashed server."); ServerInstance->SNO->WriteGlobalSno('a', "*** Successfully rehashed server."); } -- cgit v1.2.3