X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Context.pm;h=02aac95a7ba84819a49e6713acc7c241bec48d85;hp=abe59b24cf538b477f794153241a11649a1865b7;hb=e8c94cdebefdc428ea92fde6db63f18d3e8399b2;hpb=1ccb344994c1b517c662da9f236cf1c640780177 diff --git a/Context.pm b/Context.pm index abe59b2..02aac95 100644 --- a/Context.pm +++ b/Context.pm @@ -97,16 +97,23 @@ sub check_user_roles { sub reply { my ($self,$msg) = @_; - $self->message($self->reply_string , $msg); + my @command = split / /, $self->reply_string; + $self->message(@command, $msg); } sub message { - my ($self,$command,$msg) = @_; + my ($self,$command, $target, $msg) = @_; $msg =~ s`(.*?)`${\(chr(2))}$1${\(chr(15))}`gi; $msg =~ s`(.*?)`${\(chr(3))}$1$2${\(chr(15))}`gi; - $self->server->command("$command $msg"); + $self->command($command, $target, $msg); +} + +sub command { + my ($self,@command) = @_; + + $self->server->yield(@command); } sub intel_log {