Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias -l times { return 3 }
- alias -l channel { return #testchannel }
- ON @*:TEXT:*:$($channel): { check_duplicate_text $nick $chan $strip($1-) }
- alias -l check_duplicate_text {
- ; /check_duplicate_text <nick> <#channel> <text>
- if (!$1) || (!$2) || ($me !ison $2) || ($me !isop $2) || ($3 == $null) { return }
- var %t = $numtok($3-,32)
- var %i = 1
- while (%i <= %t) {
- var %word = $gettok($3-,%i,32)
- var %found = $wildtok($3-,%word,0,32)
- if (%found >= $times) { ban -k $2 $1 2 [Banned]: Do NOT repeat the same word more than $times times! - (Word: %word $+ ) | break }
- inc %i
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement