Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use warnings;
- use strict;
- my $script_name = "test";
- my $author = "";
- my $version = "1.0";
- my $license = "GPL3";
- my $description = "test script";
- weechat::register($script_name, $author, $version, $license, $description, "", "");
- weechat::hook_command("mute", "", "", "", "test1|test2|hello|goodbye", "cmd", "");
- my $buffer = weechat::buffer_new("test-buffer", "", "", "", "");
- weechat::buffer_set($buffer, "display", "1");
- weechat::print($buffer, "If you try to tab-complete the arguments for the /mute command we just registered you'll notice that completions are taken from the weechat core /mute command.");
- weechat::print($buffer, "Since we're on our own buffer WeeChat should know though which of the two /mute commands it's supposed to be completing.");
- sub cmd
- {
- my $buffer = $_[1];
- weechat::print($buffer, "Nevertheless the right mute command is being executed.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement