From 6a4f64cfc9c7c2834ef2bd2841ac06b3356546f4 Mon Sep 17 00:00:00 2001 From: morimoto Date: Sun, 21 Mar 2004 11:04:01 +0000 Subject: [PATCH] imported http://mrmt.net/src/keitairc/keitairc r1.12 --- keitairc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/keitairc b/keitairc index 93314ef..d155666 100755 --- a/keitairc +++ b/keitairc @@ -1,6 +1,6 @@ #!/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 # This program is covered by the GNU General Public License 2 @@ -8,7 +8,7 @@ # 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; @@ -102,11 +102,17 @@ sub on_irc_join{ ################################################################ 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'); + } + } ################################################################ -- 2.11.0