|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Dunno what I did but its not kicking when someone pm me a badword....any ideal why?
on *:open:*: {
if ( %badword == off ) || ( %badword == $null ) || ($nick isop $chan) { return }
var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
var %cnt = 1
while (%cnt <= $numtok(%badword,44)) {
if ($gettok(%badword,%cnt,44) isin $1-) {
spamdetect
closemsg $nick
break
}
inc %cnt
}
}
on ^*:notice:*:?: {
if ( %badword == off ) || ( %badword == $null ) || ($nick isop $chan) { return }
if ($nick == ChanServ || $nick == NickServ || $nick == MemoServ) { return }
var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
var %cnt = 1
while (%cnt <= $numtok(%badword,44)) {
if ($gettok(%badword,%cnt,44) isin $1-) {
spamdetect
haltdef
}
inc %cnt
}
}
alias spamdetect {
var %a = 1
if $comchan($nick,0) {
while $comchan($nick,%a) {
var %chan = $v1
if ($me isop %chan) && ($nick !isop %chan) { ban -ku3600 %chan $nick 2 14Private Offensive Language }
inc %a
}
}
}
Last edited by Garou; 23/07/07 07:35 AM.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Should be I removed both instances of: Because as the target is your pm, $chan will always be $null.
on *:open:?:*: {
if (%badword == off) || (!%badword) { return }
var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
var %cnt = 1
while (%cnt <= $numtok(%badword,44)) {
if ($gettok(%badword,%cnt,44) isin $1-) {
spamdetect
closemsg $nick
break
}
inc %cnt
}
}
on ^*:notice:*:?: {
if (%badword == off) || (!%badword) { return }
if ($nick == ChanServ || $nick == NickServ || $nick == MemoServ) { return }
var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
var %cnt = 1
while (%cnt <= $numtok(%badword,44)) {
if ($gettok(%badword,%cnt,44) isin $1-) {
spamdetect
haltdef
}
inc %cnt
}
}
alias spamdetect {
var %a = 1
if $comchan($nick,0) {
while $comchan($nick,%a) {
var %chan = $v1
if ($me isop %chan) && ($nick !isop %chan) { ban -ku3600 %chan $nick 2 14Private Offensive Language }
inc %a
}
}
}
I also don't understand why you want to ban someone from every room you and they are in for an hour for saying a 'badword' I feel it's a little personal to bring channels into this, but it is of course your code and choice. 
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Its fine now and yes your right the ban should be 600 not 3600.....thx again mate.
|
|
|
|
|