]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
tools: Add helper scripts for WeeChat and XChat as well.
authorJD Horelick <redacted>
Sun, 15 May 2011 23:02:09 +0000 (19:02 -0400)
committerJD Horelick <redacted>
Sun, 15 May 2011 23:02:09 +0000 (19:02 -0400)
The irssi script is also renamed and now has OSET as well.

tools/README
tools/shadow_help_irssi.pl [moved from tools/shadow_help.pl with 62% similarity]
tools/shadow_help_weechat.pl [new file with mode: 0644]
tools/shadow_help_xchat.pl [new file with mode: 0644]

index e8b6cd26a1ffdc590a052264064fd09aec9bb070..d2923d35a5c2cc10d183d29ba2be79cc4bdea85d 100644 (file)
@@ -2,23 +2,25 @@ $Id: README 6 2005-09-10 01:02:21Z nenolod $
 
 A directory of support programs for ircd.
 
-convertconf.c   - converts a Hybrid 5 or 6 conf file to the new
-                  style.  will not convert I:
-convertilines.c - convert hybrid 5/6 I: to auth {};
-convertklines.c - convert Hybrid 5/6 and early 7beta kline.conf files
-                  to the new spreadsheet like format.
-genssl.sh              - a small tool for generating SSL certificates for your IRCd.
-mkkeypair       - a small program used for generating a public and private
-                  key pair
-mkpasswd.c      - makes password for O lines
-rsa_respond/    - a tool to generate an RSA response to the challenge asked
-                  by the server, and a tool to generate a keypair for the
-                  C/R system
-shadow_help.pl  - an irssi script which adds a OHELP command so you do not
-                                 have to type /quote help everytime you want to view the
-                                 IRCd's helpfiles.
-untabify        - converts tab characters to a specific number of spaces
-viconf.c        - edit your conf file without having to chdir su etc. etc.
-                  also locks the file if file locking is used.
-                  viconf is also installed with hard links as vimotd and
-                  viklines, to edit those files in a locked mode.
+convertconf.c          - converts a Hybrid 5 or 6 conf file to the new
+                         style.  will not convert I:
+convertilines.c        - convert hybrid 5/6 I: to auth {};
+convertklines.c        - convert Hybrid 5/6 and early 7beta kline.conf files
+                         to the new spreadsheet like format.
+genssl.sh                     - a small tool for generating SSL certificates for your IRCd.
+mkkeypair              - a small program used for generating a public and private
+                         key pair
+mkpasswd.c             - makes password for O lines
+rsa_respond/           - a tool to generate an RSA response to the challenge asked
+                         by the server, and a tool to generate a keypair for the
+                         C/R system
+shadow_help_irssi.pl   - an irssi script which adds OHELP and OSET commands so
+                                                you do not have to prefix the commands with /quote to
+                                                run them.
+shadow_help weechat.pl - same as above but for WeeChat 0.3.0 or later.
+shadow_help_xchat.pl   - same as above but for XChat 2.x.
+untabify               - converts tab characters to a specific number of spaces
+viconf.c               - edit your conf file without having to chdir su etc. etc.
+                         also locks the file if file locking is used.
+                         viconf is also installed with hard links as vimotd and
+                         viklines, to edit those files in a locked mode.
similarity index 62%
rename from tools/shadow_help.pl
rename to tools/shadow_help_irssi.pl
index 2334d7f1c0692e64e68edb720b97b3e0701010d1..df0aba0131b323ce2a7719f576f384c65cd42345 100644 (file)
@@ -9,7 +9,7 @@ $VERSION = "1.0";
     authors     => 'JD Horelick',
     contact     => 'jdhore1@gmail.com',
     name        => 'shadow_help.pl',
-    description => 'Adds a OHELP command so that you do not need to type /quote help',
+    description => 'Adds an OHELP and OSET command to make using the IRCd-side HELP and SET commands easier',
     license     => 'GNU General Public License',
     url         => 'http://shadowircd.net/',
 );
@@ -25,5 +25,17 @@ sub cmd_ohelp {
        $server->send_raw("HELP $data");
 }
 
+sub cmd_oset {
+       my ($data, $server) = @_;
+
+       if (!$server || !$server->{connected}) {
+      Irssi::print("Not connected to server");
+      return;
+    }
+
+       $server->send_raw("SET $data");
+}
+
 Irssi::command_bind('ohelp', \&cmd_ohelp);
+Irssi::command_bind('oset', \&cmd_oset);
 # vim: ts=4
diff --git a/tools/shadow_help_weechat.pl b/tools/shadow_help_weechat.pl
new file mode 100644 (file)
index 0000000..d6e4836
--- /dev/null
@@ -0,0 +1,40 @@
+# This script is something just thought up by me (jdhore) and ported from irssi to WeeChat\r
+\r
+weechat::register("shadow_help", "jdhore", "1.0", "BSD", "Make life easier when using various oper commands", "", "");\r
+\r
+weechat::hook_command("ohelp", "Rewriting the IRCd's HELP command for fun and profit",\r
+       "[params]", \r
+       "" .\r
+       "",\r
+       "", "ohelp", "");\r
+weechat::hook_command("oset", "Rewriting the IRCd's SET command for fun and profit",\r
+       "[params]", \r
+       "" .\r
+       "",\r
+       "", "oset", "");\r
+\r
+sub ohelp {\r
+    my ($data, $buffer, $param) = @_;\r
+\r
+    if ($param) {\r
+               weechat::command($buffer, "/quote help $param");\r
+    }\r
+    else {\r
+        weechat::command($buffer, "/quote help");\r
+    }\r
+    \r
+    return weechat::WEECHAT_RC_OK;\r
+}\r
+\r
+sub oset {\r
+    my ($data, $buffer, $param) = @_;\r
+\r
+    if ($param) {\r
+               weechat::command($buffer, "/quote set $param");\r
+    }\r
+    else {\r
+        weechat::command($buffer, "/quote set");\r
+    }\r
+    \r
+    return weechat::WEECHAT_RC_OK;\r
+}\r
diff --git a/tools/shadow_help_xchat.pl b/tools/shadow_help_xchat.pl
new file mode 100644 (file)
index 0000000..91daff4
--- /dev/null
@@ -0,0 +1,18 @@
+package IRC::Xchat::Shadow_Help;
+
+IRC::register("Shadow Help", "1.0", "", "");
+
+sub ohelp {
+       $_ = shift @_;
+       IRC::command ("/quote help $_");
+    return 1;
+}
+
+sub oset {
+       $_ = shift @_;
+       IRC::command ("/quote set $_");
+    return 1;
+}
+
+IRC::add_command_handler("ohelp", "IRC::Xchat::Shadow_Help::ohelp");
+IRC::add_command_handler("oset", "IRC::Xchat::Shadow_Help::oset");