mIRC Homepage
Posted By: MrPeepers access log in - 24/08/03 07:46 AM
I searched the forums and found a code I liked and could use but I was wondering on how to convert it to be able to handle multi levels heres the code first
on 1:TEXT:login*:?: {
if ($2) && ($3) {
if ($readini(access.ini, Access, $2) != $3) {
/auser 10 $nick
.notice $nick You have been logged in.
}
else {
.notice $nick Error: Invalid username and/or password
}
}
else {
.notice $nick Invalid Syntax: login <username> <password>
}
}
I was wondering if the if ($readini(access.ini, Access, $2) != $3) was the key? Would I try to have it read for topics and have an access ini with topics for lowest level users of my bot to the highest?
Posted By: MrPeepers Re: access log in - 24/08/03 08:34 AM
OKay Im this far,
on 1:TEXT:login*:?: {
if ($2) && ($3) {
elseif ($readini(access.ini, AccessMaster, $2) != $3) {
/auser 500 $nick
.notice $nick You have been logged in as Master.
}
elseif ($readini(access.ini, AccessSprOp, $2) != $3) {
/auser 10 $nick
.notice $nick You have been logged in as Super Op.
}
elseif ($readini(access.ini, AccessOp, $2) != $3) {
/auser 9 $nick
.notice $nick You have been logged in as Op.
}
elseif ($readini(access.ini, AccessAdvUsr, $2) != $3) {
/auser 8 $nick
.notice You have been logged in as Advanced User.
else {
.notice $nick Error: Invalid username and/or password
}
}
else {
.notice $nick Invalid Syntax: login <username> <password>
}
}
when I messed up and had elseif ($readini(access.ini, AccessMaster, $2) != $3) without the else it would add me to the superop but Im master any help would be appreciated
Posted By: MrPeepers Re: access log in - 24/08/03 01:47 PM
Okay with no response Ive been working on this this is the access.ini
[AccessMaster]
user=psw
user=psw

[AccessSprOp]
user=psw
user=psw

[AccessOp]
user=psw
user=psw

[AccessAdvUsr]
user=psw
Now when i have a user under master they get suprop but when under suprop get master any clue why?
Posted By: MrPeepers Re: access log in - 24/08/03 02:07 PM
well I guess I got it on my own lol, If I just add an extra letter to the psw in the ini say the psw is wowimcool id put wowimcoolx then it works right no clue why tho
© mIRC Discussion Forums