mIRC Home    About    Download    Register    News    Help

Print Thread
#244641 16/03/14 03:49 AM
Joined: Mar 2013
Posts: 17
L
LCX Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Mar 2013
Posts: 17
Hello again,

I was wondering if there's a script for the following situation since I have looked around and have not be able to find anything online, and in this case google was not my friend... I'm looking for something that if a person were to join my channel then part it within under 2 minutes without at least stating something that upon their part it would set a ban on them for 15 minutes, an hour, etc?

Thanks in advance.

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
Code:
on *:join:#:{
  if (!$hget(spam)) hmake spam 100
  ;120 second join/part ban
  hadd -u120 spam $+(spam.join.,$address($nick,2)) 1
}

on *:part:#:{
  if (!$hget(spam)) hmake spam 100
  ;120 second join/part ban
  if ($hget(spam,$+(spam.join.,$address($nick,2)))) ban -u9000 $chan $address($nick,2)
}

on *:text:*:#:{
  if (!$hget(spam)) hmake spam 100
  if ($hget(spam,$+(spam.join.,$address($nick,2)))) hdel spam $+(spam.join.,$address($nick,2))
}


This should do the job, pulled this from my channel bot and tweaked it a little. Just make sure to set the channel you want to use it in and it should be good to go unless you want to change the times from 120 seconds from join to part and a 15 minute ban.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Mar 2013
Posts: 17
L
LCX Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Mar 2013
Posts: 17
pball, thank you for this script. I put it in and tested it and it works perfectly. Exactly what I need.


Link Copied to Clipboard