mIRC Home    About    Download    Register    News    Help

Print Thread
Script help pl0x #193547 21/01/08 03:39 AM
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Hey I am looking on how to make a certain script.
I know what I want but I don't know how to script it.
I am not asking you guys to do it for me I just want to know what i need to learn to make it. Baisically I want to make a script where my bot while sitting in a channel will every 5 mins or so scan that channel for a nick thats like "unknown100667". I am having a problem with a lot of those idleing in my channel and I just want to get rid of them. So every 5 min or so the bot scans the channel and if there is an unknown sets a name ban (/mode #chan +b Unknown100667) then kicks that nick.

Specificly what I would like to know is how to script the scan the names and look for unknown with any amount of numbers afterwards. Then to take that nick ban and kick it. So what /help topic do you guys reccomend?

Re: Script help pl0x [Re: zad0909] #193548 21/01/08 04:20 AM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025

Why not just ban Unknown*!*@* ? That would ban any nick that begins with the word Unknown

Re: Script help pl0x [Re: zad0909] #193553 21/01/08 11:17 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The ban method suggested would be the easiest, but if a nick changes to Unknown*** after in the channel, he/she wouldn't be kicked. So you could still have the problem even if the user couldn't actually talk because of the ban.

If you want to still make the script, here are the topics you'd need:
Code:
/help /timer
/help while loops
/help $nick  (select the second result)
 -- Specifically, you'll want to look at $nick($chan,0) to get
    the total nicks in the channel, then look through
    $nick($chan,N) where N is a number from 1 to the total
    number of nicks.  This will let you check every nick for
    "Unknown*".  Note that you can limit the search using that
    to only look at Regular users (or Regular and Voiced) as
    you probably don't want to kick Ops.  That would use
    $nick($chan,0,r) or $nick($chan,0,rv) and then replace 0
    with the N number like before.
/help if then else

You'd also need to know /mode and/or /ban and also /kick, but I assume you already know those.


Invision Support
#Invision on irc.irchighway.net
Re: Script help pl0x [Re: zad0909] #193579 21/01/08 09:39 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
on @*:Join:#: { if (Unknown* iswm $nick) { /ban $chan $nick 2 | /kick $chan $nick The first 7 letters of your nick begins with the nick Unknown. } }

Re: Script help pl0x [Re: RoCk] #193580 21/01/08 09:40 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: RoCk

Why not just ban Unknown*!*@* ? That would ban any nick that begins with the word Unknown


Why... that would be too logical.

That would solve all his problems with nicks like Unknown000000 joining the channel.

-Neal.

Re: Script help pl0x [Re: LostShadow] #193589 22/01/08 01:01 AM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025

Originally Posted By: LostShadow

Why... that would be too logical.


That sounds exactly like me lol.