| View previous topic :: View next topic |
| Author |
Message |
Pauschi Voice
Joined: 03 Sep 2019 Posts: 11
|
Posted: Tue Sep 03, 2019 11:11 am Post subject: Reacting to all commands *? |
|
|
Hello!
my simple script is working so far, unfortunally it only reacts when someone writes !raffle into the chat.
| Code: | bind PUB -|- !raffle raffle
proc raffle { nick host hand chan arg } {
putserv "PRIVMSG $chan :!raffle"
} |
Can it be triggered with every text what starts with "!" ?
I tried | Code: | | bind PUB -|- !* all | but it doesnt work
And it should PRIVMSG to the chan with excatly THAT what was inputted. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Sep 03, 2019 2:04 pm Post subject: |
|
|
Hello,
The PUB binding does not support wildcard characters such as *. For this, you'll have to use the PUBM binding instead.
Keep in mind though, that the syntax for PUBM is slightly different to PUB;
The mask is matched against "#channel text", so you'll probably want to use something like this:
| Code: | | bind pubm -|- "% !*" raffle |
Also, if the command (raffle, in this case) returns 1, the message will not be logged.
Finally, if you've enabled exclusive bindings, this will prevent any PUB binds matching the text-line from actually triggering.
As for responding with the input-text, this is available in the last parameter passed to the function;
| Code: | proc raffle {nick host handle channel text} {
puthelp "PRIVMSG $channel :$text"
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Pauschi Voice
Joined: 03 Sep 2019 Posts: 11
|
Posted: Thu Sep 05, 2019 2:05 am Post subject: |
|
|
| Thank you sir! Im gonna try it:) |
|
| Back to top |
|
 |
|