mIRC Home    About    Download    Register    News    Help

Print Thread
#159101 14/09/06 01:07 AM
Joined: Apr 2006
Posts: 43
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2006
Posts: 43
I was making this basic script (Seen below)
And I was wondering... How can I do it so if the user in the channel is in admin.txt that he can access every command. But if the person isnt in admin.txt that he can only access +v / -v
Code:
 on *:TEXT:*:#: {
  if ($1 == +v) mode $chan +v $2 
  if ($1 == -v) mode $chan -v $2 
  if ($1 == +h) mode $chan +h $2 
  if ($1 == -h) mode $chan -h $2 
  if ($1 == +o) mode $chan +o $2 
  if ($1 == -o) mode $chan -o $2 
  if ($1 == +a) mode $chan +a $2 
  if ($1 == -a) mode $chan -a $2 
  if ($1 == +q) mode $chan +q $2 
  if ($1 == -q) mode $chan -q $2 
} 

#159102 14/09/06 01:59 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Quote:
I was making this basic script (Seen below)
And I was wondering... How can I do it so if the user in the channel is in admin.txt that he can access every command. But if the person isnt in admin.txt that he can only access +v / -v
Code:
 on *:TEXT:*:#: {
[color:red]if ($nick iswm $read(admin.txt,w,$+(*,$nick,*))) { [/color]
  if ($1 == +h) mode $chan +h $2 
  if ($1 == -h) mode $chan -h $2 
  if ($1 == +o) mode $chan +o $2 
  if ($1 == -o) mode $chan -o $2 
  if ($1 == +a) mode $chan +a $2 
  if ($1 == -a) mode $chan -a $2 
  if ($1 == +q) mode $chan +q $2 
  if ($1 == -q) mode $chan -q $2 
[color:red]}
else {[/color]
  if ($1 == +v) mode $chan +v $2 
  if ($1 == -v) mode $chan -v $2 
[color:red]}[/color] 
}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#159103 14/09/06 03:28 AM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Change
Code:
 if ($nick iswm $read(admin.txt,w,$+(*,$nick,*))) {  


to

Code:
 if ( $read(admin.txt,nw,$nick) ) { 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Link Copied to Clipboard