|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
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....
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
Joined: Jun 2005
Posts: 127 |
Hmm. Im not experienced with regex, which may be hekpfull here. But this should work just fine... on @*:join:#chan: { if (($left($nick,1) isupper) && ($right($nick,2) isnum)) { kick $chan $nick Virus } } Good luck.
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
Joined: Jun 2004
Posts: 124 |
thankz... it doesnt detect a CAPS first letter... it must detect first capital leter
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
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? 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.
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
Joined: Jun 2004
Posts: 124 |
yes... i change the #chan... heres the result... `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
|
|
|
|
Joined: Jul 2004
Posts: 59
Babel fish
|
Babel fish
Joined: Jul 2004
Posts: 59 |
Try this...
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I think you just need to add to your script "isalpha"
on @*JOIN:#channel: {
if ($left($nick,1) isalpha) && ($left($nick,1) isupper) && ($mid($nick,2,2) isnum) {
kick $chan Suspected Virus-Drone
}
}
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
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: 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. 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.
|
|
|
|
Joined: Jul 2004
Posts: 59
Babel fish
|
Babel fish
Joined: Jul 2004
Posts: 59 |
Oh well. He apparently added it before because it kicked ok, just kicked the wrong people.
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
Joined: Jun 2005
Posts: 127 |
I just edited my post. Look above.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
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.
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
Joined: Jun 2005
Posts: 127 |
lol i knew that was coming. just a matter of time.
|
|
|
|
Joined: Jul 2004
Posts: 59
Babel fish
|
Babel fish
Joined: Jul 2004
Posts: 59 |
I can bang my hands on my keyboard randomly too, Fiber.
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
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.
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
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...
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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......
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
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...
|
|
|
|
Joined: Jun 2005
Posts: 127
Vogon poet
|
Vogon poet
Joined: Jun 2005
Posts: 127 |
on @*:join:#chan: { if (($regex($nick,/^[A-Z].++(?<=\d\d)/)) && ($nick !isin %vk)) { ban -k # $nick 2 Bad nick. | set %vk %vk $nick } }
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
Joined: Jun 2004
Posts: 124 |
thankz man... its a really great help...
|
|
|
|
|