Author Topic: [Question] Auto op script  (Read 4724 times)

yves_982

  • Newbie
  • *
  • Posts: 6
[Question] Auto op script
« on: May 27, 2007, 10:08:53 AM »
Well i've tried to set up an auto op script in the new scripting style

on *:join:#myChan:{
     if ($me isop $chan) {
          if (instr( $mask($nick,8), someHost) &&  instr( $mask($nick,8), someIdent)) {
                    /mode $chan +o $nick
          }
     }
}

but the first "if" doesn't seems to work (e.g sometimes
even if i'm not op the script send the command
and i receive an error. I'd appreciate if someone know how to make that
in the new style (checking host and ident and +o mode).

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: [Question] Auto op script
« Reply #1 on: May 27, 2007, 10:29:13 AM »
Well, that script won't quite work,, but the main reason, there is no "instr" command implemented.
To make the if statement work, it just needed some extra spaces.

if ( $me isop $chan )

There is an easier way to do this.  If you go to the Buddy List, and edit it, go to the Auto Nick Control Tab.
From the list type, choose Auto-Op.
Add your address, channel, and the Network it is on (ie: Quakenet).
The IceChat God

yves_982

  • Newbie
  • *
  • Posts: 6
Re: [Question] Auto op script
« Reply #2 on: May 27, 2007, 11:37:04 PM »
Ah ok thanks Snerf :)