mIRC Home    About    Download    Register    News    Help

Print Thread
#115519 26/03/05 08:20 PM
Joined: Mar 2005
Posts: 3
K
kore Offline OP
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Mar 2005
Posts: 3
hi fellows
how can i put a warning in this swear text without kick or ban.
i want in first swear word to warn the user and then if he swear again to kick -ban heme

on @*:text:*:#: {
if ($nick isop #) && (%oplar == on) { return }
if ($nick isvo #) && (%vlar == on) { return }
var %x $strip($1-) , %i $numtok(%soyush,44)
while (%i) {
if ($gettok(%soyush,%i,44) iswm %x) || ($gettok(%soyush,%i,44) isin %x) {
if (%kiket == on) { .kick # $nick $iif(%kickmsj != $null,%kickmsj 1[4 $gettok(%soyush,%i,44) BAD-WORD Detected. Please stop swearing- $gettok(%soyush,%i,44) 1]) }
if (%banet == on) { .ban $iif(%banvaxt isnum,-u $+ %banvaxt) # $nick 2 }
return
}
dec %i
}
}

#115520 26/03/05 11:11 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
[code]
on @*:text:*:#: {
if ($nick isop #) && (%oplar == on) { return }
if ($nick isvo #) && (%vlar == on) { return }
var %x $strip($1-) , %i $numtok(%soyush,44)
while (%i) {
if ($gettok(%soyush,%i,44) iswm %x) || ($gettok(%soyush,%i,44) isin %x) {

inc -u43200 $+(%,swear.count.for.,$nick)
if ($($+(%,swear.count.for.,$nick),2) = 1) {
msg # $nick next time you swear your busted! Using $gettok(%soyush,%i,44) is not allowed.
return
}

if (%kiket == on) { .kick # $nick $iif(%kickmsj != $null,%kickmsj 1[4 $gettok(%soyush,%i,44) BAD-WORD Detected. Please stop swearing- $gettok(%soyush,%i,44) 1]) }
if (%banet == on) { .ban $iif(%banvaxt isnum,-u $+ %banvaxt) # $nick 2 }
return
}
dec %i
}
}
[code]
Try that you get one warning every 12 hours, you swear again in 12 hours and its bye bye

#115521 27/03/05 01:29 PM
Joined: Mar 2005
Posts: 3
K
kore Offline OP
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Mar 2005
Posts: 3
thanks a lot DaveC
I need one more because i can't managed with this variables (always crash my mirc when i try to fix this code)
need also to this code 1st warning and then Kick-ban
any idea from anyone
thanks for your time
THIS IS THE CODE:

On @*:TEXT:*:#:check.for.ban $1-
On @*:ACTION:*:#:check.for.ban $1-
On @*:NOTICE:*:#:check.for.ban $1-
alias -l check.for.ban {
set %bad_word_list BAD1 BAD2 BAD3
var %i = $numtok(%bad_word_list,32)
while (%i) {
if ($istok($1-,$gettok(%bad_word_list,%i,32),32)) {
kick $chan $nick No swearing allowed on $chan
halt
}
dec %i
}
}

#115522 27/03/05 01:45 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
[code]
On @*:TEXT:*:#:check.for.ban $1-
On @*:ACTION:*:#:check.for.ban $1-
On @*:NOTICE:*:#:check.for.ban $1-
alias -l check.for.ban {
tokenize 32 $strip($1-)
;^ added to remove color codes
;
set %bad_word_list BAD1 BAD2 BAD3
var %i = $numtok(%bad_word_list,32)
while (%i) {
if ($istok($1-,$gettok(%bad_word_list,%i,32),32)) {
;
inc -u43200 $+(%,cfb.swear.count.for.,$nick)
if ($($+(%,cfb.swear.count.for.,$nick),2) = 1) {
msg # $nick next time you swear your outta here! Using $gettok(%bad_word_list,%i,32) is not allowed.
return
}
;
kick $chan $nick No swearing allowed on $chan
return
}
dec %i
}
}
[code]

* this line if ($istok($1-,$gettok(%bad_word_list,%i,32),32)) { well only match exact words that are said to exact badwords, you could replace it with if ($gettok(%bad_word_list,%i,32) isin $1-) { which well find any badword in the text even if its a part of a bigger word or has liek a ! attached to the end etc.

#115523 27/03/05 03:37 PM
Joined: Mar 2005
Posts: 3
K
kore Offline OP
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Mar 2005
Posts: 3
You are the master of the masters DaveC !
thanks thanks thanks a loooot smile
thanks for everything!!


Link Copied to Clipboard