OSDN Git Service

workaround for madoka
authormorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Mon, 7 Jun 2004 01:27:57 +0000 (01:27 +0000)
committermorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Mon, 7 Jun 2004 01:27:57 +0000 (01:27 +0000)
keitairc

index 4d755ea..741c161 100755 (executable)
--- a/keitairc
+++ b/keitairc
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # keitairc
-# $Id: keitairc,v 1.19 2004-04-08 15:27:57 morimoto Exp $
+# $Id: keitairc,v 1.20 2004-06-07 01:27:57 morimoto Exp $
 #
 # Copyright (c) 2003 Jun Morimoto <morimoto@xantia.citroen.org>
 # 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.19 2004-04-08 15:27:57 morimoto Exp $;
+my $rcsid = q$Id: keitairc,v 1.20 2004-06-07 01:27:57 morimoto Exp $;
 my ($version) = $rcsid =~ m#,v ([0-9.]+)#;
 
 use strict;
@@ -97,6 +97,10 @@ sub on_irc_start{
 sub on_irc_join{
     my ($kernel, $who, $channel) = @_[KERNEL, ARG0, ARG1];
     $who =~ s/!.*//;
+
+    # chop off after the gap (bug workaround of madoka)
+    $channel =~ s/ .*//;
+
     $channel_name{$channel}++;
     unless ($who eq $config->irc_nick) {
       &add_message($channel, undef, "$who joined");