SHARE
TWEET

Untitled

a guest Jul 12th, 2011 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use warnings;
  2. use strict;
  3.  
  4. my $script_name = "test";
  5. my $author = "";
  6. my $version = "1.0";
  7. my $license = "GPL3";
  8. my $description = "test script";
  9.  
  10. weechat::register($script_name, $author, $version, $license, $description, "", "");
  11. weechat::hook_command("mute", "", "", "", "test1|test2|hello|goodbye", "cmd", "");
  12.  
  13. my $buffer = weechat::buffer_new("test-buffer", "", "", "", "");
  14. weechat::buffer_set($buffer, "display", "1");
  15. 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.");
  16. 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.");
  17.  
  18. sub cmd
  19. {
  20.         my $buffer = $_[1];
  21.         weechat::print($buffer, "Nevertheless the right mute command is being executed.");
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top