summaryrefslogtreecommitdiffstats
path: root/scripts/accountname.pl
diff options
context:
space:
mode:
authorAlexander Færøy2014-05-31 13:10:46 +0200
committerAlexander Færøy2014-05-31 13:10:46 +0200
commit2d0759e6ca5767b48bcc85bf38c2c43d5f0b63b1 (patch)
tree1c5e6d817c88e67b46e216a50e0aef5428bf63df /scripts/accountname.pl
parent2d080422d79d1fd49d6c5528593ccaaff9bfc583 (diff)
downloadscripts.irssi.org-2d0759e6ca5767b48bcc85bf38c2c43d5f0b63b1.tar.bz2
Import scripts from scripts.irssi.org
Diffstat (limited to 'scripts/accountname.pl')
-rw-r--r--scripts/accountname.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/accountname.pl b/scripts/accountname.pl
new file mode 100644
index 0000000..e439eeb
--- /dev/null
+++ b/scripts/accountname.pl
@@ -0,0 +1,23 @@
+use strict;
+use Irssi;
+use vars qw($VERSION %IRSSI);
+
+$VERSION = "1.0";
+
+%IRSSI = (
+ authors=> "Chris \'raz\' Hoogenboezem",
+ contact=> "chrish\@carrier6.com",
+ name=> "accountname",
+ description=> "Instead of displaying semi-raw data, a /whois now gives a tidy accountname on Asuka/lain servers (if applicable).",
+ license=> "Feel free to alter anything conform your own liking.",
+);
+
+Irssi::theme_register([tidyaccount => ' account : $0']);
+
+sub event_tidyaccount {
+ my @auth = split(/ +/, $_[1]);
+ $_[0]->printformat((split(/ +/, $_[1]))[1], MSGLEVEL_CRAP, 'tidyaccount', ((substr($auth[3],0,1) eq ":") ? $auth[2] : $auth[5]));
+ Irssi::signal_stop();
+}
+
+Irssi::signal_add('event 330', 'event_tidyaccount'); \ No newline at end of file