aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_alltime.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2012-05-19 16:19:35 +0200
committerGravatar attilamolnar2012-05-19 16:19:35 +0200
commit0e524d82fd20cabf6f01f4a7fc4b9fbb64f9dd9a (patch)
tree718f0fd04c0d7b9b673b6ad22f92f16b329b8c15 /src/modules/m_alltime.cpp
parentm_callerid Fix module sending no metadata due to not being attached to approp... (diff)
m_alltime Use the dedicated function of the protocol interface to send notices to remote users
Diffstat (limited to 'src/modules/m_alltime.cpp')
-rw-r--r--src/modules/m_alltime.cpp6
1 files changed, 3 insertions, 3 deletions
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! */