mirror of
https://github.com/anope/anope.git
synced 2026-06-30 19:06:38 +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:
+10
-14
@@ -127,7 +127,7 @@ static void ReadDatabase(Module *m = NULL)
|
||||
}
|
||||
catch (const char *err)
|
||||
{
|
||||
alog("[db_plain}: %s", err);
|
||||
Alog() << "[db_plain}: " << err;
|
||||
}
|
||||
}
|
||||
else if (na && Type == MD_NA)
|
||||
@@ -143,7 +143,7 @@ static void ReadDatabase(Module *m = NULL)
|
||||
}
|
||||
catch (const char *err)
|
||||
{
|
||||
alog("[db_plain}: %s", err);
|
||||
Alog() << "[db_plain}: " << err;
|
||||
}
|
||||
}
|
||||
else if (bi && Type == MD_BI)
|
||||
@@ -159,7 +159,7 @@ static void ReadDatabase(Module *m = NULL)
|
||||
}
|
||||
catch (const char *err)
|
||||
{
|
||||
alog("[db_plain}: %s", err);
|
||||
Alog() << "[db_plain}: " << err;
|
||||
}
|
||||
}
|
||||
else if (ci && Type == MD_CH)
|
||||
@@ -175,7 +175,7 @@ static void ReadDatabase(Module *m = NULL)
|
||||
}
|
||||
catch (const char *err)
|
||||
{
|
||||
alog("[db_plain}: %s", err);
|
||||
Alog() << "[db_plain}: " << err;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,8 +397,7 @@ static void LoadNickCore(const std::vector<std::string> ¶ms)
|
||||
nc->memos.memomax = atoi(params[3].c_str());
|
||||
nc->channelcount = atoi(params[4].c_str());
|
||||
|
||||
if (debug > 1)
|
||||
alog("[db_plain]: Loaded NickCore %s", nc->display);
|
||||
Alog(LOG_DEBUG_2) << "[db_plain]: Loaded NickCore " << nc->display;
|
||||
}
|
||||
|
||||
static void LoadNickAlias(const std::vector<std::string> ¶ms)
|
||||
@@ -406,7 +405,7 @@ static void LoadNickAlias(const std::vector<std::string> ¶ms)
|
||||
NickCore *nc = findcore(params[0].c_str());
|
||||
if (!nc)
|
||||
{
|
||||
alog("[db_plain]: Unable to find core %s", params[0].c_str());
|
||||
Alog() << "[db_plain]: Unable to find core " << params[0];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -416,8 +415,7 @@ static void LoadNickAlias(const std::vector<std::string> ¶ms)
|
||||
|
||||
na->last_seen = strtol(params[3].c_str(), NULL, 10);
|
||||
|
||||
if (debug > 1)
|
||||
alog("[db_plain}: Loaded nickalias for %s", na->nick);
|
||||
Alog(LOG_DEBUG_2) << "[db_plain}: Loaded nickalias for " << na->nick;
|
||||
}
|
||||
|
||||
static void LoadBotInfo(const std::vector<std::string> ¶ms)
|
||||
@@ -429,8 +427,7 @@ static void LoadBotInfo(const std::vector<std::string> ¶ms)
|
||||
bi->chancount = atol(params[5].c_str());
|
||||
bi->real = sstrdup(params[6].c_str());
|
||||
|
||||
if (debug > 1)
|
||||
alog("[db_plain]: Loaded botinfo for %s", bi->nick.c_str());
|
||||
Alog(LOG_DEBUG_2) << "[db_plain]: Loaded botinfo for " << bi->nick;
|
||||
}
|
||||
|
||||
static void LoadChanInfo(const std::vector<std::string> ¶ms)
|
||||
@@ -450,8 +447,7 @@ static void LoadChanInfo(const std::vector<std::string> ¶ms)
|
||||
|
||||
ci->memos.memomax = atoi(params[4].c_str());
|
||||
|
||||
if (debug > 1)
|
||||
alog("[db_plain]: loaded channel %s", ci->name.c_str());
|
||||
Alog(LOG_DEBUG_2) << "[db_plain]: loaded channel " << ci->name;
|
||||
}
|
||||
|
||||
static void LoadOperInfo(const std::vector<std::string> ¶ms)
|
||||
@@ -651,7 +647,7 @@ class DBPlain : public Module
|
||||
ci->founder = findcore(params[0].c_str());
|
||||
if (!ci->founder)
|
||||
{
|
||||
alog("[db_plain]: Deleting founderless channel %s", ci->name.c_str());
|
||||
Alog() << "[db_plain]: Deleting founderless channel " << ci->name;
|
||||
delete ci;
|
||||
ci = NULL;
|
||||
throw "no founder";
|
||||
|
||||
Reference in New Issue
Block a user