]> jfr.im git - irc/rqf/shadowircd.git/blob - tools/shadow_help_weechat.pl
tools: Add helper scripts for WeeChat and XChat as well.
[irc/rqf/shadowircd.git] / tools / shadow_help_weechat.pl
1 # This script is something just thought up by me (jdhore) and ported from irssi to WeeChat
2
3 weechat::register("shadow_help", "jdhore", "1.0", "BSD", "Make life easier when using various oper commands", "", "");
4
5 weechat::hook_command("ohelp", "Rewriting the IRCd's HELP command for fun and profit",
6 "[params]",
7 "" .
8 "",
9 "", "ohelp", "");
10 weechat::hook_command("oset", "Rewriting the IRCd's SET command for fun and profit",
11 "[params]",
12 "" .
13 "",
14 "", "oset", "");
15
16 sub ohelp {
17 my ($data, $buffer, $param) = @_;
18
19 if ($param) {
20 weechat::command($buffer, "/quote help $param");
21 }
22 else {
23 weechat::command($buffer, "/quote help");
24 }
25
26 return weechat::WEECHAT_RC_OK;
27 }
28
29 sub oset {
30 my ($data, $buffer, $param) = @_;
31
32 if ($param) {
33 weechat::command($buffer, "/quote set $param");
34 }
35 else {
36 weechat::command($buffer, "/quote set");
37 }
38
39 return weechat::WEECHAT_RC_OK;
40 }