From f52c9bd6e6e018ff0c45f1dea4ded2aeb4ae1427 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Fri, 29 Jun 2007 02:21:38 +0000 Subject: lots of modularization done, needs testing and is unstable --- modules/command.pl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'modules/command.pl') diff --git a/modules/command.pl b/modules/command.pl index fe299fd..80cda19 100644 --- a/modules/command.pl +++ b/modules/command.pl @@ -1,9 +1,18 @@ +package ASM::Commander; use warnings; use strict; -sub do_command +sub new { - my ($conn, $event) = @_; + my $module = shift; + my $self = {}; + bless($self); + return $self; +} + +sub command +{ + my ($self, $conn, $event) = @_; my $args = $event->{args}->[0]; my $from = $event->{from}; my $cmd = $args; @@ -35,8 +44,4 @@ sub do_command } } -sub Command::killsub { - undef &do_command; -} - -return 1; +1; -- cgit v1.2.3