Skip to content
Buzzen Chat Network

Repeat Text Help

A TG007 community discussion started by CharmedOne.

Discussion 11 posts
Page 1 of 1
Open
Topic #12083 · 11 published posts · 2,739 views

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 ] ]
      }
    }
  }
}

This may sound a little stupid, but, why are you using a variable in the event?

%cpchan is a room?

 

Whats the variable set as?

 

What a stupid question Nick!! :stupid:

Edited Feb 18, 2009 12:46 AM by Travis

well with the variable there it DOES work for tho I do have my on even like this on @*:text:*:%cpchan: { I also have this in my variables %cpchan # i am just trying new things.

That wont work because it doesn't appear the whole channel name is listed. And unless I'm wrong, Buzzen uses the %# prefix.

The variable needs to be the room name, OR you can have a normal # in there like everyone else. Using a variable to return # is just ridiculous.

 

my caps kicker has on @*:TEXT:*:%cpchan:{ in it & it works :pizza:

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?

My suggestion is to delete the whole thing. :]

Why is that script so huge when it can be shorten to a few lines?

:lolwave: