mIRC Home    About    Download    Register    News    Help

Print Thread
help... #137877 21/12/05 06:06 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
can anyone make this.. detect newly joins nicks then if the first letter of the nick is CAPS and the last 2 characters are numbers of the newly joined nick... they will be kicked out... im using it for the virus drones... they keep on entering channels....

Re: help... #137878 21/12/05 06:35 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Hmm. Im not experienced with regex, which may be hekpfull here. But this should work just fine...
Code:
on @*:join:#chan: { if (($left($nick,1) isupper) && ($right($nick,2) isnum)) { kick $chan $nick Virus } }

Good luck.


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: help... #137879 21/12/05 06:45 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz... it doesnt detect a CAPS first letter... it must detect first capital leter

Re: help... #137880 21/12/05 07:06 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
It should, infact it does for me. I tested it. Are you sure you changed #chan to your actual channel?

Code:
on @*:join:[color:blue]#chan[/color]: { if (($left($nick,1) isupper) && ($right($nick,2) isnum)) { kick $chan $nick Virus } }[/color]


Make sure to change #chan to the actual channel name you want the script to run on.


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: help... #137881 21/12/05 07:34 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
yes... i change the #chan... heres the result...

Quote:
`dryice19 was kicked by sigbin Suspected Virus-Drone


the script should detect capital first letter... and can it be possible that it will kick once... even if the same nick has joined the channel

Re: help... #137882 21/12/05 07:46 PM
Joined: Jul 2004
Posts: 59
S
synth7 Offline
Babel fish
Offline
Babel fish
S
Joined: Jul 2004
Posts: 59
Try this...

Code:
on @*JOIN:[color:red]#channel[/color]: {
  if ($left($nick,1) isupper) && ($mid($nick,2,2) isnum) {
    kick $chan Suspected Virus-Drone
  }
}

Last edited by synth7; 21/12/05 07:53 PM.


Re: help... #137883 21/12/05 09:32 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I think you just need to add to your script "isalpha"
Code:
on @*JOIN:#channel: {

  if ($left($nick,1) isalpha) &&  ($left($nick,1) isupper) && ($mid($nick,2,2) isnum) {

    kick $chan Suspected Virus-Drone

  }

}

Re: help... #137884 21/12/05 10:43 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
I dont see how that's neccessary, considering there is no way for a number to be lower or upper case. The help file says:

Quote:
isupper - text contains only upper case letters


So im really not sure why it's not working. Like i said, it works fine for me.

Also, both synth7's and MikeChat's scripts are missing the $nick in the kick command. Should be: kick $chan $nick Suspected Virus-Drone.

EDIT #2: Ok Mike, now I see what you mean. Since in the user's quote the knick had a ` in front of it, i guess that could complicate things. blush So yes, the isalpha is needed. Just remember to fix the kick command like i said above. Sorry about that Mike.

Last edited by HAMM3R; 21/12/05 10:49 PM.
Re: help... #137885 21/12/05 10:49 PM
Joined: Jul 2004
Posts: 59
S
synth7 Offline
Babel fish
Offline
Babel fish
S
Joined: Jul 2004
Posts: 59
Oh well. He apparently added it before because it kicked ok, just kicked the wrong people.



Re: help... #137886 21/12/05 10:49 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
I just edited my post. Look above.


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: help... #137887 21/12/05 10:59 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
on @*:join:#chan: if ($regex($nick,/^[A-Z].++(?<=\d\d)/)) ban -k # $nick 2 Bad nick.

If you prefer something shorter, but slightly less efficient in theory (you wouldn't notice it at all in this case) you can use:

$regex($nick,/^[A-Z].*\d\d$/)


Gone.
Re: help... #137888 21/12/05 11:03 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
lol i knew that was coming. just a matter of time.


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: help... #137889 21/12/05 11:08 PM
Joined: Jul 2004
Posts: 59
S
synth7 Offline
Babel fish
Offline
Babel fish
S
Joined: Jul 2004
Posts: 59
I can bang my hands on my keyboard randomly too, Fiber.



Re: help... #137890 21/12/05 11:10 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
rofl. that's exactly what it looks like. one of these days ill read a tutorial on regex. looks like neat stuff, although a bit intimidating.


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: help... #137891 21/12/05 11:54 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz guys... how about making it kick a user with the same nick only once.... in using it also for a warning... some irc chatters use nicks like once virus drone use... so i want it to kick only once... so i will not kick flood the channel...

Re: help... #137892 22/12/05 01:22 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
heck could have had "kick the dog" and I would have missed it, I was focused on his matchtext

but, as usual, FiberOptics gets the better version

"Scripties, now with Regex in Every Byte"
So remember, Sweeten your code with Regex Today!

Man I have been watching way too much TV...... smile

Re: help... #137893 22/12/05 01:43 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Learn Regex Here!

-genius_at_work

Re: help... #137894 22/12/05 03:31 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
how can i make it kick the user once... like when its not a drone... it wont rejoin... like one kick only for one nick...

Re: help... #137895 22/12/05 04:15 AM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Code:
on @*:join:#chan: { if (($regex($nick,/^[A-Z].++(?&lt;=\d\d)/)) &amp;&amp; ($nick !isin %vk)) { ban -k # $nick 2 Bad nick. | set %vk %vk $nick } }


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: help... #137896 22/12/05 04:39 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz man... its a really great help...