From e868892f519b65cd9963aa9580353a7c7c6bd34b Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Mon, 4 Apr 2011 15:31:30 -0600 Subject: [PATCH] Made slog() saner. --- doc/CHANGELOG | 1 + lib/API/Log.pm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 3737e18..408f3f6 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Made slog() saner. * Syntax for mod_init() changed. Package name is no longer required. * Added German translation to Greet help hash. - nridley * Added German translation to FML help hash. - nridley diff --git a/lib/API/Log.pm b/lib/API/Log.pm index 9ceefa8..4c059be 100644 --- a/lib/API/Log.pm +++ b/lib/API/Log.pm @@ -113,6 +113,9 @@ sub slog if (conf_get('logchan')) { # It is, continue. + # Don't even bother with continuing if there are *NO* connections. + if (!keys %Auto::SOCKET) { return } + # Split the network and channel. my ($net, $chan) = split m/[\/]/xsm, (conf_get('logchan'))[0][0]; $chan = lc $chan;