mIRC Home    About    Download    Register    News    Help

Print Thread
#80032 20/04/04 10:28 PM
Joined: Apr 2004
Posts: 27
P
parvez Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Apr 2004
Posts: 27
how can i ban a person when they curse? but if they say it for 3times then i will ban them for 1min and unban them
for example:
<parvez> [censored] you all
* Parvez1 sets mode: +b parvez!*NeT@Net-Admin.mirc.com
then after 1min
* Parvez1 sets mode: -b parvez!*NeT@Net-Admin.mirc.com
THNX!

#80033 20/04/04 11:09 PM
Joined: Dec 2002
Posts: 1,543
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,543
a BASIC example would be:

on @*:text:swear-word:#your-channel: {
inc %swear.counter. $+ $nick 1
if (%swear.counter. $+ $nick == 3) { ban -u60 $nick 2 }
}

I colored the -u60 because if you change that time, it changes the length of timed ban (all values in seconds so 120 would be 120 seconds which is 2 minutes). Now, there's also some down sides to this type of script in that the variables NEVER unset (meaning they're always active) AND it will ban them each time after the 3rd time for 1 minute (or whatever you change it to) as opposed to resetting when you disconnect or leave IRC altho that can be done easily enough by doing:

on *:disconnect:/unset %swear.counter.*

The %swear.counter.* includes ALL variables with the name begining with %swear.counter. so that %swear.counter.1 %swear.counter.2 %swear.counter.3 %swear.counter.boib %swear.counter.mom %swear.counter.dad & %swear.counter.byteme would all be unset

FYI, somebody else will most certainly give you better coding, but that WOULD work


Those who fail history are doomed to repeat it
#80034 20/04/04 11:14 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
f (%swear.counter. [ $+ [ $nick ] ] == 3) { ban -u60 $nick 2 }

#80035 20/04/04 11:18 PM
Joined: Dec 2002
Posts: 1,543
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,543
OOPS - thanks for that smile I havent coded that type of thing in a while smile


Those who fail history are doomed to repeat it
#80036 21/04/04 07:45 PM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
should use $address($nick,0) - so if they cuss twice and change their nick, 3rd time will still get them
smile

#80037 21/04/04 07:53 PM
Joined: Dec 2002
Posts: 1,543
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,543
if you mean in the variable, yes that would be better smile As I said, this isnt my thing as I havent had a need to script this before really


Those who fail history are doomed to repeat it
#80038 22/04/04 01:23 AM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
I actually designed a rather kick... um.. butt smile swear kicker.. Need to update it though to make use of new scripting knowledge to make it stronger/smarter, but allows you to customize what it kicks for per room per network, and if it kicks/bans/both or just gives an op notice warning. it filters through the color codes, catches $ being used as an S, and has 2 word lists per room, wild & word. Very very powerful... Some kickers try to kick for the word (a word meaning butt, not gonna be profane and actually say it).. but if someone says "grass" or "assistant", they get kicked.. teehee, my kicker don't mess up like that though.
*hugs his kicker*
Sorry.. just proud of that piece of crap I made.
grin

#80039 22/04/04 03:22 AM
Joined: Dec 2002
Posts: 1,543
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,543
LOL No worries smile You should be proud of somethign you've done that works for you. My PM Blocker is the same way; it rules for my purposes and does a DAMNED good job. It works on all kinds of thigs for notices, op notices, dccs, queries, etc my next piece to do for it will include "paranoa" levels where I can choose who can PM me, but for now it's fine the way it is smile


Those who fail history are doomed to repeat it

Link Copied to Clipboard