Author Topic: when Deoped reop  (Read 3711 times)

Eurofighter

  • Newbie
  • *
  • Posts: 2
when Deoped reop
« on: May 02, 2008, 02:37:36 PM »
i have a  code that when someone deops me i reop :
Code: [Select]
Sub ONOP(ModeSet,Nickname,Host,ModeSetter,ModeSetterHost,Channel,ServerNumber)
If Nickname = MyNickName(ServerNumber)then
SendCommand "/say !up"
End If
End Sub

i also have
Code: [Select]
Sub ONOP(ModeSet,Nickname,Host,ModeSetter,ModeSetterHost,Channel,ServerNumber)
If Nickname = MyNickName(ServerNumber)then
SendCommand "/mode  "& channel &" +o $me"
End If
End Sub

what i want to do is put it into one script so that the  /mode  "& channel &" +o $me bit triggers first and if im not oped after that it says !up

thanks in advance

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: when Deoped reop
« Reply #1 on: May 02, 2008, 06:21:53 PM »
Are you getting any errors?

Also, you can not put 2 ONOP, or any ON... type events into 1 file, as IceChat will only fire the 1st one.
The IceChat God

Eurofighter

  • Newbie
  • *
  • Posts: 2
Re: when Deoped reop
« Reply #2 on: May 03, 2008, 01:46:17 PM »
no errors apart from when im deoped OR oped it says !up, and when im deoped the /mode bit doesnt work(obviously)

so what i want is to know how u set ONOP to ONDEOP if that makes sense

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: when Deoped reop
« Reply #3 on: May 03, 2008, 08:59:09 PM »
Well, you can not +o yourself when your de-opped, thats obvious.

Code: [Select]
If Nickname = MyNickName(ServerNumber) then
   SendCommand "/say !up"
End If

The above code will cause problems if you are not in the same channel or server as the De-op happened.
Also, ONOP fires for Deops and Ops, so its best to specify which one.

I am also guessing that the !up message ops you with some bot or such.
Try this out.

Code: [Select]
Sub ONOP(ModeSet,Nickname,Host,ModeSetter,ModeSetterHost,Channel,ServerNumber)
If ModeSet = "False" and NickName = MyNickname(ServerNumber) then
  SendCommand "/msg " & Channel & " !up", ServerNumber
End If
End Sub

The IceChat God

DocBeat

  • Newbie
  • *
  • Posts: 43
Re: when Deoped reop
« Reply #4 on: June 30, 2008, 10:22:41 AM »
Hi i've got this small script i am using in IrCQnet which reops me when someone deops me since i have access to the channel too.I thought to post it here under the same topic since it's relative (i wasn't sure).

Code:
Sub ONMODE(Channel,ModeSetter,Mode,ServerNumber)
if mode="-o " & MyNickName then SendCommand "/msg chanserv op " & channel & " " & MyNickName,ServerNumber
End Sub
I was wondering how can i prevent it from reoping me when it is me who deops myself or some other people which i'd like to be able to deop me.In short i'd like to be able to add as much nicks as i want and give them that 'privilege' - i thought of some placing some NOTs for the IF while having some variable for nickname but i don't know much of VB and the variables in icechat  :-(