OSDN Git Service

Console buffer should be the bottom of the channel list.
authormatusita <matusita@180c8125-5b33-4295-ad04-72a68a15b4cc>
Thu, 8 May 2008 14:59:43 +0000 (14:59 +0000)
committermatusita <matusita@180c8125-5b33-4295-ad04-72a68a15b4cc>
Thu, 8 May 2008 14:59:43 +0000 (14:59 +0000)
ChangeLog
lib/Keitairc/IrcBuffer.pm
lib/plugins/00index

index 68e1bc5..cdf07af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,9 @@
        * lib/templates/url.html: \e$B%I%3%bC<Kv$N%U%k%V%i%&%6$r;H$C$F\e(BURL\e$B$r3+\e(B
        \e$B$/$3$H$,$G$-$k$h$&$K$9$k\e(B (thanks to Takahashi Yoshihiro)\e$B!%\e(BCloses
        #12480.
+       * lib/Keitairc/IrcBuffer.pm, lib/plugins/00index: *console*\e$B%P%C%U%!\e(B
+       \e$B$,>e$K$-$F$b0UL#$,$J$$$N$G0lHV2<$K$J$k$h$&$K$9$k!%\e(B(thanks to
+       Takahashi Yoshihiro)\e$B!%\e(B
        
 2008-05-03  Makoto Matsushita  <matusita@jp.FreeBSD.org>
 
index 8504fe5..f8414f5 100644 (file)
@@ -1,6 +1,6 @@
 # -*-perl-*-
 # Keitairc::IrcBuffer
-# $Id: IrcBuffer.pm,v 1.12 2008-05-08 14:53:38 matusita Exp $
+# $Id: IrcBuffer.pm,v 1.13 2008-05-08 14:59:43 matusita Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/Keitairc/IrcBuffer.pm,v $
 #
 # Copyright (c) 2008 Jun Morimoto <morimoto@mrmt.net>
@@ -245,7 +245,11 @@ sub add_message{
                $me->{unread_lines}->{$cid} = $me->{history};
        }
 
-       $me->{mtime}->{$cid} = time;
+       if($me->{cid2name}->{$cid} eq "*console*") {
+               $me->{mtime}->{$cid} = -1;
+       } else {
+               $me->{mtime}->{$cid} = time;
+       }
 }
 
 ################################################################
index 1bf57d0..cf19f5d 100644 (file)
@@ -1,19 +1,22 @@
 # -*-perl-*-
 # keitairc/lib/plugins/00index
 # \83`\83\83\83l\83\8b\88ê\97\97
-# $Id: 00index,v 1.5 2008-03-15 09:09:26 morimoto Exp $
+# $Id: 00index,v 1.6 2008-05-08 14:59:43 matusita Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00index,v $
 
 $plugin = {
        name => 'index',
        action_imprementation => sub {
                my ($request, $name, $session_id, $param_string) = @_;
+
+               ::send_message($request);
+
                my $unread_channels = 0;
                my $accesskey = 1;
 
                my $format_mtime = sub{
                        my $mtime = shift;
-                       return unless $mtime;
+                       return if($mtime <= 0);
                        my $timediff = time - $mtime;
                        if($timediff < 60){
                                return $timediff . '\95b';