on *:TEXT:!login
PASSWORD:?: { set %logged.in.nick $nick }
on *:TEXT:!logout:?: { unset %logged.in.nick }
on *:NICK:{ if ($nick == %logged.in.nick) { set %logged.in.nick $newnick }
on *:PART:#:{ if ($nick == %logged.in.nick) { if (!$comchan($nick,0)) { unset %logged.in.nick | msg $nick Due to you leaving all common channels with me I have logged you out } } }
on *:QUIT:{ if ($nick == %logged.in.nick) { unset %logged.in.nick } }
those cover you PMing
!login password to login
or PMing
!logout to logout
it also covers you changing nicks
you parting all comon channels (auto logout)
and you quiting
Now how to use it.
in any bot event which you want to be the only one (once logged in) to be able to use add this code at the begining
example
ON *:TEXT:!burp:?:{
[color:blue]if ($nick == %logged.in.nick) {[/color]
amsg burp!
}
}