X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;ds=inline;f=Commands%2FDef.pm;fp=Commands%2FDef.pm;h=7931033e2f6ddd1ba1cf1b04372dff5bb5fbaef0;hb=565ece6e27fa54253934518cc8c69ecfac9487e4;hp=0000000000000000000000000000000000000000;hpb=5eb5c4a1f761abfb857f55ae8d86d8f4462a29b1;p=NDIRC.git diff --git a/Commands/Def.pm b/Commands/Def.pm new file mode 100644 index 0000000..7931033 --- /dev/null +++ b/Commands/Def.pm @@ -0,0 +1,43 @@ +#************************************************************************** +# Copyright (C) 2009 by Michael Andreen * +# * +# This program is free software; you can redistribute it and/or modify * +# it under the terms of the GNU General Public License as published by * +# the Free Software Foundation; either version 2 of the License, or * +# (at your option) any later version. * +# * +# This program is distributed in the hope that it will be useful, * +# but WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# GNU General Public License for more details. * +# * +# You should have received a copy of the GNU General Public License * +# along with this program; if not, write to the * +# Free Software Foundation, Inc., * +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * +#**************************************************************************/ + +package NDIRC::Commands::Def; + +use strict; +use warnings; +use feature ':5.10'; + +use Moose; +use MooseX::MethodAttributes; + +sub anon + : Help(syntax: .anon nick message) + : Type(def) + : ACL(irc_anondef) +{ + my ($self,$c,$msg) = @_; + + my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS'; + + $c->message("msg $target", "$mess"); + $c->message("msg ".$c->channel, "$target << $mess"); +} + +1; +