summaryrefslogtreecommitdiffstats
path: root/lib/ASM/Services.pm
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-01-14 15:00:46 -0700
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-01-14 15:00:46 -0700
commit5d92725043195ba4ad9831b3489d65738b794d29 (patch)
tree64ba59b6c676f21f3ea9aa3572badda00626e811 /lib/ASM/Services.pm
parent8ff9ba40fcbfc00260466509c4cbb95d43f8b682 (diff)
Register services-processing handler inside the services module, rather than having it be called by the Event module
Diffstat (limited to 'lib/ASM/Services.pm')
-rw-r--r--lib/ASM/Services.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ASM/Services.pm b/lib/ASM/Services.pm
index 7e1df9d..b44b194 100644
--- a/lib/ASM/Services.pm
+++ b/lib/ASM/Services.pm
@@ -9,13 +9,17 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
sub new
{
+ my $module = shift;
+ my ($conn) = @_;
my $self = {};
+ $self->{CONN} = $conn;
bless($self);
+ $conn->add_handler('notice', \&doServices, "after");
return $self;
}
sub doServices {
- my ($self, $conn, $event) = @_;
+ my ($conn, $event) = @_;
my $i = 1;
if ($event->{from} eq 'NickServ!NickServ@services.')
{