This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
D
Doberspand
Post
by Doberspand » Wed Apr 09, 2003 10:56 am
Helllo,
Im trying to make my bot join a channel when i write !join in a query.. but so far everything I have tried dont work so if anyone would like to show me how it could be done I would be gratefull
Thanks in advance.
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Wed Apr 09, 2003 11:07 am
We like to help others that help themselves..
Try posting the code you have tried, and we can explain what you have done wrong, which may help you with learning Tcl.
D
Doberspand
Post
by Doberspand » Wed Apr 09, 2003 12:11 pm
Sure, here is my code:
Code: Select all
bind PRIVMSG - !join loginAndStuff
set pasteChan "#evilchan"
# loginAndStuff
proc loginAndStuff {handle idx arg} {
channel add $pasteChan {
chanmode "+nt"
idle-kick 20
flood-chan 10:60
flood-deop 3:10
flood-kick 3:10
flood-join 5:60
flood-ctcp 3:60
}
channel set $pasteChan -bitch +secret -autoop -clearbans -stopnethack -enforcebans
channel set $pasteChan -greet -revenge -dynamicbans -protectops -statuslog -userbans
channel set $pasteChan -shared -autovoice -cycle -seen -dontkickops -dontdeopops
putlog "joined $pasteChan"
putchan $pasteChan "IM da evilbottie"
return 1
}
when someone write !join in a query with the bot its suppose to join the chan specified in $pasteChan
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Wed Apr 09, 2003 3:50 pm
no need to add the channel settings like that. The settings you set in the config-file is global and will apply to all channels, if you add them using the built-in .+chan command or through a tcl-script.
also... read the tcl-commands.doc found in the /doc dir on your eggdrop about different kind of binds.
Elen sila lúmenn' omentielvo