Advertisement
westor

Same Word Protection for Kendy v1.0

Oct 10th, 2020
2,609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.62 KB | None | 0 0
  1. alias -l times { return 3 }
  2. alias -l channel { return #testchannel }
  3.  
  4. ON @*:TEXT:*:$($channel): { check_duplicate_text $nick $chan $strip($1-) }
  5.  
  6. alias -l check_duplicate_text {
  7.   ; /check_duplicate_text <nick> <#channel> <text>
  8.  
  9.   if (!$1) || (!$2) || ($me !ison $2) || ($me !isop $2) || ($3 == $null) { return }
  10.  
  11.   var %t = $numtok($3-,32)
  12.   var %i = 1
  13.  
  14.   while (%i <= %t) {
  15.     var %word = $gettok($3-,%i,32)
  16.     var %found = $wildtok($3-,%word,0,32)
  17.  
  18.     if (%found >= $times) { ban -k $2 $1 2 [Banned]: Do NOT repeat the same word more than $times times! - (Word: %word $+ ) | break }
  19.  
  20.     inc %i
  21.   }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement