Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created March 5, 2014 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/9375874 to your computer and use it in GitHub Desktop.
Save tadzik/9375874 to your computer and use it in GitHub Desktop.
weechat::register("banantalk", "tjs", "0.2", "MIT", "Talk like banan", "", "");
weechat::hook_command("banantalk", "talk like banan", "", "", "", "banantalk", "");
sub banantalk {
my (undef, $buffer, @args) = @_;
my @args2 = split /\s/, $args[0];
while (@args2) {
my @tmp = splice(@args2, 0, int(rand(2))+2);
weechat::command($buffer, join(" ", @tmp), $channel);
}
return weechat::WEECHAT_RC_OK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment