i got bored and decided to make this Napa182 helped me with it it only works for Admin status it dont give out any other status it uses a while loop to if the nick is in the var it +a's them plzz leave comments and Enjoy
Im working on adding some more code to it to allow you to give more status with it any suggestions would be appreciated
on @*:Text:*:#:{
if ($strip($1) == !accessadd) {
.cs access $chan add $2-
set %Levels.$chan $addtok(%Levels.$chan,$2,44)
msg $chan 4 Access List updated for $2 To $3
}
if ($strip($1) == !sync) { var %^ = $numtok(%Levels.$chan,44) | while (%^) { mode $chan +a $gettok(%Levels.$chan,%^,44) | dec %^ } }
}
not yet Napa182 one sec and i will.
i think im forgetting to check for the nicks Napa182 how would i go about it on the script i just posted as a comment?
i just threw this part of the code together on the bottom part Napa182 this is what i want it to do
on *:Text:*:#:{
if ($me isop $chan) {
if ($nick isop $chan) {
if ($strip($1) == !accessadd) {
cs access $chan add $2
msg $chan AccessList Updated For $2 To $3
writeini Access.ini $2 Nick $2 $3
writeini Levels.ini Level $2 $3
}
if ($strip($1) == !sync) {
%var = $readini(Levels.ini,Level,$2,$3)
%var = $Check(Levels.ini,Level,$2)
if (%var = 3) { Mode $chan +v $2 }
if (%var = 4) { Mode $chan +h $2 }
if (%var = 5) { mode $chan +o $2 }
if (%var = 9) { mode $chan +o $2 }
if (%var = 10) { mode $chan +a $2 }
if {%var = 9999) { mode $chan +vhoaq $2 $2 $2 $2 $2 }
}
}
}
}
}
thats what i want it to be like but i think it needs to check the ini file for the nick and the level how would i go about that napa182 and i still dont think the vars are right on it
i wanted to use something like this thou
on *:Text:*:#:{
if ($me isop $chan) {
if ($nick isop $chan) {
if ($strip($1) == !accessadd) {
cs access $chan add $2
msg $chan AccessList Updated For $2 To $3
writeini Access.ini $2 Nick $2 $3
writeini Levels.ini Level $2 $3
msg $chan 4 AccessList Updated
}
if ($strip($1) == !sync) {
%var = $readini(Levels.ini,Level,$2,$3)
if (%var = $2,4) { Mode $chan +h $2 }
}
}
}
}
but i cant get the vars on this right
if ($strip($1) == !sync) {
%var = $readini(Levels.ini,Level,$2,$3)
if (%var = 4) { mode $chan +h $2 }
}
cause like i said i want to make it with more access add commands and i want it to sync and read from the ini file to give the right status to the right nick but i cant figure the vars out any suggestions would be appreciated i kinda wanna stay along the lines of the code.
on owner:Text:*:#:{
if ($strip($1) == !accessadd) {
.cs access $chan add $2-
set $+(%,Levels,.,$chan) $addtok($($+(%,Levels,.,$chan),2),$2,44)
msg $chan 4 Access List updated for $2 To $3
}
if ($strip($1) == !sync) { var %^ = $numtok($($+(%,Levels,.,$chan),2),44) | while (%^) { mode $chan +a $gettok($($+(%,Levels,.,$chan),2),%^,44) | dec %^ } }
}
but like i said you should maybe add some error checks to it.