Excuse me, what are these to mean:
if ($3 = !isnum)
if ($2 = !$isalnum)There is no such identifier as $isalnum unless you have a custom alias for it, which I don't see it in your script.
The correct format should have been:
if ($3 !isnum) {
and
if ($2 !isalnum) {
I don't reckon that is an old way of MSL coding, if so; I apologize, you should adapt to the new coding standard.
Well, what known meant by goto was this:
on $*:Text:/^`(login|register|setaccess)\b/iS:*:{
goto $regml(1)
:login
if (!$2) { /msg $nick Usage: `login password }
elseif ($readini($+($1,.ini),info,password) == $null) { msg $nick You have not registered. }
elseif ($readini($+($1,.ini),info,password) == false) { msg $nick You have not set a password. }
elseif ($readini($+($1,.ini),info,loggedin) == true) { msg $nick You Are Already Logged In }
login $nick $2
halt
:register
if (!$2) { msg $nick Usage: `register password }
elseif ($readini($+($1,.ini),info,password) = !$null) { msg $nick Your already registered }
elseif ($2 = !$isalnum) { msg $nick Special characters are not supported. Characters Supported: a-z and 0 - 9 }
register $nick $2
msg $nick You are now registered with the password: $2
halt
:setaccess
failsafe $nick
if ($uaccess($nick) < 3) { msg $nick Insufficient Privileges, Your access level is only: $uaccess($nick) }
elseif (!$3) { msg $nick Insufficient Parameters, `setaccess nick level(1-4) }
elseif ($regged($2) = false) { msg $nick Exception Caught: $2 is not a registered user }
elseif ($3 = !isnum) { msg $nick Exception Caught: Invalid user level: Must be numeric 1-4 }
elseif ($3 <= 4) { msg $nick Exception Caught: Maximum user level: 4 }
writeini $2 info access $3
msg $nick $2 $+ 's access level is now set to: $3
halt
:ping
failsafe $nick
if ($uaccess($nick) < 3) { notice $nick Insufficient Privileges, Your access level is only: $uaccess($nick) }
elseif ($2 == $null) { set %p $target | /ctcp $me Ping }
set %p $target
ctcp $2- ping
halt
}
which only requires one text event. goto is not well considered a good coding method or habit, but depending on the appropriate use of the command, it can be quite handy in some instances and reduces the script size over all. If you want to keep your script orderly uniform, stick to if-elseif-then-else conditions. With if-elseif-then-else condition practiced accordingly, you don't even have to use the /halt unnecessarily.