IceChat Forums

IceChat 5 Scripting => Uploaded Scripts => Topic started by: Snerf on May 21, 2004, 02:03:14 PM

Title: Very Basic Auto-Op/Auto-Voice Script
Post by: Snerf on May 21, 2004, 02:03:14 PM
Copy all text below and

place in an existing or a new Script File
You will need to change your Channel for your own Channel

For the if

GetIdentifier(CheckMask,ServerNumber) = line . you will
need to add an if statement for each

user you want, and either doing a +v or a +o for the user.

Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)

'check for this channel, and the channel name is case sensative
if Channel = "#icechat" then
     'make sure you are an OP first before you try and Auto-Op/Auto-Voice
     if IsOp("$me", Channel, ServerNumber) then
          'check for the Hostnames here using *!*@host (#2 for $mask)
          CheckMask = "$mask(" & Nickname & "!" & Host & ",2)"
          'check for the individual masks here, and they are case sensative
          if GetIdentifier(CheckMask,ServerNumber)  = "*!*" then
               'you can use +v for auto-voice and +o for auto-op
               SendCommand "/mode " & Channel & " +v " & Nickname,ServerNumber
          end if
     End if
End if

End Sub