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.17 by elmex, Fri Jun 26 16:02:15 2009 UTC vs.
Revision 1.18 by root, Tue Jan 5 08:35:25 2010 UTC

6 6
7# requires: commands.ext 7# requires: commands.ext
8 8
9return unless exists $cf::CFG{irc_server}; 9return unless exists $cf::CFG{irc_server};
10 10
11my $BOTSERVER = $cf::CFG{irc_server} || "localhost"; 11our $BOTSERVER = $cf::CFG{irc_server};
12my $BOTPORT = $cf::CFG{irc_port} || 6667; 12our $BOTPORT = $cf::CFG{irc_port};
13my $BOTNAME = $cf::CFG{irc_nick} || "server"; 13our $BOTNAME = $cf::CFG{irc_nick};
14my $BOTCHAN = $cf::CFG{irc_chan} || "cf"; 14our $BOTCHAN = $cf::CFG{irc_chan};
15 15
16my $CON; # the connection 16our $CON; # the connection
17 17
18sub unload { 18sub unload {
19 $CON->disconnect if $CON; 19 $CON->disconnect if $CON;
20 undef $CON; 20 undef $CON;
21} 21}
126 undef $CON; 126 undef $CON;
127 } 127 }
128 ); 128 );
129} 129}
130 130
131our $RECONNECT = cf::periodic 30, Coro::unblock_sub { 131our $RECONNECT = length $BOTSERVER && cf::periodic 30, Coro::unblock_sub {
132 check_connection; 132 check_connection;
133}; 133};
134 134

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines