Check if the module already exists.
This commit is contained in:
1 parent
76571af1d3
commit
f8f7eca9c8
1 file changed
+7
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user