]> ruin.nu Git - NDIRC.git/blobdiff - Misc.pm
Need to send a real value to execute when the role isn't available
[NDIRC.git] / Misc.pm
diff --git a/Misc.pm b/Misc.pm
index 74159ac9e3461b421abf763f745951455141758c..aad40e3c36aa5f9fcfb1c5a448a87ce55d61145f 100644 (file)
--- a/Misc.pm
+++ b/Misc.pm
@@ -27,7 +27,7 @@ use NDIRC::Context;
 
 our @ISA = qw/Exporter/;
 
-our @EXPORT = qw/valuecolor parseCommand/;
+our @EXPORT = qw/valuecolor/;
 
 sub valuecolor {
        my $s = $_;
@@ -40,38 +40,5 @@ sub valuecolor {
        return $s;
 }
 
-sub parseCommand {
-       my ($msg, $server, $nick, $address, $channel, $disp,$model) = @_;
-
-       my ($p,$command,$args) = ($msg =~ /^([.!~])(\S+)(?: (.+))?/) or return 0;
-
-       return 0 unless $disp->has_command($command,$channel);
-
-       my $reply_string;
-       given ($p){
-               when ('!'){
-                       $reply_string = "msg $nick ";
-               }
-               when ('~'){
-                       $reply_string = "msg $channel ";
-               }
-               default {
-                       $reply_string = "notice $nick ";
-               }
-       }
-
-       $address =~ s/.*@(.*)/$1/;
-       my $c = NDIRC::Context->new({
-                       host => $address,
-                       nick => $nick,
-                       channel => $channel,
-                       disp => $disp,
-                       model => $model,
-                       server => $server,
-                       reply_string => $reply_string,
-               });
-
-       return $disp->run_command($c,$command,$args);
-}
 
 1;