can i make pub binds channel specific..
or do i have to use in the proc something like, if {$chan == #chan} ?
doc/tcl-commands.doc wrote: (4) PUB
bind pub <flags> <command> <proc>
procname <nick> <user@host> <handle> <channel> <text>
Description: used for commands given on a channel. The first word
becomes the command and everything else is the text argument.
Module: irc
(6) PUBM (stackable)
bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>
Description: just like MSGM, except it's triggered by things said
on a channel instead of things /msg'd to the bot. The mask is
matched against the channel name followed by the text and can
| contain wildcards. If the proc returns 1, Eggdrop will not log
| the message that triggered this bind. PUBM binds are processed
| before PUB binds. If the exclusive-binds setting is enabled,
| PUB binds will not be trigged by text that a PUBM bind has
| already handled.
Module: irc
Code: Select all
# add this to the top of your script:
setudef flag YOURCHANNELSETTINGNAME
# add this as the first line inside the proc triggered by your pub bind:
if {![channel get $chan YOURCHANNELSETTINGNAME]} return
# then .rehash and do .chanset #theChannelWhereYouWantTheScriptToWork +YOURCHANNELSETTINGNAME