Code: Select all
bind pubm - * longword
proc longword {nick uhost hand chan text} {
set l [join [split $text] ""]
if {[string length $l] > 50} {
putkick $chan $nick "long line: line length [string length $l] chars"
return
}
if {[llength [split $text]] > 1} {
set al [split $text]
foreach l $al {
regsub { } $l {} n
if {[string length $n] > 50} {
putkick $chan $nick "long line: word length [string length $text] chars"
}
}
}
}
Code: Select all
bind pubm - * longword
set wordlength "20"
set linelength "100"
proc longword {nick uhost hand chan text} {
global wordlength linelength
set l [join [split $text] ""]
if {[string length $l] > "$linelength"} {
putkick $chan $nick "long line: line length [string length $l] chars"
return
}
if {[llength [split $text]] > 1} {
set al [split $text]
foreach l $al {
regsub { } $l {} n
if {[string length $n] > "$wordlength"} {
putkick $chan $nick "long line: word length [string length $n] chars"
}
}
}
}
Code: Select all
bind pubm - * longword
set wordlength "15"
proc longword {nick uhost hand chan text} {
global wordlength linelength
set l [join [split $text] ""]
if {[string length $l] > "$linelength"} {
putkick $chan $nick "long line: line length [string length $l] chars"
return