[OLD SCRIPT] Edit (admin script) - 01/11/10 05:32 PM
Hello, the script below has been created/edited by some people on this discussions board on my request a few years ago.
I just want it edited now, most of it I don't know how to do.
This is the code
I'd to have the admins added into .ini files, example:
And a command like '!mode' with a check if the person is an admin or not. If it is an admin it needs to check if its logged in (status, login=true) or not. If not > a msg like 'not logged in' etc.etc.
And a command to remove the admins (it already has a add-admin, but no del-admin).
Can someone help?
I just want it edited now, most of it I don't know how to do.
This is the code
Code:
on *:text:*:?: { if ($1 == !login) { var %nick = $findtok(%admin,$nick,32) if (%nick) { if ($gettok(%admincode,%nick,164) == $2-) { if ($gettok(%adminstatus,%nick,32) == Off) { msg $nick .: Admin nickname: $nick . :. msg $nick .: Log in status: Logged in. :. msg $nick .: Log in code: $gettok(%admincode,%nick,164) :. set %adminstatus $puttok(%adminstatus,On,%nick,32) } else { msg $nick .: Already logged in :. } } else { msg $nick .: Invalid login :. } } else { msg $nick .: Your nickname: $nick $+ . :. msg $nick .: You're a admin?: No :. msg $nick .: You're not permitted to use this command :. } } elseif ($1 == !logout) { var %nick = $findtok(%admin,$nick,32) if (%nick) { if ($gettok(%admincode,%nick,164) == $2-) { if ($gettok(%adminstatus,%nick,32) == On) { msg $nick .: Admin nickname: $nick . :. msg $nick .: Log in status: Logged out. :. msg $nick .: Log out code: $gettok(%admincode,%nick,164) :. set %adminstatus $puttok(%adminstatus,Off,%nick,32) } else { msg $nick .: Already logged out :. } } else { msg $nick .: Invalid logout :. } } else { msg $nick .: Your nickname: $nick $+ . :. msg $nick .: You're a admin?: No :. msg $nick .: You're not permitted to use this command :. } } elseif ($1 == !add-admin) { if ($nick == %superowner) { if (!$3) { msg $nick Invalid format: !add-admin nick passcode | return } var %nick = $findtok(%admin,$2,32) if (%nick) { msg $nick .: $2 already added :. msg $nick .: $2's password is $gettok(%admincode,%nick,164) :. return } else { set %admin $instok(%admin,$2,0,32) set %admincode $instok(%admincode,$3-,0,164) set %adminstatus $instok(%adminstatus,Off,0,32) msg $nick .: New admin added :. msg $nick .: Admin is named " $+ $2 $+ " :. msg $nick .: Ww $2 == $3- :. } } else { msg $nick .: Your nickname: $nick $+ . :. msg $nick .: You're a admin?: No :. msg $nick .: You're not permitted to use this command :. } } }
I'd to have the admins added into .ini files, example:
Php Code:
[admin] Name Lala [password] Name=password Lala=password [status] login=false login=true
And a command like '!mode' with a check if the person is an admin or not. If it is an admin it needs to check if its logged in (status, login=true) or not. If not > a msg like 'not logged in' etc.etc.
And a command to remove the admins (it already has a add-admin, but no del-admin).
Can someone help?