Skip to content
Permalink
Browse files

Fix globops logging if there is no predefined sender.

  • Loading branch information...
Robby- committed May 10, 2019
1 parent af32a14 commit 523a5861763a1d453ae68fa25eb8bafdaa5853b4
Showing with 9 additions and 4 deletions.
  1. +3 −2 data/example.conf
  2. +6 −2 src/logger.cpp
@@ -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"
@@ -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());
}
}
}

0 comments on commit 523a586

Please sign in to comment.
You can’t perform that action at this time.