This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Little Prob. with Chanpro Caps Check.

Old posts that have not been replied to for several years.
Locked
M
MoRtAnDaD

Little Prob. with Chanpro Caps Check.

Post by MoRtAnDaD »

Hi, im new to the forum and new to tcl, my main problem is that the Caps Check of chanpro, works perfect, except that it kicks user when they type for example "****************************************"

I only want the script to kick people using Letter Caps, ABCDEFGHIJKLMOPQRSTUVWXYZ , not other characters.

There is any way to fix this?.

Thanx in adv.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Yes, either contact the author of the script or do it yourself.
Once the game is over, the king and the pawn go back in the same box.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Hi,

You can utilize this script, instead of the one you are using.
This script has been posted before on a thread or two in this
forum as well.

I have modified it according to my needs and it is good
and effective script which only kicks for CAPS within the
range of \[A-Z\].

Code: Select all

#Set the channels here where you wish the kick to be activated on.
#Usage set capschans "#channel1, #channel2, #channel3"
set capschans "#funchat"

#Set this to the minimum text size, before it will act
set capsmin 70

# Minimum percentage of CAPS detected from the full text
set capslen 65

#Set the bantime for the CAPS kick
set capsbantime 30


bind pubm - * pubm:capslock

proc pubm:capslock {nick uhost hand chan arg} {
 global botnick capschans capsmin capslen capsbantime
 if {[string length $arg] < $capsmin} {return 0}
  set capsban "*!*@[lindex [split $uhost @] 1]"
  set arg [ctrl:filter $arg]
  set maxcaps "[string length $arg]"
  regsub -all {[A-Z]} $arg "" counted
  set countcaps [string length $counted]
  set capsper [expr (($maxcaps - $countcaps) * 100) / $maxcaps]
 if {(([lsearch -exact [string tolower $capschans] [string tolower $chan]] != -1)  || ($capschans == "*"))} {
  if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand mnf|mnf $chan]) && ([onchan $nick $chan]) && ($capsper > $capslen)} {
    set capsrange "[string range $capsper 0 100]%"
    putquick "MODE $chan +b $capsban"
    putquick "KICK $chan $nick :0,1 Excessive CAPS Text Kick 12,0 - 12Exceeded the limit of2 $capslen% percent 12of caps by typing2 *$maxcaps* capital characters, 12at a rate of2 $capsrange percent. 12Please turn *off* your 2caps lock switch, 12which is located 2left to the 'A' button 12on your keyboard."
    timer $capsbantime "pushmode $chan -b $capsban"
    return 0
    }
  }
}

## Thanks to ppslim for this filter
proc ctrl:filter {str} {
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
  return $str
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked