mIRC Homepage
Posted By: KoRn18 access - 23/08/03 06:52 PM
how can i set up a bot that does !op and !opme and those things but only letting the right people do those commands, and also !addaccess and !remaccess and also perform commands sent in query but all of this only by access users
Posted By: Collective Re: access - 23/08/03 06:58 PM
Have you read /help Access Levels?
Posted By: KoRn18 Re: access - 23/08/03 07:06 PM
hehehe yeah i did smile and on text also grin

i think i can handle most of this, just need help with add access and rem access

also would this work to see if the $2 is in the channel set in the var '%chan' and then ban, if they r?

if ($2 ischan %chan) { /mode %chan +b $2 }
Posted By: Collective Re: access - 23/08/03 07:30 PM
Here is a basic script to do what you asked:
Code:
on @5:TEXT:!opme:[color:green]#channel[/color]:{
  mode # +o $nick
}
on 10:TEXT:!addaccess & &:?:{
  guser $2 $3 2
  msg $nick Added $3 to access list with level $2 $+ .
}
on 10:TEXT:!remaccess &:?:{
  ruser $2 2
  msg $nick Removed $2 from access list.
}

!addaccess 5 bob would allow bob to use the !opme command.
!addaccess 10 bob would allow bob to use the !opme command, !addaccess and !remaccess commands.
!remaccess bob would remove bob's access to all commands.

As for your other question the answer is no, ischan is only used to see if you are on a channel, not anyone else. If you want to ban all users who join your channel who are also on an "enemy" channel try Racoon's script here.
© mIRC Discussion Forums