mIRC Home    About    Download    Register    News    Help

Print Thread
swear warning/kicking/banning #182505 10/08/07 02:05 PM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Hello to all.
After searching several website i can't find a, for me suitable, swear-kicker. Only thing it needs to do is when a bad word is said.

1 : Warn the person in notice
2 : After repeating the word, kick
3 : After repeating again, ban.

this goes for different people so i guess a %swear. $+ $nick would be best.?

Thanxs in advange
Aaron


Deridio fatum
Re: swear warning/kicking/banning [Re: AaronL] #182507 10/08/07 02:23 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
alias swear {
  return some swear words here
}

On @*:Text:*:#: {
  if (!$hget(swear)) hmake swear 10
  var %i = 1
  while ($gettok($swear,%i,32)) {
    if ($istok($1-,$v1,32)) { 
      if ($nick !isop $chan) {
        hinc swear $nick
        if ($hget(swear,$nick) == 1) notice $nick Some warn message.
        if ($hget(swear,$nick) == 2) kick $chan $nick Some kick message.
        if ($hget(swear,$nick) == 3) { ban -k $chan $nick 2 Some kick/ban message. | hdel swear $nick }
      }
    }
    inc %i
  }
}