1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 23:06:38 +02:00

Added a new logging system

This commit is contained in:
Adam
2010-08-27 20:56:28 -04:00
parent 73fb94c553
commit c2ddecc2b1
119 changed files with 1516 additions and 1222 deletions
+6
View File
@@ -95,10 +95,13 @@ class CommandBSBot : public Command
if (!(bi = new BotInfo(nick, user, host, real)))
{
// XXX this cant happen?
notice_lang(Config->s_BotServ, u, BOT_BOT_CREATION_FAILED);
return MOD_CONT;
}
Log(LOG_ADMIN, u, this) << "ADD " << bi->GetMask() << " " << bi->realname;
notice_lang(Config->s_BotServ, u, BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi));
@@ -260,6 +263,7 @@ class CommandBSBot : public Command
}
notice_lang(Config->s_BotServ, u, BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
Log(LOG_ADMIN, u, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname;
FOREACH_MOD(I_OnBotChange, OnBotChange(bi));
return MOD_CONT;
@@ -294,6 +298,8 @@ class CommandBSBot : public Command
XLine x(bi->nick);
ircdproto->SendSQLineDel(&x);
Log(LOG_ADMIN, u, this) << "DEL " << bi->nick;
delete bi;
notice_lang(Config->s_BotServ, u, BOT_BOT_DELETED, nick.c_str());
return MOD_CONT;