1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 01:03:13 +02:00

Fix globops logging if there is no predefined sender.

This commit is contained in:
Robby
2019-05-10 05:50:18 +02:00
parent af32a14fc1
commit 523a586176
2 changed files with 9 additions and 4 deletions
+3 -2
View File
@@ -677,8 +677,8 @@ log
#source = ""
/*
* The bot used to log generic messages which have no predefined sender if there
* is a channel in the target directive.
* The bot used to log generic messages which have no predefined sender if the
* target directive is set to a channel or globops.
*/
bot = "Global"
@@ -740,6 +740,7 @@ log
*/
log
{
bot = "Global"
target = "globops"
admin = "global/* operserv/chankill operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
servers = "squit"
+6 -2
View File
@@ -376,9 +376,13 @@ void LogInfo::ProcessMessage(const Log *l)
}
else if (target == "globops")
{
if (UplinkSock && l->bi && l->type <= LOG_NORMAL && Me && Me->IsSynced())
if (UplinkSock && l->type <= LOG_NORMAL && Me && Me->IsSynced())
{
IRCD->SendGlobops(l->bi, "%s", buffer.c_str());
BotInfo *bi = l->bi;
if (!bi)
bi = this->bot;
if (bi)
IRCD->SendGlobops(bi, "%s", buffer.c_str());
}
}
}