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.

I need help with a script

Old posts that have not been replied to for several years.
Locked
p
picas0

I need help with a script

Post by picas0 »

Ok lets start hope you can help me :D



I trying to make a tcl script .....
When my bot is on 20 channels he part #bothut and when he have parted a another chan he join #bothut and I want it o work plz help me
S
Stone

I will try it ;p

Post by Stone »

Code: Select all

bind pub n ".check" part:join
proc part:join {nick uhost handle channel text} {
if {[llength [channels]] == 20} {
putquick "privmsg #i-sg.tcl :I am full, part"
channel remove #yourchan
} else { channel add #yourchan }
}
Last edited by Stone on Tue Nov 11, 2003 6:45 pm, edited 3 times in total.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hint: instead of removing the channels and adding them back better to a +inactive and -inactive and get the number of the channels he is on with a different thing, something like:

Code: Select all

set mychannels 0
foreach chan [chanlist] {
if {[botonchan $chan]} {
incr mychannels
}
}
something like this anyway.. I'm to damn tierd to think at other methods right now..
Once the game is over, the king and the pawn go back in the same box.
S
Stone

Post by Stone »

closed, ;D
Locked