/[irc-logger]/trunk/bin/irc-logger.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/bin/irc-logger.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30 - (hide annotations)
Fri Jun 16 21:28:46 2006 UTC (14 years, 7 months ago) by dpavlin
Original Path: trunk/irc-logger.pl
File MIME type: text/plain
File size: 15301 byte(s)
adding tags from messages, try to fix encoding mess (needs more work)
1 dpavlin 4 #!/usr/bin/perl -w
2     use strict;
3     $|++;
4    
5 dpavlin 5 =head1 NAME
6    
7     irc-logger.pl
8    
9     =head1 SYNOPSIS
10    
11     ./irc-logger.pl
12    
13     =head1 DESCRIPTION
14    
15     log all conversation on irc channel
16    
17     =cut
18    
19 dpavlin 4 ## CONFIG
20    
21 dpavlin 29 my $NICK = 'irc-logger';
22 dpavlin 4 my $CONNECT =
23     {Server => 'irc.freenode.net',
24     Nick => $NICK,
25 dpavlin 8 Ircname => "try /msg $NICK help",
26 dpavlin 4 };
27     my $CHANNEL = '#razmjenavjestina';
28     my $IRC_ALIAS = "log";
29    
30     my %FOLLOWS =
31     (
32     ACCESS => "/var/log/apache/access.log",
33     ERROR => "/var/log/apache/error.log",
34     );
35    
36 dpavlin 19 my $DSN = 'DBI:Pg:dbname=' . $NICK;
37 dpavlin 5
38 dpavlin 14 my $ENCODING = 'ISO-8859-2';
39    
40 dpavlin 4 ## END CONFIG
41    
42 dpavlin 5
43    
44 dpavlin 13 use POE qw(Component::IRC Wheel::FollowTail Component::Server::HTTP);
45     use HTTP::Status;
46 dpavlin 5 use DBI;
47 dpavlin 30 use Encode qw/from_to is_utf8/;
48 dpavlin 15 use Regexp::Common qw /URI/;
49 dpavlin 16 use CGI::Simple;
50 dpavlin 28 use HTML::TagCloud;
51 dpavlin 5
52     my $dbh = DBI->connect($DSN,"","", { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr;
53    
54 dpavlin 19 eval {
55     $dbh->do(qq{ select count(*) from log });
56     };
57 dpavlin 5
58 dpavlin 19 if ($@) {
59     warn "creating database table in $DSN\n";
60     $dbh->do(<<'_SQL_SCHEMA_');
61    
62 dpavlin 5 create table log (
63     id serial,
64     time timestamp default now(),
65     channel text not null,
66 dpavlin 19 me boolean default false,
67 dpavlin 5 nick text not null,
68     message text not null,
69     primary key(id)
70     );
71    
72     create index log_time on log(time);
73     create index log_channel on log(channel);
74     create index log_nick on log(nick);
75    
76 dpavlin 19 _SQL_SCHEMA_
77     }
78 dpavlin 5
79     my $sth = $dbh->prepare(qq{
80     insert into log
81 dpavlin 19 (channel, me, nick, message)
82     values (?,?,?,?)
83 dpavlin 5 });
84    
85 dpavlin 28 my $tags;
86    
87 dpavlin 11 =head2 get_from_log
88 dpavlin 5
89 dpavlin 11 my @messages = get_from_log(
90     limit => 42,
91     search => '%what to stuff in ilike%',
92 dpavlin 13 fmt => {
93     time => '{%s} ',
94     time_channel => '{%s %s} ',
95     nick => '%s: ',
96 dpavlin 20 me_nick => '***%s ',
97 dpavlin 13 message => '%s',
98     },
99 dpavlin 20 filter => {
100     message => sub {
101     # modify message content
102     return shift;
103     }
104 dpavlin 21 },
105     context => 5,
106 dpavlin 11 );
107    
108 dpavlin 20 Order is important. Fields are first passed through C<filter> (if available) and
109     then throgh C<< sprintf($fmt->{message}, $message >> if available.
110    
111 dpavlin 21 C<context> defines number of messages around each search hit for display.
112    
113 dpavlin 11 =cut
114    
115     sub get_from_log {
116     my $args = {@_};
117    
118     $args->{limit} ||= 10;
119    
120 dpavlin 13 $args->{fmt} ||= {
121 dpavlin 26 date => '[%s] ',
122 dpavlin 13 time => '{%s} ',
123     time_channel => '{%s %s} ',
124     nick => '%s: ',
125 dpavlin 20 me_nick => '***%s ',
126 dpavlin 13 message => '%s',
127     };
128    
129 dpavlin 21 my $sql_message = qq{
130 dpavlin 11 select
131     time::date as date,
132     time::time as time,
133     channel,
134 dpavlin 20 me,
135 dpavlin 11 nick,
136     message
137     from log
138     };
139 dpavlin 21
140     my $sql_context = qq{
141     select
142     id
143     from log
144     };
145    
146     my $context = $1 if ($args->{search} && $args->{search} =~ s/\s*\+(\d+)\s*/ /);
147    
148     my $sql = $context ? $sql_context : $sql_message;
149    
150 dpavlin 25 $sql .= " where message ilike ? or nick ilike ? " if ($args->{search});
151 dpavlin 28 $sql .= " where id in (" . join(",", @{ $tags->{ $args->{tag} } }) . ") " if ($args->{tag} && $tags->{ $args->{tag} });
152 dpavlin 11 $sql .= " order by log.time desc";
153     $sql .= " limit " . $args->{limit};
154    
155     my $sth = $dbh->prepare( $sql );
156 dpavlin 21 if (my $search = $args->{search}) {
157     $search =~ s/^\s+//;
158     $search =~ s/\s+$//;
159 dpavlin 25 $sth->execute( ( '%' . $search . '%' ) x 2 );
160 dpavlin 21 warn "search for '$search' returned ", $sth->rows, " results ", $context || '', "\n";
161 dpavlin 28 } elsif (my $tag = $args->{tag}) {
162     $sth->execute();
163     warn "tag '$tag' returned ", $sth->rows, " results ", $context || '', "\n";
164 dpavlin 11 } else {
165     $sth->execute();
166     }
167     my $last_row = {
168     date => '',
169     time => '',
170     channel => '',
171     nick => '',
172     };
173    
174     my @rows;
175    
176     while (my $row = $sth->fetchrow_hashref) {
177     unshift @rows, $row;
178     }
179    
180 dpavlin 16 my @msgs = (
181     "Showing " . ($#rows + 1) . " messages..."
182     );
183 dpavlin 11
184 dpavlin 21 if ($context) {
185     my @ids = @rows;
186     @rows = ();
187    
188     my $last_to = 0;
189    
190     my $sth = $dbh->prepare( $sql_message . qq{ where id >= ? and id < ? } );
191     foreach my $row_id (sort { $a->{id} <=> $b->{id} } @ids) {
192     my $id = $row_id->{id} || die "can't find id in row";
193    
194     my ($from, $to) = ($id - $context, $id + $context);
195     $from = $last_to if ($from < $last_to);
196     $last_to = $to;
197     $sth->execute( $from, $to );
198    
199     #warn "## id: $id from: $from to: $to returned: ", $sth->rows, "\n";
200    
201     while (my $row = $sth->fetchrow_hashref) {
202     push @rows, $row;
203     }
204    
205     }
206     }
207    
208 dpavlin 11 foreach my $row (@rows) {
209    
210     $row->{time} =~ s#\.\d+##;
211    
212     my $msg = '';
213    
214 dpavlin 26 $msg = sprintf($args->{fmt}->{date}, $row->{date}) . ' ' if ($last_row->{date} ne $row->{date});
215     my $t = $row->{time};
216    
217 dpavlin 13 if ($last_row->{channel} ne $row->{channel}) {
218     $msg .= sprintf($args->{fmt}->{time_channel}, $t, $row->{channel});
219     } else {
220     $msg .= sprintf($args->{fmt}->{time}, $t);
221     }
222 dpavlin 11
223 dpavlin 12 my $append = 1;
224 dpavlin 11
225 dpavlin 22 my $nick = $row->{nick};
226 dpavlin 24 if ($nick =~ s/^_*(.*?)_*$/$1/) {
227     $row->{nick} = $nick;
228     }
229    
230 dpavlin 22 if ($last_row->{nick} ne $nick) {
231 dpavlin 20 # obfu way to find format for me_nick if needed or fallback to default
232     my $fmt = $row->{me} ? ( $args->{fmt}->{me_nick} || $args->{fmt}->{nick} ) : $args->{fmt}->{nick};
233     $fmt ||= '%s';
234    
235     $nick = $args->{filter}->{nick}->($nick) if (ref($args->{filter}->{nick}) eq 'CODE');
236    
237     $msg .= sprintf( $fmt, $nick );
238 dpavlin 12 $append = 0;
239     }
240    
241 dpavlin 20 $args->{fmt}->{message} ||= '%s';
242     if (ref($args->{filter}->{message}) eq 'CODE') {
243 dpavlin 15 $msg .= sprintf($args->{fmt}->{message},
244 dpavlin 20 $args->{filter}->{message}->(
245 dpavlin 15 $row->{message}
246     )
247     );
248     } else {
249     $msg .= sprintf($args->{fmt}->{message}, $row->{message});
250     }
251 dpavlin 11
252 dpavlin 12 if ($append && @msgs) {
253     $msgs[$#msgs] .= " " . $msg;
254     } else {
255     push @msgs, $msg;
256     }
257 dpavlin 11
258     $last_row = $row;
259     }
260    
261     return @msgs;
262     }
263    
264    
265 dpavlin 4 my $SKIPPING = 0; # if skipping, how many we've done
266     my $SEND_QUEUE; # cache
267    
268     POE::Component::IRC->new($IRC_ALIAS);
269    
270     POE::Session->create
271     (inline_states =>
272     {_start => sub {
273 dpavlin 7 $_[KERNEL]->post($IRC_ALIAS => register => 'all');
274     $_[KERNEL]->post($IRC_ALIAS => connect => $CONNECT);
275 dpavlin 4 },
276 dpavlin 9 irc_255 => sub { # server is done blabbing
277 dpavlin 7 $_[KERNEL]->post($IRC_ALIAS => join => $CHANNEL);
278     $_[KERNEL]->post($IRC_ALIAS => join => '#logger');
279     $_[KERNEL]->yield("heartbeat"); # start heartbeat
280     # $_[KERNEL]->yield("my_add", $_) for keys %FOLLOWS;
281 dpavlin 11 $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "IDENTIFY $NICK" );
282 dpavlin 4 },
283     irc_public => sub {
284 dpavlin 7 my $kernel = $_[KERNEL];
285     my $nick = (split /!/, $_[ARG0])[0];
286     my $channel = $_[ARG1]->[0];
287     my $msg = $_[ARG2];
288 dpavlin 4
289 dpavlin 14 from_to($msg, 'UTF-8', $ENCODING);
290 dpavlin 6
291 dpavlin 7 print "$channel: <$nick> $msg\n";
292 dpavlin 19 $sth->execute($channel, 0, $nick, $msg);
293 dpavlin 30 add_tag( id => $dbh->last_insert_id(undef,undef,"log",undef),
294     message => $msg);
295 dpavlin 4 },
296 dpavlin 19 irc_ctcp_action => sub {
297     my $kernel = $_[KERNEL];
298     my $nick = (split /!/, $_[ARG0])[0];
299     my $channel = $_[ARG1]->[0];
300     my $msg = $_[ARG2];
301    
302     from_to($msg, 'UTF-8', $ENCODING);
303    
304     print "$channel ***$nick $msg\n";
305     $sth->execute($channel, 1, $nick, $msg);
306 dpavlin 30 add_tag( id => $dbh->last_insert_id(undef,undef,"log",undef),
307     message => $msg);
308 dpavlin 19 },
309 dpavlin 7 irc_msg => sub {
310     my $kernel = $_[KERNEL];
311     my $nick = (split /!/, $_[ARG0])[0];
312     my $msg = $_[ARG2];
313 dpavlin 14 from_to($msg, 'UTF-8', $ENCODING);
314 dpavlin 7
315 dpavlin 8 my $res = "unknown command '$msg', try /msg $NICK help!";
316 dpavlin 11 my @out;
317 dpavlin 7
318     print "<< $msg\n";
319    
320 dpavlin 8 if ($msg =~ m/^help/i) {
321 dpavlin 7
322 dpavlin 11 $res = "usage: /msg $NICK comand | commands: stat - user/message stat | last - show backtrace | grep foobar - find foobar";
323 dpavlin 8
324 dpavlin 10 } elsif ($msg =~ m/^msg\s+(\S+)\s+(.*)$/i) {
325    
326     print ">> /msg $1 $2\n";
327     $_[KERNEL]->post( $IRC_ALIAS => privmsg => $1, $2 );
328     $res = '';
329    
330 dpavlin 8 } elsif ($msg =~ m/^stat.*?\s*(\d*)/i) {
331    
332 dpavlin 7 my $nr = $1 || 10;
333    
334     my $sth = $dbh->prepare(qq{
335     select nick,count(*) from log group by nick order by count desc limit $nr
336     });
337     $sth->execute();
338     $res = "Top $nr users: ";
339 dpavlin 8 my @users;
340 dpavlin 7 while (my $row = $sth->fetchrow_hashref) {
341 dpavlin 8 push @users,$row->{nick} . ': ' . $row->{count};
342 dpavlin 7 }
343 dpavlin 8 $res .= join(" | ", @users);
344     } elsif ($msg =~ m/^last.*?\s*(\d*)/i) {
345    
346 dpavlin 11 foreach my $res (get_from_log( limit => $1 )) {
347     print "last: $res\n";
348 dpavlin 14 from_to($res, $ENCODING, 'UTF-8');
349 dpavlin 11 $_[KERNEL]->post( $IRC_ALIAS => privmsg => $nick, $res );
350 dpavlin 8 }
351    
352 dpavlin 11 $res = '';
353 dpavlin 8
354 dpavlin 21 } elsif ($msg =~ m/^(search|grep)\s+(.*)\s*$/i) {
355 dpavlin 8
356 dpavlin 11 my $what = $2;
357 dpavlin 8
358 dpavlin 21 foreach my $res (get_from_log(
359     limit => 20,
360     search => $what,
361     )) {
362 dpavlin 11 print "search [$what]: $res\n";
363 dpavlin 14 from_to($res, $ENCODING, 'UTF-8');
364 dpavlin 8 $_[KERNEL]->post( $IRC_ALIAS => privmsg => $nick, $res );
365     }
366    
367     $res = '';
368 dpavlin 11
369 dpavlin 7 }
370    
371 dpavlin 8 if ($res) {
372     print ">> [$nick] $res\n";
373 dpavlin 14 from_to($res, $ENCODING, 'UTF-8');
374 dpavlin 8 $_[KERNEL]->post( $IRC_ALIAS => privmsg => $nick, $res );
375     }
376 dpavlin 7
377     },
378 dpavlin 10 irc_477 => sub {
379     print "# irc_477: ",$_[ARG1], "\n";
380     $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "register $NICK" );
381     },
382 dpavlin 7 irc_505 => sub {
383 dpavlin 10 print "# irc_505: ",$_[ARG1], "\n";
384 dpavlin 7 $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "register $NICK" );
385 dpavlin 10 # $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "set hide email on" );
386     # $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "set email dpavlin\@rot13.org" );
387 dpavlin 8 },
388     irc_registered => sub {
389 dpavlin 10 warn "## indetify $NICK\n";
390 dpavlin 7 $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "IDENTIFY $NICK" );
391 dpavlin 10 },
392 dpavlin 11 # irc_433 => sub {
393     # print "# irc_433: ",$_[ARG1], "\n";
394     # warn "## indetify $NICK\n";
395     # $_[KERNEL]->post( $IRC_ALIAS => privmsg => 'nickserv', "IDENTIFY $NICK" );
396     # },
397 dpavlin 10 irc_372 => sub {
398     print "MOTD: ", $_[ARG1], "\n";
399     },
400     irc_snotice => sub {
401     print "(server notice): ", $_[ARG0], "\n";
402     },
403 dpavlin 4 (map
404     {
405     ;"irc_$_" => sub { }}
406 dpavlin 10 qw(
407 dpavlin 5 )),
408 dpavlin 10 # join
409     # ctcp_version
410     # connected snotice ctcp_action ping notice mode part quit
411     # 001 002 003 004 005
412     # 250 251 252 253 254 265 266
413     # 332 333 353 366 372 375 376
414     # 477
415 dpavlin 4 _child => sub {},
416     _default => sub {
417     printf "%s: session %s caught an unhandled %s event.\n",
418     scalar localtime(), $_[SESSION]->ID, $_[ARG0];
419     print "The $_[ARG0] event was given these parameters: ",
420     join(" ", map({"ARRAY" eq ref $_ ? "[@$_]" : "$_"} @{$_[ARG1]})), "\n";
421     0; # false for signals
422     },
423     my_add => sub {
424     my $trailing = $_[ARG0];
425     my $session = $_[SESSION];
426     POE::Session->create
427     (inline_states =>
428     {_start => sub {
429     $_[HEAP]->{wheel} =
430     POE::Wheel::FollowTail->new
431     (
432     Filename => $FOLLOWS{$trailing},
433     InputEvent => 'got_line',
434     );
435     },
436     got_line => sub {
437     $_[KERNEL]->post($session => my_tailed =>
438     time, $trailing, $_[ARG0]);
439     },
440     },
441     );
442    
443     },
444     my_tailed => sub {
445     my ($time, $file, $line) = @_[ARG0..ARG2];
446     ## $time will be undef on a probe, or a time value if a real line
447    
448     ## PoCo::IRC has throttling built in, but no external visibility
449     ## so this is reaching "under the hood"
450     $SEND_QUEUE ||=
451     $_[KERNEL]->alias_resolve($IRC_ALIAS)->get_heap->{send_queue};
452    
453     ## handle "no need to keep skipping" transition
454     if ($SKIPPING and @$SEND_QUEUE < 1) {
455     $_[KERNEL]->post($IRC_ALIAS => privmsg => $CHANNEL =>
456     "[discarded $SKIPPING messages]");
457     $SKIPPING = 0;
458     }
459    
460     ## handle potential message display
461     if ($time) {
462     if ($SKIPPING or @$SEND_QUEUE > 3) { # 3 msgs per 10 seconds
463     $SKIPPING++;
464     } else {
465     my @time = localtime $time;
466     $_[KERNEL]->post($IRC_ALIAS => privmsg => $CHANNEL =>
467     sprintf "%02d:%02d:%02d: %s: %s",
468     ($time[2] + 11) % 12 + 1, $time[1], $time[0],
469     $file, $line);
470     }
471     }
472    
473     ## handle re-probe/flush if skipping
474     if ($SKIPPING) {
475     $_[KERNEL]->delay($_[STATE] => 0.5); # $time will be undef
476     }
477    
478     },
479     my_heartbeat => sub {
480     $_[KERNEL]->yield(my_tailed => time, "heartbeat", "beep");
481     $_[KERNEL]->delay($_[STATE] => 10);
482     }
483     },
484     );
485    
486 dpavlin 28 # tags support
487    
488     my $cloud = HTML::TagCloud->new;
489    
490     =head2 add_tag
491    
492     add_tag( id => 42, message => 'irc message' );
493    
494     =cut
495    
496     sub add_tag {
497     my $arg = {@_};
498    
499     return unless ($arg->{id} && $arg->{message});
500    
501 dpavlin 30 my $m = $arg->{message};
502     from_to('UTF-8', 'iso-8859-2', $m) if (is_utf8($m));
503    
504     while ($m =~ s#\b([\w-_]+)//##s) {
505 dpavlin 28 my $tag = $1;
506     next if (! $tag || $tag =~ m/https?:/i);
507     push @{ $tags->{$tag} }, $arg->{id};
508     }
509     }
510    
511     =head2 seed_tags
512    
513     Read all tags from database and create in-memory cache for tags
514    
515     =cut
516    
517     sub seed_tags {
518     my $sth = $dbh->prepare(qq{ select id,message from log where message like '%//%' });
519     $sth->execute;
520     while (my $row = $sth->fetchrow_hashref) {
521     add_tag( %$row );
522     }
523    
524     foreach my $tag (keys %$tags) {
525     $cloud->add($tag, "?tag=$tag", scalar @{$tags->{$tag}} + 1);
526     }
527     }
528    
529     seed_tags;
530    
531 dpavlin 13 # http server
532    
533     my $httpd = POE::Component::Server::HTTP->new(
534 dpavlin 14 Port => $NICK =~ m/-dev/ ? 8001 : 8000,
535 dpavlin 13 ContentHandler => { '/' => \&root_handler },
536     Headers => { Server => 'irc-logger' },
537     );
538    
539 dpavlin 18 my %escape = ('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;');
540     my $escape_re = join '|' => keys %escape;
541    
542 dpavlin 13 my $style = <<'_END_OF_STYLE_';
543 dpavlin 16 p { margin: 0; padding: 0.1em; }
544 dpavlin 13 .time, .channel { color: #808080; font-size: 60%; }
545 dpavlin 28 .date { float: right; background: #e0e0e0; color: #404040; font-size: 120%; padding: 0.25em; border: 1px dashed #808080; }
546 dpavlin 20 .nick { color: #000000; font-size: 80%; padding: 2px; font-family: courier, courier new, monospace ; }
547 dpavlin 13 .message { color: #000000; font-size: 100%; }
548 dpavlin 16 .search { float: right; }
549 dpavlin 20 .col-0 { background: #ffff66 }
550     .col-1 { background: #a0ffff }
551     .col-2 { background: #99ff99 }
552     .col-3 { background: #ff9999 }
553     .col-4 { background: #ff66ff }
554 dpavlin 13 _END_OF_STYLE_
555    
556 dpavlin 20 my $max_color = 4;
557    
558     my %nick_enumerator;
559    
560 dpavlin 13 sub root_handler {
561     my ($request, $response) = @_;
562     $response->code(RC_OK);
563 dpavlin 14 $response->content_type("text/html; charset=$ENCODING");
564 dpavlin 16
565     my $q;
566    
567     if ( $request->method eq 'POST' ) {
568     $q = new CGI::Simple( $request->content );
569     } elsif ( $request->uri =~ /\?(.+)$/ ) {
570     $q = new CGI::Simple( $1 );
571     } else {
572     $q = new CGI::Simple;
573     }
574    
575     my $search = $q->param('search') || $q->param('grep') || '';
576    
577 dpavlin 13 $response->content(
578 dpavlin 28 qq{<html><head><title>$NICK</title><style type="text/css">$style} .
579     $cloud->css .
580     qq{</style></head><body>} .
581     qq{
582 dpavlin 16 <form method="post" class="search">
583     <input type="text" name="search" value="$search" size="10">
584     <input type="submit" value="search">
585     </form>
586     } .
587 dpavlin 28 qq{<div>} . $cloud->html(500) . qq{</div>} .
588     qq{<p>} .
589 dpavlin 16 join("</p><p>",
590 dpavlin 13 get_from_log(
591 dpavlin 23 limit => $q->param('last') || 100,
592 dpavlin 28 search => $search || undef,
593 dpavlin 29 tag => $q->param('tag') || undef,
594 dpavlin 13 fmt => {
595 dpavlin 27 date => '<hr size="1" style="clear: both;"/><div class="date">%s</div> ',
596 dpavlin 13 time => '<span class="time">%s</span> ',
597     time_channel => '<span class="channel">%s %s</span> ',
598 dpavlin 20 nick => '%s:&nbsp;',
599     me_nick => '***%s&nbsp;',
600 dpavlin 13 message => '<span class="message">%s</span>',
601     },
602 dpavlin 20 filter => {
603     message => sub {
604     my $m = shift || return;
605     $m =~ s/($escape_re)/$escape{$1}/gs;
606     $m =~ s#($RE{URI}{HTTP})#<a href="$1">$1</a>#gs;
607     return $m;
608     },
609     nick => sub {
610     my $n = shift || return;
611     if (! $nick_enumerator{$n}) {
612     my $max = scalar keys %nick_enumerator;
613     $nick_enumerator{$n} = $max + 1;
614     }
615     return '<span class="nick col-' .
616     ( $nick_enumerator{$n} % $max_color ) .
617     '">' . $n . '</span>';
618     },
619 dpavlin 15 },
620 dpavlin 13 )
621     ) .
622 dpavlin 16 qq{</p></body></html>}
623 dpavlin 13 );
624     return RC_OK;
625     }
626    
627 dpavlin 4 POE::Kernel->run;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26