Regex is a bad idea for this.

This commit is contained in:
Elijah Perrault committed 2011-04-20 20:56:02 -06:00
1 parent a2002882d6
commit 362310b863
1 file changed
+1 -1
+1 -1
View File
@@ -630,7 +630,7 @@ sub privmsg {
# Ensure it's a valid length.
if (length($ex[3]) > 2) {
$cmd = uc substr $ex[3], 1;
$cmd =~ s/^$cprefix//xsm;
if (substr($cmd, 0, 1) eq $cprefix) { $cmd = substr $cmd, 1 }
if (defined $API::Std::CMDS{$cmd}) {
# If this is indeed a command, continue.
if ($API::Std::CMDS{$cmd}{lvl} == 1 or $API::Std::CMDS{$cmd}{lvl} == 2) {