Code: Select all
bind raw - INVITE invites:join
proc invites:join {from key arg} {
set chan [string range [lindex [split $arg] 1] 1 end]
set chans [llength [split [channels]]]
set nick [lindex [split $from !] 0]
if {$chans == 30} {
putquick "NOTICE $nick :This bot is currently full, searching for other bots."
putquick "PRIVMSG #boombot :join $chan"
utimer 10 [list invites:joinmsg $chan $nick]
return
if {$chans < 30} {
channel add $chan
return
}
}
set requirement 5
proc invites:joinmsg {nick uhost hand chan} {
global requirement
set chans [llength [chanlist $chan]]
if {$chans < $requirement} {
putquick "PART $chan :You need atleast 5 users to have this bot in your channel$
channel remove $chan
if {[onchan \[De\]BoomBot $chan]} {
putlog "OMG \[De\]BoomBot is on $chan"
putquick "PART $chan You already have a BoomBot in your chan."
channel remove $chan
}
return
}
if {$chans >= 5} {
if {[string equal -nocase $::botnick $nick]} {
putquick "PRIVMSG $chan :\00302BoomBot v1.9 by \00307Red_Rooste5"
return
}
}
}
}
Code: Select all
bind pub * join join:de
proc join:de {nick uhost hand chan text} {
if {[string equal -nocase BoomBot $nick]} {
channel add $text
}
}
bind join * {*} joinmsg:de
proc joinmsg:de {nick uhost hand chan} {
if {llength [split [chanlist $chan]]] < 5} { putquick "PART $chan :You need atl$
channel remove $chan
}
}
{
if {[string equal -nocase \[De\]BoomBot $nick]} {
if {[llength [split [chanlist $chan]]] > 5} {
putquick "PRIVMSG $chan :\00302BoomBot v1.9 by \00307Red_Rooste5"
}
}
}
Well... The first problem on the first bot is that it won't join...
And the second bot won't even start with that script.
On the first script, it's meant to get the invite, but if the bot is on 30 channels, it'll message #boombot join $chan but if it's not on 30 channels it will join, though if the channel has 5 or less users, it will part. And on the second one, it's meant to look after "join #chan" and join the channel if "BoomBot" is the one saying the command.