1. all your goto's are mute, you might as well remove them
2. if (!$3) || (!$4) || (!$5) || (!$6) -- you can replace this with just if ($6) { do stuff } -- if $6 exists, so will $3-$53.
3. your check to see if it's you is HIGHLY insecure. Also, since you cannot triger your own on text events, how does this work? Is it a clone from you? Best would be to add a password or something you also need to type. Especially since this goes into open channel...
on *:TEXT:Access Add*:#:{
[color:green]; this checks if it's you a wee bit more secure[/color]
if ($mask($fulladdress,3) != *!*yourident@*.yourdomain.com) msg # Sorry You Cant Use This Command.
[color:green]; check if there's enough parameters[/color]
elseif ($!6) msg # Sorry Not Enough Parameters.
[color:green]; check if the nick is present[/color]
elseif ($3 !ison $chan) msg # $3 Is Not On # Attempting To Add Anyway.
[color:green]; check for correct parameters[/color]
elseif ($4 == Access) && ($5 == Level) {
[color:green]; save entered data for later use[/color]
var %nick $3, %level $6
[color:green]; see if the user already exists[/color]
if ($read(Access.txt,s,$3)) {
[color:green]; if he does, read his info[/color]
tokenize 1 $read(Access.txt, $readn)
[color:green]; check info for match[/color]
if ($2 == %level) msg # $1 already has accesslevel $2 !
[color:green]; if it's not an exact match, delete old info[/color]
else {
write -dl [ $+ [ $readn ] ] Access.txt
msg # Changing $1 $+ 's Access From $2 to %level
}
}
[color:green]; add new info[/color]
if ($!read(Access.txt,s,$3)) {
write Access.txt %nick $chr(1) %level $chr(1) $date(dddd) the $ord($date(dd)) Of $date(mmmm) $date(yyyy) $chr(1) $time(h:nn tt)
msg # Added %nick To Access At Level %level
msg # To View Your Access Commands Type "My Access Commands"
}
}
}
Now I can't guarantee since I can't test it here, but this *should* work.