#!/usr/bin/perl # # atheme-info.pl - Provides the /AINFO alias for issuing the ChanServ # or NickServ INFO command depending on the argument, # for use with Atheme-based networks (e.g. freenode) # # Copyright (C) 2009 by Ignacio R. Morelle # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 # or at your option any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY. # # See for more details. # use strict; use warnings; use Irssi; use vars qw($VERSION %IRSSI); $VERSION = '0.2'; %IRSSI = ( authors => 'Ignacio R. Morelle', contact => 'shadowm@wesnoth.org', name => 'atheme-info', description => 'Provides /AINFO command for querying NickServ or ChanServ for information on a nick or channel', license => 'GPL v2', url => 'http://shadowm.rewound.net/', changed => '2009-11-17', ); sub do_ainfo { my ($args, $server) = @_; my @sargs = split(/ /,$args); if(scalar @sargs != 1) { Irssi::print("AINFO: wrong number of arguments"); return 0; } my $target = ($sargs[0] =~ /^#/) ? 'ChanServ' : 'NickServ'; $server->command("QUERY $target INFO $sargs[0]"); return 1; } Irssi::command_bind('ainfo', 'do_ainfo'); 1;