#!/usr/bin/perl
# keitairc
-# $Id: keitairc,v 1.3 2004-03-21 11:01:33 morimoto Exp $
+# $Id: keitairc,v 1.4 2004-03-21 11:01:50 morimoto Exp $
#
# Copyright (c) 2003 Jun Morimoto <morimoto@xantia.citroen.org>
# This program is covered by the GNU General Public License 2
web_username web_password)
);
-unless($config->file($ENV{'HOME'} . '/.keitairc')){
- $config->file('/etc/keitairc');
-}
+$config->file('/etc/keitairc');
+$config->file($ENV{'HOME'} . '/.keitairc');
$config->args;
my (%channels, %buffer, %atime, %mtime);
################################################################
sub on_irc_part{
my ($kernel, $who, $channel) = @_[KERNEL, ARG0, ARG1];
- $channel = Jcode->new($channel->[0])->euc;
+
+ # chop off after the gap (bug workaround of POE::Filter::IRC)
+ $channel =~ s/ .*//;
+
+ $channel = Jcode->new($channel)->euc;
delete $channels{$channel};
}
my $buf;
my $accesskey = 1;
- for my $channel (sort(keys(%channels))){
+ for my $channel (sort {
+ $mtime{$b} <=> $mtime{$a};
+ }(keys(%channels))){
if($accesskey < 10){
$buf .= sprintf('&#%d;', 63878 + $accesskey);