[pastebot-cvs] pastebot/Client IRC.pm,1.13,1.14
Status: Beta
Brought to you by:
rcaputo
From: <rc...@us...> - 2003-11-13 23:59:38
|
Update of /cvsroot/pastebot/pastebot/Client In directory sc8-pr-cvs1:/tmp/cvs-serv21401/Client Modified Files: IRC.pm Log Message: Channel management functions did not take into account that the bot may be on multiple networks at once. Add network differentiation to the bot's database, IRC client, and web server. Index: IRC.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Client/IRC.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** IRC.pm 13 Nov 2003 05:01:27 -0000 1.13 --- IRC.pm 13 Nov 2003 23:59:34 -0000 1.14 *************** *** 173,177 **** } else { ! @igchans = map lc, channels(); } # only the channels the user is an operator on --- 173,177 ---- } else { ! @igchans = map lc, channels($conf{name}); } # only the channels the user is an operator on *************** *** 376,380 **** my ($nick) = $who =~ /^([^!]+)/; if (lc ($nick) eq lc($heap->{my_nick})) { ! add_channel($where); $kernel->post( $server => who => $where ); } --- 376,380 ---- my ($nick) = $who =~ /^([^!]+)/; if (lc ($nick) eq lc($heap->{my_nick})) { ! add_channel($conf{name}, $where); $kernel->post( $server => who => $where ); } *************** *** 389,393 **** delete $heap->{users}{$where}{$nick}; if (lc($nick) eq lc($heap->{my_nick})) { ! remove_channel($where); delete $heap->{users}{$where}; } --- 389,393 ---- delete $heap->{users}{$where}{$nick}; if (lc($nick) eq lc($heap->{my_nick})) { ! remove_channel($conf{name}, $where); delete $heap->{users}{$where}; } *************** *** 431,435 **** if ($_ eq "o") { if ($set eq "+") { ! $heap->{users}{$location}{$target}{mode} .= "@" unless $heap->{users}{$location}{$target}{mode} =~ /\@/; } --- 431,435 ---- if ($_ eq "o") { if ($set eq "+") { ! $heap->{users}{$location}{$target}{mode} .= '@' unless $heap->{users}{$location}{$target}{mode} =~ /\@/; } *************** *** 450,454 **** my ($kernel, $heap, $server) = @_[KERNEL, HEAP, ARG0]; print "Lost connection to server $server.\n"; ! clear_channels(); delete $heap->{users}; $kernel->delay( connect => 60 ); --- 450,454 ---- my ($kernel, $heap, $server) = @_[KERNEL, HEAP, ARG0]; print "Lost connection to server $server.\n"; ! clear_channels($conf{name}); delete $heap->{users}; $kernel->delay( connect => 60 ); *************** *** 458,462 **** my ($kernel, $heap, $error) = @_[KERNEL, HEAP, ARG0]; print "Server error occurred: $error\n"; ! clear_channels(); delete $heap->{users}; $kernel->delay( connect => 60 ); --- 458,462 ---- my ($kernel, $heap, $error) = @_[KERNEL, HEAP, ARG0]; print "Server error occurred: $error\n"; ! clear_channels($conf{name}); delete $heap->{users}; $kernel->delay( connect => 60 ); *************** *** 466,470 **** my ($kernel, $heap, $error) = @_[KERNEL, HEAP, ARG0]; print "IRC client ($server): socket error occurred: $error\n"; ! clear_channels(); delete $heap->{users}; $kernel->delay( connect => 60 ); --- 466,470 ---- my ($kernel, $heap, $error) = @_[KERNEL, HEAP, ARG0]; print "IRC client ($server): socket error occurred: $error\n"; ! clear_channels($conf{name}); delete $heap->{users}; $kernel->delay( connect => 60 ); |