ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/irc.ext
(Generate patch)

Comparing deliantra/server/ext/irc.ext (file contents):
Revision 1.21 by root, Sat Nov 10 03:43:01 2012 UTC vs.
Revision 1.22 by root, Sun Nov 11 02:38:10 2012 UTC

1#! perl 1#! perl
2 2
3use Time::HiRes;
4use AnyEvent::IRC::Client; 3use AnyEvent::IRC::Client;
5use AnyEvent::IRC::Util qw/filter_colors/; 4use AnyEvent::IRC::Util qw/filter_colors/;
6 5
7# requires: commands.ext 6# requires: commands.ext
8 7
103 $CON->reg_cb ( 102 $CON->reg_cb (
104 irc_privmsg => sub { 103 irc_privmsg => sub {
105 my ($con, $msg) = @_; 104 my ($con, $msg) = @_;
106 my $name = 'irc'; 105 my $name = 'irc';
107 my $nick = AnyEvent::IRC::Util::prefix_nick ($msg); 106 my $nick = AnyEvent::IRC::Util::prefix_nick ($msg);
108 my $NOW = Time::HiRes::time; 107 my $NOW = EV::time;
109 108
110 my $tmsg = filter_colors ($msg->{params}->[-1]); 109 my $tmsg = filter_colors ($msg->{params}->[-1]);
111 $tmsg =~ s/\x01[^\x01]*\x01//g; 110 $tmsg =~ s/\x01[^\x01]*\x01//g;
112 $tmsg =~ s/\015?\012/ /g; 111 $tmsg =~ s/\015?\012/ /g;
113 112

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines