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.15 by elmex, Sun Jan 25 17:36:42 2009 UTC vs.
Revision 1.17 by elmex, Fri Jun 26 16:02:15 2009 UTC

68 68
69sub check_connection { 69sub check_connection {
70 return if $CON; 70 return if $CON;
71 71
72 $CON = AnyEvent::IRC::Client->new; 72 $CON = AnyEvent::IRC::Client->new;
73 $CON->set_exception_cb (sub {
74 my ($exp, $ev) = @_;
75 warn "IRC: IRC EXCEPTION (event $ev): $exp\n";
76 });
73 $CON->connect ($BOTSERVER, $BOTPORT, { 77 $CON->connect ($BOTSERVER, $BOTPORT, {
74 nick => $BOTNAME, 78 nick => $BOTNAME,
75 user => $BOTNAME, 79 user => $BOTNAME,
76 real => 'deliantra server' 80 real => 'deliantra server'
77 }); 81 });
97 ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW } cf::player::list; 101 ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW } cf::player::list;
98 cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", "$name/$nick", $tmsg; 102 cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", "$name/$nick", $tmsg;
99 } 103 }
100 }, 104 },
101 connect => sub { 105 connect => sub {
106 my ($con, $error) = @_;
107
108 if ($error) {
109 warn "IRC: CONNECT ERROR to IRC server: $BOTSERVER:$BOTPORT: $error\n";
110 undef $CON;
111
112 } else {
102 warn "IRC: connected to IRC server: $BOTSERVER:$BOTPORT\n"; 113 warn "IRC: connected to IRC server: $BOTSERVER:$BOTPORT\n";
114 }
103 }, 115 },
104 registered => sub { 116 registered => sub {
105 warn "IRC: successfully logged into IRC server: $BOTSERVER:$BOTPORT\n"; 117 warn "IRC: successfully logged into IRC server: $BOTSERVER:$BOTPORT\n";
106 }, 118 },
107 error => sub { 119 error => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines