#!/usr/bin/perl
# keitairc
-# $Id: keitairc,v 1.11 2004-03-21 11:03:51 morimoto Exp $
+# $Id: keitairc,v 1.12 2004-03-21 11:04:01 morimoto Exp $
#
# Copyright (c) 2003 Jun Morimoto <morimoto@xantia.citroen.org>
# This program is covered by the GNU General Public License 2
# Depends: libjcode-pm-perl, libpoe-component-irc-perl,
# liburi-perl, libwww-perl, libappconfig-perl
-my $rcsid = q$Id: keitairc,v 1.11 2004-03-21 11:03:51 morimoto Exp $;
+my $rcsid = q$Id: keitairc,v 1.12 2004-03-21 11:04:01 morimoto Exp $;
my ($version) = $rcsid =~ m#,v ([0-9.]+)#;
use strict;
################################################################
sub on_irc_part{
my ($kernel, $who, $channel) = @_[KERNEL, ARG0, ARG1];
+ $who =~ s/!.*//;
# chop off after the gap (bug workaround of POE::Filter::IRC)
$channel =~ s/ .*//;
- delete $channel_name{$channel};
+ if ($who eq $config->irc_nick) {
+ delete $channel_name{$channel};
+ } else {
+ &add_message($channel, 'SYSOP', $who . ' leaves');
+ }
+
}
################################################################