diff options
author | Adam <Adam@anope.org> | 2017-01-23 12:35:14 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-01-23 12:35:14 -0500 |
commit | 16ca76c2e7ab287e480185fbb03a0bb438351eda (patch) | |
tree | dfb25534afa2352b65b2ee707086cb5eecc96fbb /modules/botserv/bot.cpp | |
parent | ff030c1eb7c3764f9add2a689479e84d616cabcb (diff) |
Make log system use newer format strings
Also allow log messages to be translatable
Diffstat (limited to 'modules/botserv/bot.cpp')
-rw-r--r-- | modules/botserv/bot.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/botserv/bot.cpp b/modules/botserv/bot.cpp index 082bd6337..4eb5d2069 100644 --- a/modules/botserv/bot.cpp +++ b/modules/botserv/bot.cpp @@ -103,7 +103,7 @@ class CommandBSBot : public Command bi->bi = botinfo; botinfo->bot = bi; - Log(LOG_ADMIN, source, this) << "ADD " << bi->GetMask() << " " << bi->realname; + logger.Command(LogType::ADMIN, source, _("{source} used {command} to add bot {0} {1}"), bi->GetMask(), bi->realname); source.Reply(_("\002{0}!{1}@{2}\002 (\002{3}\002) added to the bot list."), bi->nick, bi->GetIdent(), bi->host, bi->realname); @@ -266,8 +266,10 @@ class CommandBSBot : public Command if (!user.empty()) bi->OnKill(); + logger.Command(LogType::ADMIN, source, _("{source} used {command} to change bot {0} to {1} {2}"), + oldnick, bi->GetMask(), bi->realname); + source.Reply(_("Bot \002{0}\002 has been changed to \002{1}!{2}@{3}\002 (\002{4}\002)."), oldnick, bi->nick, bi->GetIdent(), bi->host, bi->realname); - Log(LOG_ADMIN, source, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname; EventManager::Get()->Dispatch(&Event::BotChange::OnBotChange, bi); } @@ -297,7 +299,7 @@ class CommandBSBot : public Command EventManager::Get()->Dispatch(&Event::BotDelete::OnBotDelete, bi); - Log(LOG_ADMIN, source, this) << "DEL " << bi->nick; + logger.Command(LogType::ADMIN, source, _("{source} used {command} to delete bot {0}"), bi->nick); source.Reply(_("Bot \002{0}\002 has been deleted."), bi->nick); delete bi; |