diff options
author | doy <doy@tozt.net> | 2009-01-25 16:30:50 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-25 16:30:50 -0500 |
commit | 9fa5864411552ce62cfa0fb1fc09e2cdb1c16413 (patch) | |
tree | 129acac54ea38657f8019710a731fe99489dc1bb /lib/Bot/Games.pm | |
parent | b0284c94c5793008bb7ca6381090f31b0c69b40d (diff) | |
download | bot-games-9fa5864411552ce62cfa0fb1fc09e2cdb1c16413.tar.gz bot-games-9fa5864411552ce62cfa0fb1fc09e2cdb1c16413.zip |
allow passing more information to say (to allow plugins to send private messages, for instance)
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r-- | lib/Bot/Games.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index e53900b..f8a0284 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -40,7 +40,11 @@ sub said { my $self = shift; my ($args) = @_; my $prefix = $self->prefix; - my $say = sub { shift; $self->say(%$args, body => $self->_format(@_)) }; + my $say = sub { + shift; + return $self->say(%$args, body => $self->_format(@_)) if @_ == 1; + return $self->say(%$args, @_); + }; return if $args->{channel} eq 'msg'; return unless $args->{body} =~ /^$prefix(\w+)(?:\s+(.*))?/; |