whats wrong with this??? - 22/09/04 09:07 PM
hey, could you please help me with this,
i dont know why its not working
for some reason when i type add bla bla it writes it the first time
but if i type the same thing it wont tell me that %name
already has access of %level
Code:
on *:TEXT:Access Add*:#:{
if ($nick != mynick) || ($address($nick,2) != *!*@myaddress) {
msg # Sorry You Cant Use This Command.
goto end
}
else {
if (!$3) || (!$4) || (!$5) || (!$6) {
msg # Sorry Not Enough Parameters.
goto end
}
if ($3 !ison $chan) {
msg # $3 Is Not On # Attempting To Add Anyway.
}
if ($4 == Access) && ($5 == Level) {
var %name = $3
var %level = $6
if ($read(Access.txt,s,$3)) {
tokenize 1 $read(Access.txt, $readn)
var %nick = $1
var %access.level = $2
if (%level == %access.level) {
msg # %name Allready Has Access Level Of %level
goto end
}
if (%access.level != %level) {
write -dl [ $+ [ $readn ] ] Access.txt
msg # I Changed %name $+ 's Access From $2 To %level
msg # To View Your Access Commands Type " My Access Commands"
goto end
}
}
if (!$read(Access.txt,s,%name)) {
write Access.txt %name $chr(1) %level $chr(1) $date(dddd) the $ord($date(dd)) Of $date(mmmm) $date(yyyy) $chr(1) $time(h:nn tt)
msg # Added %name To Access At Level %level
msg # To View Your Access Commands Type "My Access Commands"
}
}
:end
}
}
any ideas,
thanks alot
i dont know why its not working
for some reason when i type add bla bla it writes it the first time
but if i type the same thing it wont tell me that %name
already has access of %level
Code:
on *:TEXT:Access Add*:#:{
if ($nick != mynick) || ($address($nick,2) != *!*@myaddress) {
msg # Sorry You Cant Use This Command.
goto end
}
else {
if (!$3) || (!$4) || (!$5) || (!$6) {
msg # Sorry Not Enough Parameters.
goto end
}
if ($3 !ison $chan) {
msg # $3 Is Not On # Attempting To Add Anyway.
}
if ($4 == Access) && ($5 == Level) {
var %name = $3
var %level = $6
if ($read(Access.txt,s,$3)) {
tokenize 1 $read(Access.txt, $readn)
var %nick = $1
var %access.level = $2
if (%level == %access.level) {
msg # %name Allready Has Access Level Of %level
goto end
}
if (%access.level != %level) {
write -dl [ $+ [ $readn ] ] Access.txt
msg # I Changed %name $+ 's Access From $2 To %level
msg # To View Your Access Commands Type " My Access Commands"
goto end
}
}
if (!$read(Access.txt,s,%name)) {
write Access.txt %name $chr(1) %level $chr(1) $date(dddd) the $ord($date(dd)) Of $date(mmmm) $date(yyyy) $chr(1) $time(h:nn tt)
msg # Added %name To Access At Level %level
msg # To View Your Access Commands Type "My Access Commands"
}
}
:end
}
}
any ideas,
thanks alot