weechat-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Send args to hook command??


From: Rocko
Subject: Re: Send args to hook command??
Date: Wed, 6 Nov 2019 12:28:05 -0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Ah HA!

I forgot the $data part, was wondering why "/me says hello $args" wasn't working.

Thanks..


On 11/6/2019 12:08 PM, Nils G wrote:
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;
}


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]