mIRC Home    About    Download    Register    News    Help

Print Thread
#163817 04/11/06 11:21 PM
Joined: Oct 2006
Posts: 10
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Oct 2006
Posts: 10
Err, i'm makin a script that kicks users and banns them if they are swearing. This is the code:
Code:
on *:text:*<censored>*:#chan:{ 
  /inc %ki
  if (%ki < 2) { /notice $nick $nick $+ , niet vloeken in #TwilightTown! }
  elseif (%ki = 2) { /kick $nick Niet vloeken in #TwilightTown! Dubbelklik op >> #TwilightTown << om terug te keren naar chat! | inc %b }
  else (%b = 3) { /ban $knick NIET VLOEKEN IN #chan! }
}

Can it be done that it goes for 1 specified nick? that u won't kick or bann persons that swear for the first time..

Thank you.

#163818 05/11/06 01:44 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
After you increase %ki check the value of $nick to see if it matches the nick. One other problem that I see, is that if Person 1 swears, then they get the warning. When Person 2 swears (even if it's a different person) they get kicked..and when Person 3 swears (even if it's a different person from Person 1 &/or Person 2) then they get banned. Finally, if anyone swears after that, then nothing happens.

Here's a suggestion for a replacement
Code:
 on *:text:*<censored>*:#chan:{ 
  /inc $+(%,ki,$address)
if $nick != <nick> || $($+%,ki,$address),2) > 1 {
  if ($($+%,ki,$address),2) < 2) { /notice $nick $nick $+ , niet vloeken in #TwilightTown! }
  elseif ($($+%,ki,$address),2) == 2) { /kick $nick Niet vloeken in #TwilightTown! Dubbelklik op >> #TwilightTown << om terug te keren naar chat! }
  else ($($+%,ki,$address),2) = 3) { /ban $knick NIET VLOEKEN IN #chan! }
}
} 

#163819 05/11/06 04:04 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on *:text:*<censored>*:#chan:{ 
  /inc $+(%,ki,$address)
  if $nick != <nick> || $($+(%,ki,$address),2) > 1 {
    if ($($+(%,ki,$address),2) < 2) { /notice $nick $nick $+ , niet vloeken in #TwilightTown! }
    elseif ($($+(%,ki,$address),2) == 2) { /kick $nick Niet vloeken in #TwilightTown! Dubbelklik op >> #TwilightTown << om terug te keren naar chat! }
    else ($($+(%,ki,$address),2) >= 3) { /ban $knick NIET VLOEKEN IN #chan! }
  }
}


Small correction to the code, you dropped a breaket (likely a typo, that you then copy and pastered (maybe) over and over.

#163820 05/11/06 11:48 AM
Joined: Jul 2006
Posts: 242
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
why ban $knick?


Newbie
#163821 05/11/06 07:13 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
typo (remove the k)


Link Copied to Clipboard