mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2018
Posts: 24
T
Tano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2018
Posts: 24
anyone from u guys can help me to give ban to the user who put badword on text and to be baned for the badword example: stupid i have in my badword.list added in this way /bwadd stupi*

this way is matched dhe badword wilcard in badword.list

Mike says : stupid
Jimmy sets mode: +b *!*@Host-retail.telecomitalia.it
[4 Mike Wrote Stupid ] 6Matched On BadWord List. 4 [ stupi* ]

Now on full text cant match the badword 'stupid'

Mike says : You my friend are "stupid" so get lost now
(no ban)




on *:start:{ $iif(!$isfile(badword.list),.write badword.list) | .hmake badword 100 | .hload badword badword.list }
#bwaddon on
on *:text:*:#: badword $1-
on *:action:*:#: badword $1-
alias -l badword {
if ($nick(#,$nick,oh%&~)) { return }
if ($me isop $chan) {
if $hfind(badword,$strip($1-),1,W).data {
ban -u300 $chan $nick 2
echo -a $token(%:c,%c,32) [ 6BADWORD ] $strip($1-) Matched From Badword List. $+([,$chr(32),$hget(badword,$hfind(badword,$strip($1-),1,W).data),$chr(32),])
var %:c $regsubex($chr(-,$hfind($strip($1-),1,W)),/./g, $iiif ($regex($1-,$+(/(?<![a-z\d])\Q,$read(badword,\E,\\E\Q,$chr(32),\E|\Q),\E(?![a-z\d])/Si))) {
var %c = 1
while %c <= $token(%:c,0,32) {
}
}
}
}

i belive is something wrong in this regex to match string on full text user speaker


var %:c $regsubex($chr(-,$hfind($strip($1-),1,W)),/./g, $iiif ($regex($1-,$+(/(?<![a-z\d])\Q,$read(badword,\E,\\E\Q,$chr(32),\E|\Q),\E(?![a-z\d])/Si))) {


something like that i need help guys pls any idea suggestion how to fix this problem ?

Last edited by Tano; 18/04/18 03:45 AM.
Joined: May 2013
Posts: 140
R
Vogon poet
Offline
Vogon poet
R
Joined: May 2013
Posts: 140
I use ths simple script. Maybe you can use some of it?

Quote:
alias -l swear.words { return word1.word2.word3.word4 }

on @*:text:*:#: {
if ($nick isop #) return
var %x $strip($1-) , %i $numtok($swear.words,46)
while (%i) {
if ($istok(%x,$gettok($swear.words,%i,46),32)) {
;raw -q mode # +b $wildsite
/msg $chan 4 $nick we do not allow swearing in our channel!
/kick # $nick No swearing!
return
}
dec %i
}
}


Link Copied to Clipboard