mIRC Home    About    Download    Register    News    Help

Print Thread
#193547 21/01/08 03:39 AM
Z
zad0909
zad0909
Z
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?

#193548 21/01/08 04:20 AM
Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995

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

#193553 21/01/08 11:17 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
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.

#193579 21/01/08 09:39 PM
L
LostShadow
LostShadow
L
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. } }

RoCk #193580 21/01/08 09:40 PM
L
LostShadow
LostShadow
L
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.

#193589 22/01/08 01:01 AM
Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995

Originally Posted By: LostShadow

Why... that would be too logical.


That sounds exactly like me lol.


Link Copied to Clipboard