mIRC Home    About    Download    Register    News    Help

Print Thread
Join/Part #197703 12/04/08 10:23 PM
Joined: Oct 2005
Posts: 34
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 34
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

Re: Join/Part [Re: SLiprockS] #197705 12/04/08 10:56 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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...

Code:
; 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.

Re: Join/Part [Re: Horstl] #197706 12/04/08 11:24 PM
Joined: Oct 2005
Posts: 34
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 34
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