From cae3f191a8bbf489a17433f4f8b4371be426819a Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Tue, 22 Feb 2011 21:18:27 -0700 Subject: [PATCH] Initialize the on_part event. --- lib/Parser/IRC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Parser/IRC.pm b/lib/Parser/IRC.pm index b847847..5c5ce10 100644 --- a/lib/Parser/IRC.pm +++ b/lib/Parser/IRC.pm @@ -42,6 +42,7 @@ API::Std::event_add("on_ucjoin"); API::Std::event_add("on_kick"); API::Std::event_add("on_nick"); API::Std::event_add("on_notice"); +API::Std::event_add('on_part'); API::Std::event_add("on_cprivmsg"); API::Std::event_add("on_uprivmsg"); API::Std::event_add("on_quit"); @@ -456,7 +457,7 @@ sub mode sub nick { my ($svr, ($uex, undef, $nex)) = @_; - $nex = substr($nex, 1); + $nex =~ s/^://gxsm; my %src = API::IRC::usrc(substr($uex, 1));