summaryrefslogtreecommitdiffstats
path: root/modules/command.pl
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-29 02:21:38 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-29 02:21:38 +0000
commitf52c9bd6e6e018ff0c45f1dea4ded2aeb4ae1427 (patch)
tree395c0133072d89da4a936e0a180e836997c1cb56 /modules/command.pl
parent6907da0a5da3d45a91c3ac4893e5b890200b27eb (diff)
lots of modularization done, needs testing and is unstable
Diffstat (limited to 'modules/command.pl')
-rw-r--r--modules/command.pl19
1 files changed, 12 insertions, 7 deletions
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;