mIRC Home    About    Download    Register    News    Help

Topic Options
#43861 - 24/08/03 08:46 AM access log in
MrPeepers Offline
Vogon poet

Registered: 05/08/03
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.

Top
#43862 - 24/08/03 09:34 AM Re: access log in
MrPeepers Offline
Vogon poet

Registered: 05/08/03
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.

Top
#43863 - 24/08/03 02:47 PM Re: access log in
MrPeepers Offline
Vogon poet

Registered: 05/08/03
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.

Top
#43864 - 24/08/03 03:07 PM Re: access log in
MrPeepers Offline
Vogon poet

Registered: 05/08/03
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.

Top