mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2004
Posts: 2
B
beanses Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
B
Joined: Oct 2004
Posts: 2
I've searched the forums for this but most posts were too specifically tailored to the one asking the question. Hopefully I'll get a similarly useful answer.

Is it hard to write a piece of code that kicks a specific user in a specific channel when he says D:? (over-usage of smileys)
I want him to be kicked when he says ":" and timebanned for 15 seconds if he does it again, EXCEPT if the piece of text with the : in it is an URL.

Feedback would be very much appreciated.
Thanks in advance!

Last edited by beanses; 19/10/04 11:57 PM.
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
Try this script which checks if : is at the front of a word in the text, same as checking if ($wildtok($strip($1-),:*,0,32))

on @$*:text:/(^|\s)\x3A\S+/S:#:{
var %h = $+($cid,#,.,$site)
if ($hget(smiles,%h)) {
ban -ku15 # $nick 2 You were warned not to smile
hdel smiles %h
}
else kick # $nick Don't smile
hinc -mu300 smiles %h
}


It 'remembers' a user for 300 seconds, so if they repeat a smiley within that time it will then ban them

Joined: Oct 2004
Posts: 2
B
beanses Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
B
Joined: Oct 2004
Posts: 2
That's great, thanks!
I don't fully understand it, but I hope that'll come in due time.
I assume I just have to fill in the specific channel on every #
Thanks again!


Link Copied to Clipboard