[Turn on line numbering]
arg template, method;
var cmd, c, d, info, type;
(> .perms(sender()) <);
cmd = template.explode();
if (!cmd)
throw(~type, "Invalid template.");
cmd = cmd[1];
info = #[['local, .get_command_info('local, cmd)]];
info = info.add('remote, .get_command_info('remote, cmd));
for type in (info) {
for c in (type[2]) {
if (c[3] == template && c[4] == method) {
set_var(type[1], get_var(type[1]).del_elem(cmd, c));
if (type[1] == 'remote)
$remote_cache.del_remote_command(cmd, this());
d++;
}
}
}
return d;
["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]