html/accountname.pl
1 use strict;
2 use Irssi;
3 use vars qw($VERSION %IRSSI);
4
5 $VERSION = "1.0";
6
7 %IRSSI = (
8 authors=> "Chris \'raz\' Hoogenboezem",
9 contact=> "chrish\@carrier6.com",
10 name=> "accountname",
11 description=> "Instead of displaying semi-raw data, a /whois now gives a tidy accountname on Asuka/lain servers (if applicable).",
12 license=> "Feel free to alter anything conform your own liking.",
13 );
14
15 Irssi::theme_register([tidyaccount => ' account : $0']);
16
17 sub event_tidyaccount {
18 my @auth = split(/ +/, $_[1]);
19 $_[0]->printformat((split(/ +/, $_[1]))[1], MSGLEVEL_CRAP, 'tidyaccount', ((substr($auth[3],0,1) eq ":") ? $auth[2] : $auth[5]));
20 Irssi::signal_stop();
21 }
22
23 Irssi::signal_add('event 330', 'event_tidyaccount');