]> git.donarmstrong.com Git - infobot.git/blobdiff - src/modules.pl
* Fixed a bug that caused seen stats flush to crash related to sqlite not having...
[infobot.git] / src / modules.pl
index 1da1e1ecc7524ccad427ac204c03bdaf271d7904..3bb2bfa0057bd59d6374379a1aa5976321ff14d0 100644 (file)
@@ -7,7 +7,7 @@
 
 use strict;
 
-use vars qw($AUTOLOAD $no_timehires);
+use vars qw($AUTOLOAD $no_timehires $bot_version $bot_release);
 
 ###
 ### REQUIRED MODULES.
@@ -158,6 +158,13 @@ sub reloadAllModules {
 
     &VERB("Module: reloading all.",2);
 
+    # Reload version and save
+    open(VERSION,"<VERSION");
+    $bot_release = <VERSION> || "(unknown version)";
+    chomp($bot_release);
+    $bot_version    = "infobot $bot_release -- $^O";
+    close(VERSION);
+
     # obscure usage of map and regex :)
     foreach (map { s/.*?\/?src/src/; $_ } keys %moduleAge) {
        $retval .= &reloadModule($_);
@@ -347,3 +354,5 @@ sub getPerlFiles {
 }
 
 1;
+
+# vim:ts=4:sw=4:expandtab:tw=80