| View previous topic :: View next topic |
| Author |
Message |
veblen Voice
Joined: 13 Mar 2007 Posts: 18
|
Posted: Thu Mar 22, 2007 8:11 am Post subject: [SOLVED] bind pub |
|
|
can i make pub binds channel specific..
or do i have to use in the proc something like, if {$chan == #chan} ?
Last edited by veblen on Thu Mar 22, 2007 6:44 pm; edited 1 time in total |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Mar 22, 2007 9:07 am Post subject: Re: bind pub |
|
|
| 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 |
_________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
veblen Voice
Joined: 13 Mar 2007 Posts: 18
|
Posted: Thu Mar 22, 2007 10:26 am Post subject: |
|
|
ok i have a different question then, i have a script that reacts to channel commands.. but i want the bot to sit in more channels, without the commands being triggered in some.
whats the best way to edit my script to only allow selected channels to trigger pub procs? and i really want to be able to edit this easily so i can add & remove channels from the ones i want to allow the commands in. |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Mar 22, 2007 11:26 am Post subject: |
|
|
| Code: | # 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 |
_________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
veblen Voice
Joined: 13 Mar 2007 Posts: 18
|
Posted: Thu Mar 22, 2007 12:46 pm Post subject: |
|
|
| is there any documentation about setudf? could u point me in its direction.. i cant seem to find much. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Mar 22, 2007 2:02 pm Post subject: |
|
|
Look in the tcl-commands.doc that comes with eggdrop (a google search for 'setudef eggdrop' would've found it as well):
http://www.eggheads.org/support/egghtml/1.6.18/tcl-commands.html
setuser <handle> <entry-type> [extra info]
Description: this is the counterpart of getuser. It lets you set the various values. Other then the ones listed below, the entry-types are the same as getuser's.
PASS - sets a users password (no third arg will clear it)
HOSTS - if used with no third arg, all hosts for the user will be
be cleared. Otherwise, *1* hostmask is added
LASTON - This setting has 3 forms. "setuser <handle> LASTON
<unixtime> <place>" sets global LASTON time, "setuser
<handle> LASTON <unixtime>" sets global LASTON time
(leaving the place field empty), and "setuser <handle>
LASTON <unixtime> <channel>" sets a users LASTON time for a channel (if it is a valid channel).
Returns: nothing
Module: core |
|
| Back to top |
|
 |
veblen Voice
Joined: 13 Mar 2007 Posts: 18
|
Posted: Thu Mar 22, 2007 3:17 pm Post subject: |
|
|
hehe sorry, my mistake.. i was searching for setudf, instead of setudef
no wonder i couldnt find anything.
thanks alot guys. |
|
| Back to top |
|
 |
|