X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ndawn.pl;h=d805d75fe8685748dc26f6da1aaa253bfc17cc6b;hb=df43148278c85c28726accbec2421688260661b7;hp=76fca28c3d6899574ffaeecae66831cee0004f25;hpb=491db8f0abea3c779a1ecdc64f22ed233bc9546b;p=NDIRC.git diff --git a/ndawn.pl b/ndawn.pl index 76fca28..d805d75 100644 --- a/ndawn.pl +++ b/ndawn.pl @@ -1,5 +1,5 @@ #************************************************************************** -# Copyright (C) 2008 by Michael Andreen * +# 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 * @@ -66,6 +66,17 @@ sub event_pubmsg { my ($server, $msg, $nick, $address, $channel) = @_; eval { + if ($msg =~ /^(\S+): (.+)$/ && $disp->has_command('anon',$channel)){ + my $_ = $1; + my $text = $2; + my $channel = $server->channel_find($channel); + my $nick = $channel->nick_find($1); + unless ($nick || /(Constructing|Researching)/){ + print ".anon $_ $text"; + $msg = ".anon $_ $text"; + } + + } if (parseCommand($msg,$server,$nick,$address,$channel,$disp,DB())){ #Command parsed and run successfully }