I've been adding things to the censorbot and it stops loading after 26 items have been entered. Is this a known problem?
Also can words in all caps be censored?
problems with censorbot
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
Re: problems with censorbot
yakko wrote:Is this a known problem?
no it's not.. please post your script
Also can words in all caps be censored?
uh.. yes
Code: Select all
if t[string.lower( w )] then
return string.gsub( w, "[aAeEiIoOuUyY]", "*" )means: if there is a word in the table that matches any word (converted to lowercase) in the sentence, the word is checked for vowels (both lower- and uppercase) and they are replaced.
unless you mean that you want to censor (any) word(s) written in all caps..
..that's a whole different script
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
-
yakko
- Posts: 258
- Joined: 2003-01-27 06:04
I was only talking about words in the list being censored as all caps. Here's my script.
Code: Select all
-- vim:ts=4:sw=4:noet
-- CensorBot.lua -- put asterisks in nasty words
-- by Sedulus 2003
local t = { -- keys must be lowercase and must match (%w+)
kazaa = 1,
chello = 1,
fuck = 1,
shit = 1,
cunt = 1,
shit = 1,
goddamn = 1,
bitch = 1,
lag = 1,
damn = 1,
cocksucker = 1,
ass = 1,
fucking = 1,
pussy = 1,
fuckin = 1,
wanker = 1,
assfucker = 1,
motherfucker = 1,
cunt = 1,
cock = 1,
fucker = 1,
bollocks = 1,
torrent = 1,
bullshit = 1,
bastard = 1,
asshole = 1
}
function dchpp.clientMessage( c, m_in )
if string.sub( m_in, 1, 1 ) == "+" then
return -- don't mess with +-commands
end
local m_out = string.gsub(
m_in,
"(%w+)",
function( w )
if t[string.lower( w )] then
return string.gsub( w, "[aeiouy]", "*" )
else
return w
end
end
)
if m_in ~= m_out then
dchpp.hubMessage( m_out, c:getNick() )
return dchpp.ACTION_STOP
end
end
Who is online
Users browsing this forum: Google [Bot] and 0 guests