mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
WHat I'm looking for is a small on ^*:TEXT remote that would read a txt file (or a list within itself) to see if words said match something said in channel, but has to have multiple words like "real celebs" or "sex videos"

And would like it to set a 10 min ban and kick with what words triggered the remote. ie:
[6-5-03, 09:52:54] * |Ambient| was kicked by hthrLATER (Unallowed word/phrase - *real celeb*)
and
[6-5-03, 06:41:34] * X-Gurl was kicked by hthrLATER (Unallowed word/phrase - *sex video*)


Thanks

ShadowWlf


ShadowWlf
Server Administrator Rancho.ForeverChat.net
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
you can try either using hash tables or doing a txt file. If you do the hash, its much faster, and can search through a large group of words in lessthan a second. A text file is also fine, and easier to add to. Try looking up /help $read, and look for the s or w parameter.


-KingTomato
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Code:
;# /AddWord <Word> [Words ...]
Alias AddWord {
  LoadList
  var %i = 1
  WHILE ( $gettok($1-,%i,32) ) { hadd CS_BadwordList $ifmatch 1 | inc %i }
  SaveList
  echo $colour(info) -a * Added Badword(s): $1-
}

Alias -l LoadList {
  if ( !$hget(CS_BadwordList) ) hmake CS_BadwordList
  if ( $exists(CS_BadwordList.hash ) hload CS_BadwordList CS_BadwordList.hash
}

Alias -l SaveList {
  if ( !$hget(CS_BadwordList) ) LoadList
  hsave -o CS_BadWordList CS_BadWordList.hash
}

On @*:TEXT:*:#Christian_Singles: {
  if ( $nick isop $chan ) return
  if ( !$hget(CS_BadwordList) ) LoadList
  var %s = $strip($1-)
  var %n = $regex(Badword,%s,/\b(.+?)\b)
  var %i = 1
  WHILE ( $regml(Badword,%i) ) {
    inc %i
    if ( !$hget(CS_BadwordList,$ifmatch) ) continue
    ban -u600 $chan $nick 3
    kick $chan $nick We don't say things like that here.
    echo $colour(info) -a * Badword: $nick said $ifmatch
    break
} }

Actually, I just wrote this adlib (haven't even tested it) and notice your original post requested word pairs... this script only supports single words. Let me adjust it slightly, tomorrow.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard