Simple Bot control snippet
simple script, i was bored.
it can have the bot talk, join, or part in channels
on *:TEXT:msg * *:?:{ msg $2 $3-
}
on *:TEXT:join *:?:{ /join $2
}
on *:TEXT:part *:?: /part $2
}
Oh boy every once in a while, this sort of code shows up:
on $*:text:/\b(msg|join|part)\s(\43\S+)\b/iS:?:{
if ($istok(join part,$regml(1),32)) {
$regml(1) $regml(2)
}
else { msg $regml(2) $strip($$3-) }
}
You gotta make sure the $2 entered starts with the chantype "#" or it can be anything else to result an error. This is best done with regex as shown per my example.