You can turn with any command related to access cmds..in IRC
like
!access add
!access del
!access list
To start its working
Open the Bot's mIRC Window and type /access
Thats all..
#########Access Chan Commands For Bot ###########
alias Access-on {
.guser Services Chanserv 8
set %access on
}
alias Access-off {
.ruser Services Chanserv 8
set %access off
}
on @*:TEXT:!access*:#: {
if ($nick isop $chan) && (%access == on) {
if ($2 == add) {
cs access $chan add $3 $4
notice $chan $3 Is added to Level $4
}
elseif ($2 == del) {
cs access $chan del $3
notice $chan $3 Deleted from Access list
}
elseif ($2 == list) {
cs access $chan list
set %anick $nick
}
else { halt }
}
}
on Services:NOTICE:*:*: {
notice %anick $1-
}
Its okay, that's why I posted that chunk for you, so you could learn. Not bad for the first time. But now your snippet has another fatal error. You forgot the "o" in on TEXT :P You can also combine the if ($nick isop $chan) and if (%access == on) into one line. Like this:
on @*:TEXT:!access*:#: {
if ($nick isop $chan) && (%access == on) {
if ($2 == add) {
cs access $chan add $3 $4
notice $chan $3 Is added to Level $4
}
elseif ($2 == del) {
cs access $chan del $3
notice $chan $3 Deleted from Access list
}
elseif ($2 == list) {
cs access $chan list
set %anick $nick
}
else { halt }
}
}
Here this would make it more secure so that only current channel ops can add access. You also don't need the if (%access == on) more than once.
on @*:TEXT:!access*:#: {
if (%access == on) {
if ($2 == add) {
cs access $chan add $3 $4
notice $chan $3 Is added to Level $4
}
elseif ($2 == del) {
cs access $chan del $3
notice $chan $3 Deleted from Access list
}
elseif ($2 == list) {
cs access $chan list
set %anick $nick
}
else { halt }
}
}