From 5a2a23c2f57c35e53d295a6dc9e69cd9c1487661 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Sun, 19 Aug 2012 03:18:31 +0000 Subject: utilize debug printer, and import Data::Dumper so that I don't have to do that all the time when using ;ev --- modules/command.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/command.pl') diff --git a/modules/command.pl b/modules/command.pl index ded53a5..3acaedd 100644 --- a/modules/command.pl +++ b/modules/command.pl @@ -1,8 +1,10 @@ package ASM::Commander; + use warnings; use strict; use IO::All; use POSIX qw(strftime); +use Data::Dumper; sub new { @@ -33,7 +35,7 @@ sub command next unless (grep {$_ eq $command->{flag}} split('', $::users->{person}->{$acct}->{flags})); #make sure the requester has the needed flags } if ($cmd=~/$command->{cmd}/) { - print strftime("%F %T ", gmtime) . "$event->{from} told me: $cmd \n"; + ASM::Util->dprint("$event->{from} told me: $cmd", "commander"); eval $command->{content}; warn $@ if $@; last; -- cgit v1.2.3