From 0e524d82fd20cabf6f01f4a7fc4b9fbb64f9dd9a Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sat, 19 May 2012 16:19:35 +0200 Subject: m_alltime Use the dedicated function of the protocol interface to send notices to remote users --- src/modules/m_alltime.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_alltime.cpp') diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index fe2818d62..a93ec77cf 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -39,15 +39,15 @@ class CommandAlltime : public Command time_t now = ServerInstance->Time(); strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now)); - std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time is " + fmtdate + "(" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; + std::string msg = "System time is " + std::string(fmtdate) + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; if (IS_LOCAL(user)) { - user->Write(msg); + user->WriteServ("NOTICE %s :%s", user->nick.c_str(), msg.c_str()); } else { - ServerInstance->PI->PushToClient(user, ":" + msg); + ServerInstance->PI->SendUserNotice(user, msg); } /* we want this routed out! */ -- cgit v1.3.1-10-gc9f91