09-04-2011, 12:13 PM
What Can You Code:
mSL
Favorite Coding Language:
mSL
Will You Give Support To Fellow Coders:
Yes
How Many Hours Per Week Can You Be On:
Not sure, school just started.
Age:
16
Proof Of Your Coding Abilities:
Basic login script & admin only commands I'm working on making tutorials for, on my 3rd so far. So it's still pretty basic. I've commented on each line of the code.
mSL
Favorite Coding Language:
mSL
Will You Give Support To Fellow Coders:
Yes
How Many Hours Per Week Can You Be On:
Not sure, school just started.
Age:
16
Proof Of Your Coding Abilities:
Basic login script & admin only commands I'm working on making tutorials for, on my 3rd so far. So it's still pretty basic. I've commented on each line of the code.
PHP Code:
on $*:TEXT:/[!.`@]login */Si:#:{
//basic on text trigger
{ var %t .timer }
//sets a variable as a timer
if ($2 != Example) { inc $+(%,invalid.,$nick) | notice $nick Login wrong }
//if the 2nd statement isn't 'Example' it adds to %invalid.$nick (ex, %invalid.nickname 1,2,3,4)
if ($($+(%,invalid.,$nick),2) > 4) { ignore -u15 $nick | %t 1 15 unset $+(%,invalid.,$nick) | msg $nick Black listed }
//if they have 5 logins that were incorrect it'll ignore them and tell them they've been blacklisted
if ($2 == Example) { set $+(%,login.,$nick) true | %t 1 7200 unset $+(%,login.,$nick) | unset $+(%invalid.,$nick) | msg $nick Login Correct }
//if the password was correct, they'll be logged in. %invalid.nickname will be unset, and a timer is set to log them out in 2 hours.
}
on $*:TEXT:/[!.`@]admin/Si:#:{
//basic on text trigger
if ($($+(%,login.,$nick),2) == true) { .notice $nick admin command.. }
//if user is logged in they get this
else { .notice $nick You are currently not logged in or do not have access }
//if user is not logged in they get this
}