mIRC Homepage


Posted By: SLiprockS

Join/Part - 12/04/08 10:23 PM

I need a script which will ban this type of act and banned the nick only..
[16:15:11] * Joins: abcd (wateva@KaV-A14A7880.midco.net)
[16:15:11] * Parts: abcd (wateva@KaV-A14A7880.midco.net)
[11:10:15] * Joins: rk123 (full@KaV-779A6991.maine.res.rr.com)
[11:10:15] * Parts: rk123 (full@KaV-779A6991.maine.res.rr.com)
this type of bot just join and part after a while. so i want a script which will ban their nicks after they part

on 1:Join:#:{
if ($nick == $me) { return }
set -u3 %join.bot.nick $nick
on 1:part:#:{
if ($nick == $me) { return }
set -u3 %part.bot.nick $nick
if (%part.bot.nick == %join.bot.nick) { .mode # +b $nick }

i wrote the code not sure if it gonna work or not but i need a script which can able to ban those bots which will join the room and part right away. thanks
Posted By: Horstl

Re: Join/Part - 12/04/08 10:56 PM

I recommend using a simple hashtable instead of setting some %variables.
Hashtables are 'non-sorted' lists, usually containing 2 'columns': item and data.
Here, I'm using $nick for item and $fulladdress for data.
The latter might be usefull if you want to modify the script in the future...

; a user joins your channel: add the nick and address for 3 seconds to a hashtable
; also note the use of the "!" prefix, replacing "if ($nick != $me)"

on !*:join:#yourchan: { hadd -mu3 joiners $nick $fulladdress }

; a user parts your channel: if there is an entry for $nick in the hashtable, perform a ban command
; use $+($nick,!*@*) to ban that nick; $v1 to ban the fulladdress; or some $mask($v1,N) to apply one if mIRCs default banmasks

on @!*:part:#yourchan: {
  if ($hget(joiners,$nick)) { 
    mode $chan +b $+($nick,!*@*)

Anyway, I doubt that a NICKban is the most efficient sollution.
In the majority of cases, bots fit some 'pattern', e.g. using the same *!*@*.domain or *!ident@* time and again - if you can provide more information about this, we might be able to make a better script.
Posted By: SLiprockS

Re: Join/Part - 12/04/08 11:24 PM

Thanks buddy. i think i got it what im looking for. dont worry about nickban. actually those bot join spam and part it takes only 3/4sec so i was just looking for on join part code which i think i got it. rest i can modify myself laugh thanks for you help smile
© 2022 mIRC Discussion Forums