From 523a5861763a1d453ae68fa25eb8bafdaa5853b4 Mon Sep 17 00:00:00 2001 From: Robby Date: Fri, 10 May 2019 05:50:18 +0200 Subject: Fix globops logging if there is no predefined sender. --- src/logger.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/logger.cpp') diff --git a/src/logger.cpp b/src/logger.cpp index 011b13e63..f06112eb6 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -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()); } } } -- cgit