Check if the module already exists.

This commit is contained in:
Elijah Perrault committed 2011-02-01 21:23:41 -07:00
1 parent 76571af1d3
commit f8f7eca9c8
1 file changed
+7
+7
View File
@@ -47,6 +47,13 @@ sub cmd_modload
return 0;
}
# Check if the module is already loaded.
if (API::Std::mod_exists($argv[0])) {
notice($data{svr}, $data{nick}, "Module \002".$argv[0]."\002 is already loaded.");
return 0;
}
# Go for it!
my $tn = Auto::mod_load($argv[0]);
# Check if we were successful or not.