2011-05-15 21:55:18 +00:00
|
|
|
use strict;
|
|
|
|
use Irssi;
|
|
|
|
use Irssi::Irc;
|
|
|
|
use vars qw($VERSION %IRSSI);
|
|
|
|
|
|
|
|
$VERSION = "1.0";
|
|
|
|
|
|
|
|
%IRSSI = (
|
|
|
|
authors => 'JD Horelick',
|
|
|
|
contact => 'jdhore1@gmail.com',
|
|
|
|
name => 'shadow_help.pl',
|
2011-05-15 23:02:09 +00:00
|
|
|
description => 'Adds an OHELP and OSET command to make using the IRCd-side HELP and SET commands easier',
|
2011-05-15 21:55:18 +00:00
|
|
|
license => 'GNU General Public License',
|
|
|
|
url => 'http://shadowircd.net/',
|
|
|
|
);
|
|
|
|
|
|
|
|
sub cmd_ohelp {
|
|
|
|
my ($data, $server) = @_;
|
|
|
|
|
|
|
|
if (!$server || !$server->{connected}) {
|
|
|
|
Irssi::print("Not connected to server");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$server->send_raw("HELP $data");
|
|
|
|
}
|
|
|
|
|
2011-05-15 23:02:09 +00:00
|
|
|
sub cmd_oset {
|
|
|
|
my ($data, $server) = @_;
|
|
|
|
|
|
|
|
if (!$server || !$server->{connected}) {
|
|
|
|
Irssi::print("Not connected to server");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$server->send_raw("SET $data");
|
|
|
|
}
|
|
|
|
|
2011-05-15 21:55:18 +00:00
|
|
|
Irssi::command_bind('ohelp', \&cmd_ohelp);
|
2011-05-15 23:02:09 +00:00
|
|
|
Irssi::command_bind('oset', \&cmd_oset);
|
2011-05-15 21:55:18 +00:00
|
|
|
# vim: ts=4
|