]> git.donarmstrong.com Git - infobot.git/commitdiff
- load file if we enabled option on the fly before re-run.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 7 Apr 2001 12:07:06 +0000 (12:07 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 7 Apr 2001 12:07:06 +0000 (12:07 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@433 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/News.pl

index b93788d4f183e5e35c9523c77a3f69e049c91b4e..b2f8b119780c259430955192753454d0cbd7c98f 100644 (file)
@@ -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;