mIRC Home    About    Download    Register    News    Help

Print Thread
access log in #43861 24/08/03 07:46 AM
Joined: Aug 2003
Posts: 136
MrPeepers Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Aug 2003
Posts: 136
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?


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
Re: access log in #43862 24/08/03 08:34 AM
Joined: Aug 2003
Posts: 136
MrPeepers Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Aug 2003
Posts: 136
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


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
Re: access log in #43863 24/08/03 01:47 PM
Joined: Aug 2003
Posts: 136
MrPeepers Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Aug 2003
Posts: 136
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?


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
Re: access log in #43864 24/08/03 02:07 PM
Joined: Aug 2003
Posts: 136
MrPeepers Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Aug 2003
Posts: 136
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


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.