[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Send args to hook command??
From: |
Nils G |
Subject: |
Re: Send args to hook command?? |
Date: |
Wed, 6 Nov 2019 21:08:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
Hello Rocko,
Am 06.11.19 um 20:29 schrieb Rocko:
> No, not my nick, the nick of of user in channel
> I want to pass the name of a user in the channel to the command, not my
> username.
> /hello name_of_user_in_channel
weechat::register("test_perl", "acidblue", "0.1" , "GPL" , "" ,"" , "");
weechat::hook_command("hello","","","","", "say", "");
sub say {
my ($data, $buffer, $args) = @_;
weechat::command($buffer, "/me says hello $args");
return weechat::WEECHAT_RC_OK;
}