2 # keitairc/lib/plugins/00index
3 #
\83`
\83\83\83l
\83\8b\88ê
\97\97
4 # $Id: 00index,v 1.1 2008-01-09 19:30:34 morimoto Exp $
5 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00index,v $
9 action_imprementation => sub {
10 my ($request, $name, $session_id, $param_string) = @_;
11 my $unread_channels = 0;
15 for my $channel ($::ib->channels()){
17 $buf .= sprintf('<a accesskey="%1d" href="all/%s">[%1d] %s</a>',
19 ::uri_escape($channel),
21 $::ib->compact_channel_name($::ib->name($channel)));
23 $buf .= sprintf('<a href="all/%s"> %s</a>',
24 ::uri_escape($channel),
25 $::ib->compact_channel_name($::ib->name($channel)));
30 if($::ib->unread_lines($channel)){
31 $buf .= sprintf(' <a href="unread/%s">%s</a>',
32 ::uri_escape($channel),
33 $::ib->unread_lines($channel));
39 my $ci = new Keitairc::ClientInfo($request);
40 my $view = new Keitairc::View($::cf, $ci);
41 return $view->render('index.html',
44 unread => $unread_channels,