Spamfilter dialog

By Gemster on Jan 05, 2010

This is a supreme spamfilter dialog, very easy to use.

You need to be an ircop and have access to add spamfilters.

Thanks to RusselB and Jethro_ for all there help in the forums. thanks guys :D

To use simple copy the code below and add it to a new page in remotes(alt+r) the right click a chan and u sill see the "spamfilter" in there.

Very easy to use.

For unrealircd, not sure if the commands are the same on others

Have fun

Gemster

P.S - Not all servers support viruschan but some do.

Menu channel { 
  spamfilter:/dialog -m spam spam 
} 
dialog spam {
  title "Spamfilter"
  size -1 -1 168 256
  option dbu
  edit "- Word for spamfilter to catch(regex) -", 1, 8 26 150 10, autohs
  box "Type", 2, 7 43 73 108
  check "c", 3, 16 70 50 10
  check "p", 4, 16 80 50 10
  check "n", 5, 16 90 56 10
  check "N", 6, 16 100 57 10
  check "P", 7, 16 110 57 10
  check "q", 8, 16 120 57 10
  check "a", 9, 16 130 56 10
  check "t", 10, 16 140 50 10
  text "Specifies the target type, You can add multple targets.", 11, 9 52 70 17, center
  box "Action", 12, 87 43 73 108
  radio "Block", 13, 96 70 50 10
  radio "Kill", 14, 96 80 50 10
  radio "Kline", 15, 96 90 50 10
  radio "Gline", 16, 96 100 50 10
  radio "Zline", 17, 96 110 50 10
  radio "GZline", 18, 96 120 50 10
  radio "Kline", 19, 96 130 50 10
  radio "VirusChan", 20, 96 140 50 10
  text "sSpecifies the action to be taken (only 1 action can be specified)", 21, 89 50 69 20, center
  box "Tkltime", 22, 7 150 154 44
  edit "-", 23, 68 176 36 10, center
  text "The duration of the bans. This can be set to - for defaule value(for block use - ).", 24, 8 157 150 15, center
  box "Reason", 25, 7 193 155 42
  text "The reason for spamfilter. You CANNOT use spaces in this, but underscores ('_') will be translated into spaces at runtime.", 26, 8 200 151 18, center
  edit "Add_Reason_For_Spamfilter_Here", 27, 16 219 138 11, autohs
  button "Add", 28, 24 240 37 12
  box "Regex", 29, 7 3 153 38
  text "This is the actual regex or 'bad word' where we should block on and perform the action", 30, 8 10 150 15, center
  button "List", 31, 64 240 37 12
  button "Remove", 32, 104 240 37 12
}

on *:dialog:spam:sclick:3-10:{ 
  $iif($did($did).state,set %stype $addtokcs(%stype,$did($did),32),set %stype $remtokcs(%stype,$did($did),1,32)) 
} 
on *:dialog:spam:close:*:{ 
  unset %stype %saction
} 
on *:dialog:spam:sclick:13-20:{ 
  $iif($did($did).state,set %saction $did($did)) 
} 
on *:dialog:spam:sclick:28:{
  spamfilter add $remove(%stype,$chr(32)) %saction $did(23) $did(27) $did(1)
}
on *:dialog:spam:sclick:31:{ spamfilter }
on *:dialog:spam:sclick:32:{ spamfilter del $remove(%stype,$chr(32)) %saction $did(23) $did(27) $did(1)
}

Comments

Sign in to comment.
SnoooP   -  Jan 06, 2010

Warn is pointless in my opinion, when a user is spamming I doubt they care if the opers know, they are spamming after all, also do you think a bot would stop if they received a warning? Block & viruschan are the best to use.

 Respond  
Gummo   -  Jan 06, 2010

Specifically, for the warn action..
A spamfilter match snotice is sent, a message telling the user that a copy of what the said was sent to opers (with your given reason) is sent to the user but their message still goes through.
It's similar to block without actually blocking.

 Respond  
Gemster   -  Jan 06, 2010

thanks guys.

By the way, Unreal supports the 'warn' action now
Ill have to check that out :D also i will update this ver soon to add words instead of just the letter as Gummo pointed out.

 Respond  
Gummo   -  Jan 06, 2010

I can't really imagine that actually helping people who know the /spamfilter command as it is, but you could make it helpful by allowing straight text for the reason and then using something like:
$replace($did(27),_,_,$chr(32),)
It would also be more helpful if those checkboxes were words, rather than the actual character used in /spamfilter, e.g. 'Private Messages' instead of 'p'.
Good job with the script, though. :)

By the way, Unreal supports the 'warn' action now.

 Respond  
SnoooP   -  Jan 05, 2010

Nice work mate... comes in really handy.

@RusselB that is a really clever suggestion checking $usermode,

 Respond  
RusselB   -  Jan 05, 2010

You could check the users modes to ensure that they have sufficient access.

menu * {
  $iif((a isin $usermode) || (C isincs $v2) || (o isin $v2),Spamfilter) : dialog $iif(!$dialog(spam),-ev,-md) spam spam
}

This will 1) prevent someone with the code but without IRCops from even accessing the code.
2) Open the dialog if closed, or restore it if open but minimized

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.