OSDN Git Service

now Keitairc::IrcBuffer->channels() returns proper names
authormorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Wed, 9 Jan 2008 18:47:01 +0000 (18:47 +0000)
committermorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Wed, 9 Jan 2008 18:47:01 +0000 (18:47 +0000)
lib/Keitairc/IrcBuffer.pm

index 8b72c59..2d70b85 100644 (file)
@@ -1,6 +1,6 @@
 # -*-perl-*-
 # Keitairc::IrcBuffer
-# $Id: IrcBuffer.pm,v 1.1 2008-01-08 05:52:14 morimoto Exp $
+# $Id: IrcBuffer.pm,v 1.2 2008-01-09 18:47:01 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/Keitairc/IrcBuffer.pm,v $
 #
 # Copyright (c) 2008 Jun Morimoto <morimoto@mrmt.net>
@@ -42,9 +42,9 @@ sub new{
 ################################################################
 sub channels{
        my $me = shift;
-       sort {
-               $me->mtime($b) <=> $me->mtime($a)
-       } keys %{$me->{name}};
+       map {
+               $me->{name}->{$_}
+       }(sort { $me->mtime($b) <=> $me->mtime($a) } keys %{$me->{name}})
 }
 
 ################################################################