egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED] bind pub

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
veblen
Voice


Joined: 13 Mar 2007
Posts: 18

PostPosted: Thu Mar 22, 2007 8:11 am    Post subject: [SOLVED] bind pub Reply with quote

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
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu Mar 22, 2007 9:07 am    Post subject: Re: bind pub Reply with quote

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
View user's profile Send private message
veblen
Voice


Joined: 13 Mar 2007
Posts: 18

PostPosted: Thu Mar 22, 2007 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu Mar 22, 2007 11:26 am    Post subject: Reply with quote

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
View user's profile Send private message
veblen
Voice


Joined: 13 Mar 2007
Posts: 18

PostPosted: Thu Mar 22, 2007 12:46 pm    Post subject: Reply with quote

is there any documentation about setudf? could u point me in its direction.. i cant seem to find much.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Mar 22, 2007 2:02 pm    Post subject: Reply with quote

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 Razz
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
View user's profile Send private message
veblen
Voice


Joined: 13 Mar 2007
Posts: 18

PostPosted: Thu Mar 22, 2007 3:17 pm    Post subject: Reply with quote

hehe sorry, my mistake.. i was searching for setudf, instead of setudef Shocked

no wonder i couldnt find anything.

thanks alot guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber