From: dms Date: Sat, 7 Apr 2001 12:07:06 +0000 (+0000) Subject: - load file if we enabled option on the fly before re-run. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e543c294e1dad7d18e75e80f131f07d127acd950;p=infobot.git - load file if we enabled option on the fly before re-run. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@433 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Modules/News.pl b/blootbot/src/Modules/News.pl index b93788d..b2f8b11 100644 --- a/blootbot/src/Modules/News.pl +++ b/blootbot/src/Modules/News.pl @@ -21,6 +21,15 @@ sub Parse { my($what) = @_; $chan = undef; + if (!keys %::news) { + if (!exists $cache{newsFirst}) { + &::DEBUG("looks like we enabled news option just then; loading up news file just in case."); + $cache{newsFirst} = 1; + } + + &readNews(); + } + if ($::msgType eq "private") { } else { $chan = $::chan;