on *:open:*:?:{
if ($1 == login) {
if (!$readini(database2.ini,Admins,$address($nick,2))) {
msg $nick Error: You are not on the userlist.
halt
}
if ($readini(database2.ini,Loggedin,$address($nick,2)) == $true) {
msg $nick Error: You are already loggedin.
halt
}
else {
writeini database2.ini Loggedin $address($nick,2) $true
msg $nick Success: You have been loggedin.
}
}
if ($1 == logout) {
if (!$readini(database2.ini,Admins,$address($nick,2))) {
msg $nick Error: You are not on the userlist.
halt
}
if (!$readini(database2.ini,Loggedin,$address($nick,2))) {
msg $nick Error: You are not loggedin.
halt
}
else {
remini database2.ini Loggedin $address($nick,2)
msg $nick Success: You have been logged out.
}
}