mirror of
https://github.com/anope/anope.git
synced 2026-07-07 01:23:13 +02:00
replaced the alog() command with a new type-safe and stream-based Alog()
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2777 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -96,7 +96,7 @@ class CommandCSAppendTopic : public Command
|
||||
c->topic_time = ci->last_topic_time;
|
||||
|
||||
if (!check_access(u, ci, CA_TOPIC))
|
||||
alog("%s: %s!%s@%s changed topic of %s as services admin.", Config.s_ChanServ, u->nick.c_str(), u->GetIdent().c_str(), u->host, c->name.c_str());
|
||||
Alog() << Config.s_ChanServ << ": " << u->GetMask() << " changed topic of " << c->name << " as services admin.";
|
||||
if (ircd->join2set)
|
||||
{
|
||||
if (whosends(ci) == findbot(Config.s_ChanServ))
|
||||
|
||||
@@ -59,8 +59,7 @@ class CommandCSEnforce : public Command
|
||||
if (!(ci = c->ci))
|
||||
return;
|
||||
|
||||
if (debug)
|
||||
alog("debug: cs_enforce: Enforcing SECUREOPS on %s", c->name.c_str());
|
||||
Alog(LOG_DEBUG) << "[cs_enforce] Enforcing SECUREOPS on " << c->name;
|
||||
|
||||
/* Dirty hack to allow chan_set_correct_modes to work ok.
|
||||
* We pretend like SECUREOPS is on so it doesn't ignore that
|
||||
@@ -98,8 +97,7 @@ class CommandCSEnforce : public Command
|
||||
if (!(ci = c->ci))
|
||||
return;
|
||||
|
||||
if (debug)
|
||||
alog("debug: cs_enforce: Enforcing RESTRICTED on %s", c->name.c_str());
|
||||
Alog(LOG_DEBUG) << "[cs_enforce] Enforcing RESTRICTED on " << c->name;
|
||||
|
||||
old_nojoin_level = ci->levels[CA_NOJOIN];
|
||||
if (ci->levels[CA_NOJOIN] < 0)
|
||||
@@ -131,8 +129,7 @@ class CommandCSEnforce : public Command
|
||||
if (!(ci = c->ci))
|
||||
return;
|
||||
|
||||
if (debug)
|
||||
alog("debug: cs_enforce: Enforcing mode +R on %s", c->name.c_str());
|
||||
Alog(LOG_DEBUG) << "[cs_enforce] Enforcing mode +R on " << c->name;
|
||||
|
||||
for (CUserList::iterator it = c->users.begin(); it != c->users.end();)
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ class CommandHSRequest : public Command
|
||||
|
||||
me->NoticeLang(Config.s_HostServ, u, LNG_REQUESTED);
|
||||
req_send_memos(u, vIdent, hostmask);
|
||||
alog("New vHost Requested by %s", nick);
|
||||
Alog() << "New vHost Requested by " << nick;
|
||||
}
|
||||
else
|
||||
notice_lang(Config.s_HostServ, u, HOST_NOREG, nick);
|
||||
@@ -223,7 +223,7 @@ class CommandHSActivate : public Command
|
||||
my_memo_lang(u, na->nick, 2, LNG_ACTIVATE_MEMO);
|
||||
|
||||
me->NoticeLang(Config.s_HostServ, u, LNG_ACTIVATED, nick);
|
||||
alog("Host Request for %s activated by %s", nick, u->nick.c_str());
|
||||
Alog() << "Host Request for " << nick << " activated by " << u->nick;
|
||||
}
|
||||
else
|
||||
me->NoticeLang(Config.s_HostServ, u, LNG_NO_REQUEST, nick);
|
||||
@@ -275,7 +275,7 @@ class CommandHSReject : public Command
|
||||
}
|
||||
|
||||
me->NoticeLang(Config.s_HostServ, u, LNG_REJECTED, nick);
|
||||
alog("Host Request for %s rejected by %s (%s)", nick, u->nick.c_str(), reason ? reason : "");
|
||||
Alog() << "Host Request for " << nick << " rejected by " << u->nick << " (" << (reason ? reason : "") << ")";
|
||||
}
|
||||
else
|
||||
me->NoticeLang(Config.s_HostServ, u, LNG_NO_REQUEST, nick);
|
||||
@@ -762,7 +762,7 @@ void my_memo_lang(User *u, const char *name, int z, int number, ...)
|
||||
delete [] buf;
|
||||
}
|
||||
else
|
||||
alog("%s: INVALID language string call, language: [%d], String [%d]", me->name.c_str(), lang, number);
|
||||
Alog() << me->name << ": INVALID language string call, language: [" << lang << "], String [" << number << "]";
|
||||
}
|
||||
|
||||
void req_send_memos(User *u, char *vIdent, char *vHost)
|
||||
@@ -819,8 +819,7 @@ void my_load_config()
|
||||
HSRequestMemoOper = config.ReadFlag("hs_request", "memooper", "no", 0);
|
||||
HSRequestMemoSetters = config.ReadFlag("hs_request", "memosetters", "no", 0);
|
||||
|
||||
if (debug)
|
||||
alog("debug: [hs_request] Set config vars: MemoUser=%d MemoOper=%d MemoSetters=%d", HSRequestMemoUser, HSRequestMemoOper, HSRequestMemoSetters);
|
||||
Alog(LOG_DEBUG) << "[hs_request] Set config vars: MemoUser=" << HSRequestMemoUser << " MemoOper=" << HSRequestMemoOper << " MemoSetters=" << HSRequestMemoSetters;
|
||||
}
|
||||
|
||||
MODULE_INIT(HSRequest)
|
||||
|
||||
@@ -166,9 +166,7 @@ void my_load_config()
|
||||
{
|
||||
ConfigReader config;
|
||||
NSEmailMax = config.ReadInteger("ns_maxemail", "maxemails", "0", 0, false);
|
||||
|
||||
if (debug)
|
||||
alog("debug: [ns_maxemail] NSEmailMax set to %d", NSEmailMax);
|
||||
Alog(LOG_DEBUG) << "[ns_maxemail] NSEmailMax set to " << NSEmailMax;
|
||||
}
|
||||
|
||||
MODULE_INIT(NSMaxEmail)
|
||||
|
||||
@@ -72,8 +72,8 @@ class NSNOOPConvert : public Module
|
||||
|
||||
mLoadData();
|
||||
|
||||
alog("ns_noop_convert: Your auto-op database has been converted and this module will now");
|
||||
alog("ns_noop_convert: unload itself. You can now remove this module from your config");
|
||||
Alog() << "ns_noop_convert: Your auto-op database has been converted and this module will now";
|
||||
Alog() << "ns_noop_convert: unload itself. You can now remove this module from your config";
|
||||
}
|
||||
|
||||
~NSNOOPConvert()
|
||||
@@ -102,7 +102,7 @@ int mLoadData()
|
||||
/* will _never_ be this big thanks to the 512 limit of a message */
|
||||
char buffer[2000];
|
||||
if ((in = fopen(NSAutoOPDBName, "r")) == NULL) {
|
||||
alog("ns_noop: WARNING: Can not open database file! (it might not exist, this is not fatal)");
|
||||
Alog() << "ns_noop: WARNING: Can not open database file! (it might not exist, this is not fatal)";
|
||||
ret = 1;
|
||||
} else {
|
||||
while (fgets(buffer, 1500, in)) {
|
||||
@@ -138,11 +138,10 @@ int mLoadConfig(int argc, char **argv)
|
||||
NSAutoOPDBName = sstrdup(tmp.c_str());
|
||||
|
||||
if (tmp.empty()) {
|
||||
alog("ns_noop: FATAL: Can't read required configuration directives!");
|
||||
Alog() << "ns_noop: FATAL: Can't read required configuration directives!";
|
||||
return MOD_STOP;
|
||||
} else {
|
||||
alog("ns_noop: Directive NSAutoOPDBName loaded (%s)...",
|
||||
NSAutoOPDBName);
|
||||
Alog() << "ns_noop: Directive NSAutoOPDBName loaded (" << NSAutoOPDBName << ")...";
|
||||
}
|
||||
|
||||
return MOD_CONT;
|
||||
|
||||
Reference in New Issue
Block a user