Need help with logging override script

By CadetAndrew on Nov 28, 2014

Need some help with an SRVX override log script. What I'm trying to do is simply log any overrides that might be done by network helpers or operators on a network that uses SRVX. So far, I know the INPUT isn't working. The variables are setting, but not echoing. It's been a long time since I've made a decent MRC script (and even with that one I needed some assistance).

So... here ya go:

on 1:INPUT:#:{
  ; Toggling Helping Mode or Security Override? This will help find it with the %help.or.override variable
  ; Assuming we're just toggling...
  if ($1 == !god) {
    if ($2 == $null) { 
      set %help.or.override $1-2
    }
    else {
      ; Did we turn it on?
      if ($2 == on) || ($2 == 1) { 
        set %help.or.override $1-2
        set %override enabled
      }
      ; Turned off?
      if ($2 == off) || ($2 == 0) { 
        set %help.or.override $1-2
        set %override disabled
      }
    }
  }
}

on *:NOTICE:*:*:{
  if ($nick == ChanServ) {
    if ($5 == enabled) || ($6 == enabled) { 
      set %override enabled
      echo 9 -atl You have %override %help.or.override
      if ($window(@Override) == $null) { window -n @Override }
    }
    elseif ($3-5 == has been disabled) {
      set %override 0
      echo 4 -atl You have disabled %help.or.override
    }
    elseif ($1-3 == you already have) {
      halt
    }
  }
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.