]> git.donarmstrong.com Git - infobot.git/blobdiff - src/modules.pl
* Security patch for binmode UTF8 handling for CVE-2007-5116
[infobot.git] / src / modules.pl
index 1da1e1ecc7524ccad427ac204c03bdaf271d7904..47389d8bd49d6d9189e2a3246fba38484954ba4e 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.
@@ -157,6 +157,13 @@ sub reloadAllModules {
     my $retval = '';
 
     &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) {
@@ -347,3 +354,5 @@ sub getPerlFiles {
 }
 
 1;
+
+# vim:ts=4:sw=4:expandtab:tw=80