rendered paste body' save this as a .ice file.
' Change these if chanserv uses different numbers on your server; script will be updated automatically.
' to use this; make an alias like so: /add /! addaccess $1 | $2
' levels:
' 1 = voice
' 2 = halfop
' 3 = op
' 4 = protected
' so if I want to voice someone, I would do /add nickname 1
' Additionally, you can use the script as /add nickname /number/ for some other access level number.
Voice = 30
Halfop = 40
Op = 50
Protected = 100
sub addaccess(nickname,level)
channel = getidentifier("$currentwindow")
ns = nickname & " " & nickname & " " & nickname & " " & nickname
if left(channel,1)="#" then
if level=1 then
SendCommand "/msg Chanserv access " & channel & " add " & nickname & " " & voice
SendCommand "/mode " & channel & " +v-aoh " & ns
elseif level=2 then
SendCommand "/msg Chanserv access " & channel & " add " & nickname & " " & halfop
SendCommand "/mode " & channel & " +h-aov " & ns
elseif level=3 then
SendCommand "/msg Chanserv access " & channel & " add " & nickname & " " & op
SendCommand "/mode " & channel & " +o-ahv " & ns
elseif level=4 then
SendCommand "/msg Chanserv access " & channel & " add " & nickname & " " & protected
SendCommand "/mode " & channel & " +ao-hv " & ns
else
SendCommand "/msg Chanserv access " & channel & " add " & nickname & " " & level
end if
SendCommand "/echo -a Added " & nickname & " to access list at level " & level
else
SendCommand "/echo Not in a channel window."
end if
End Sub