on *:INVITE:#:{
if ($comchan($me,0) == 30) {
notice $nick Sorry, I'm already on 30 channels...More bots will be up soon.
}
else {
set %ichan $chan
set %inick $nick
join %ichan
set %ichk true
}
}
on *:JOIN:%ichan: {
if ($nick == $me) && (%ichk) {
if (%inick isop $chan || %inick ishop $chan) {
msg # Hi, I'm $me $+ . I was invited by %inick $+ . To part me, simply kick me.
}
elseif (%inick isvoice # || %inick isreg #) {
part # Sorry, but %inick is not operator or half-operator on this channel, and it's required that you are operator or half-operator to invite $me $+ .
}
unset %ichan %inick %ichk
}
}