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.

Making the bot join a channel

Old posts that have not been replied to for several years.
Locked
D
Doberspand

Making the bot join a channel

Post by Doberspand »

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.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

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 »

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
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

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
Locked