Jump to content

Repeat Text Help


CharmedOne

Recommended Posts

Some reason this isnt doing anything no idea why. :pizza:

 

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;REPEAT TEXT KICKER
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


on @*:text:*:%cpchan: {
;RepeatText
  if ($readini($settings(chanoptions.txt),$iif($ini($settings(chanoptions.txt),#,0) != 0,#,Default),RepeatText)) {
    if ($nick !isop #) && ( %repeat == on ) { 
      var %rp.repeats = rp. $+ $nick $+ . $+ $chan
      var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
      if ( % [ $+ [ %rp.repeats ] ] == $null ) {
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.repeats ] ] 1
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.text ] ] $1-
      }
      elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
        inc % [ $+ [ %rp.repeats ] ]
      }
      elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.text ] ] $1-
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.repeats ] ] 1
      }
      if ( % [ $+ [ %rp.repeats ] ] > %limit.repeat ) {
        if ($nick isvoice $chan) && (%cpvoice == no) { halt } 
        if ($nick ishop $chan) && (%cphops == no) { halt } 
        if ($nick isop $chan) && (%cpops == no) { halt }   
        access $chan add deny $+(*!*, $Ial($nick).addr) $+ %capsbt # $nick 2 
        kick # $nick %repeatmsg $+ , deny time: $repkbt - %name 
        unset % [ $+ [ %rp.repeats ] ]
        unset % [ $+ [ %rp.text ] ]
      }
    }
  }
}

on @*:ACTION:*:%cpchan: {
;RepeatText
  if ($readini($settings(chanoptions.txt),$iif($ini($settings(chanoptions.txt),#,0) != 0,#,Default),RepeatText)) {
    if ($nick !isop #) && ( %repeat == on ) { 
      var %rp.repeats = rp. $+ $nick $+ . $+ $chan
      var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
      if ( % [ $+ [ %rp.repeats ] ] == $null ) {
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.repeats ] ] 1
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.text ] ] $1-
      }
      elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
        inc % [ $+ [ %rp.repeats ] ]
      }
      elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.text ] ] $1-
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.repeats ] ] 1
      }
      if ( % [ $+ [ %rp.repeats ] ] > %limit.repeat ) {
        if ($nick isvoice $chan) { halt } 
        if ($nick ishop $chan) { halt } 
        if ($nick isop $chan) { halt }  
        access $chan add deny $+(*!*, $Ial($nick).addr) $+ %capsbt # $nick 2  
        kick # $nick %repeatmsg $+ , deny time: $repkbt - %name 
        unset % [ $+ [ %rp.repeats ] ]
        unset % [ $+ [ %rp.text ] ]
      }
    }
  }
}
on @*:NOTICE:*:%cpchan:{
;RepeatText
  if ($readini($settings(chanoptions.txt),$iif($ini($settings(chanoptions.txt),#,0) != 0,#,Default),RepeatText)) {
    if ($nick !isop #) && ( %repeat == on ) { 
      var %rp.repeats = rp. $+ $nick $+ . $+ $chan
      var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
      if ( % [ $+ [ %rp.repeats ] ] == $null ) {
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.repeats ] ] 1
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.text ] ] $1-
      }
      elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
        inc % [ $+ [ %rp.repeats ] ]
      }
      elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.text ] ] $1-
        set -u [ $+ [ %limit.seconds ] ] % [ $+ [ %rp.repeats ] ] 1
      }
      if ( % [ $+ [ %rp.repeats ] ] > %limit.repeat ) {
        if ($nick isvoice $chan) { halt } 
        if ($nick ishop $chan) { halt } 
        if ($nick isop $chan) { halt }  
        access $chan add deny $+(*!*, $Ial($nick).addr) $+ %capsbt # $nick 2 
        kick # $nick %repeatmsg $+ , deny time: $repkbt - %name 
        unset % [ $+ [ %rp.repeats ] ]
        unset % [ $+ [ %rp.text ] ]
      }
    }
  }
}

Link to comment
Share on other sites

But it is very pointless to use a variable to return # ... Why not just use # ? :|

 

 

Anyways , if it isnt your variable that is the issue, looking at your script the only other suggestions I can come up with are ...

 

 

  1. $readini($settings(chanoptions.txt),$iif($ini($settings(chanoptions.txt),#,0) != 0,#,Default),RepeatText) does this return $true?
  2. %repeat == on - is %repeat on?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...