summaryrefslogtreecommitdiff
path: root/modules/protocol/unreal.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-01-23 12:35:14 -0500
committerAdam <Adam@anope.org>2017-01-23 12:35:14 -0500
commit16ca76c2e7ab287e480185fbb03a0bb438351eda (patch)
treedfb25534afa2352b65b2ee707086cb5eecc96fbb /modules/protocol/unreal.cpp
parentff030c1eb7c3764f9add2a689479e84d616cabcb (diff)
Make log system use newer format strings
Also allow log messages to be translatable
Diffstat (limited to 'modules/protocol/unreal.cpp')
-rw-r--r--modules/protocol/unreal.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index f319268b7..fd6e31875 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -58,7 +58,8 @@ void unreal::senders::Akill::Send(User* u, XLine* x)
old->GetManager()->AddXLine(xl);
x = xl;
- Log(Config->GetClient("OperServ"), "akill") << "AKILL: Added an akill for " << x->GetMask() << " because " << u->GetMask() << "#" << u->realname << " matches " << old->GetMask();
+ Anope::Logger.Bot("OperServ").Category("akill").Log(_("AKILL: Added an akill for {0} because {1}#{2} matches {3}"),
+ x->GetMask(), u->GetMask(), u->realname, old->GetMask());
}
/* ZLine if we can instead */
@@ -731,7 +732,7 @@ void unreal::Nick::Run(MessageSource &source, const std::vector<Anope::string> &
Server *s = Server::Find(params[5]);
if (s == NULL)
{
- Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[5] << "?";
+ Anope::Logger.Debug("User {0} introduced from non-existent server {1}", params[0], params[5]);
return;
}
@@ -912,7 +913,7 @@ void unreal::SJoin::Run(MessageSource &source, const std::vector<Anope::string>
rfc1459::Join::SJoinUser sju;
/* Get prefixes from the nick */
- for (char ch; (ch = ModeManager::GetStatusChar(buf[0]));)
+ for (char ch; !buf.empty() && (ch = ModeManager::GetStatusChar(buf[0]));)
{
sju.first.AddMode(ch);
buf.erase(buf.begin());
@@ -921,7 +922,7 @@ void unreal::SJoin::Run(MessageSource &source, const std::vector<Anope::string>
sju.second = User::Find(buf);
if (!sju.second)
{
- Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1];
+ Anope::Logger.Debug("SJOIN for non-existent user {0} on {1}", buf, params[1]);
continue;
}