From: dms Date: Mon, 2 Oct 2000 17:29:49 +0000 (+0000) Subject: minor change to reloadModule X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=af9a10a4b6fcb01c850aa8b8fd2fc441777fe9cc;p=infobot.git minor change to reloadModule git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@153 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/modules.pl b/src/modules.pl index 7924084..a27d492 100644 --- a/src/modules.pl +++ b/src/modules.pl @@ -192,6 +192,12 @@ sub reloadModule { my ($mod) = @_; my $file = (grep /\/$mod/, keys %INC)[0]; + # don't reload if it's not our module. + if ($mod =~ /::/ or $mod !~ /pl$/) { + &VERB("Not reloading $mod.",3); + return; + } + if (!defined $file) { &WARN("rM: Cannot reload $mod since it was not loaded anyway."); return;