Author Topic: Voice VOP Only  (Read 2590 times)

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Voice VOP Only
« on: April 06, 2008, 03:32:36 PM »
Hi, I Quickly Wrote This script To Only Voice People If They Arent HalfOpped or Opped Yet, Since The Services Bot Halfops, Voices, and Ops People first, before my bot does.

Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,Servernumber)
If ISOP(Nickname,Channel,ServerNumber)=True then Exit Sub
If ISHALFOP(Nickname,Channel,ServerNumber)=True then Exit Sub
SendSendCommand "/mode " & Channel & " +v " & Nickname & " "
End If
End If
End Sub

It Doesn't Work Though, Whats Wrong?
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Voice VOP Only
« Reply #1 on: April 06, 2008, 04:26:18 PM »
You dont need the 2 "end if" statements, because you have placed the "then" part on the same line as the if statement.
The IceChat God

Jacob

  • Newbie
  • *
  • Posts: 45
Re: Voice VOP Only
« Reply #2 on: April 21, 2008, 04:00:52 PM »
And it says SendSendCommand

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Voice VOP Only
« Reply #3 on: April 21, 2008, 04:54:13 PM »
And also, when you join a channel, it will not necessarily pick up that the user is an op right away, as the JOIN event occurs before the MODE event to op the user by chanserv,etc.
The IceChat God