Warnings. - 06/07/13 02:03 PM
Hi, I currently have this script which sends a message if 80% of someones message is caps. I would like them to have 2 chances or warnings and on the second it bans them from the channel. I can't figure out how to do this and I would really appreciate some help.
Many thanks, Tom.
Many thanks, Tom.
Code:
ON @*:TEXT:*:#: { IF (($len($1-) < 9) || ($nick isop #)) { RETURN } VAR %text = $strip($remove($1-,$chr(32))) VAR %non.caps = $len($removecs(%text,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)) VAR %full.line = $len($strip($remove(%text,$chr(32)))) VAR %percent = $calc(1 - (%non.caps / %full.line)) IF (%percent >= 0.8) { msg $chan $nick $+ : Please use less caps, first warning. } }