Ulysses
Home
Help
Ulysses
»
General
»
Off-Topic
»
Censored words?
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: Censored words? (Read 5448 times)
0 Members and 1 Guest are viewing this topic.
Kossan
Newbie
Posts: 21
Karma: -7
Censored words?
«
on:
January 05, 2014, 10:46:49 am »
Hello is there a way to like make it auto so when someone say maybe "
you" or something. Could we make it become **** or so? Like auto?
Logged
JamminR
Ulysses Team Member
Hero Member
Posts: 8096
Karma: 390
Sertafide Ulysses Jenius
Re: Censored words?
«
Reply #1 on:
January 05, 2014, 11:49:40 am »
OLD code.
/index.php/topic,3647.0.html
You may be able to update it.
Monitoring for specific words can/will slow down servers though, the larger the list of stuff to look for gets.
Logged
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming
Cobalt
Full Member
Posts: 216
Karma: 44
http://steamcommunity.com/id/__yvl/
Re: Censored words?
«
Reply #2 on:
January 05, 2014, 12:08:54 pm »
Wrote this up for you real quick-
add as many words to the table as you want, and put it in lua/autorun/server
Code: Lua
local
blockedwords
=
{
"word1"
,
"word2"
}
for
k
,
v
in
pairs
(
blockedwords
)
do
table.insert
(
blockedwords
,
v
:
upper
(
)
)
end
hook
.
Add
(
"PlayerSay"
,
"blockswears"
,
function
(
ply
,
text
,
public
)
local
replace
=
text
for
i
=
1
,
#
blockedwords
do
local
v
=
blockedwords
[
i
]
if
string.find
(
replace
,
v
)
then
replace
=
string.gsub
(
replace
,
v
,
string.rep
(
"*"
,
string.len
(
v
)
)
)
end
end
return
replace
end
)
Logged
Storm
Full Member
Posts: 220
Karma: 4
Re: Censored words?
«
Reply #3 on:
January 06, 2014, 03:51:07 pm »
This is great but i do wonder how much it would slow down the server!
Logged
Neku
Hero Member
Posts: 549
Karma: 27
Re: Censored words?
«
Reply #4 on:
January 06, 2014, 04:30:11 pm »
It won't slow down the server unless you have a lot of bad words to be blocked.
And it won't slow down the server itself, it'll just delay your chat messages.
Logged
Out of the Garry's Mod business.
Storm
Full Member
Posts: 220
Karma: 4
Re: Censored words?
«
Reply #5 on:
January 07, 2014, 04:27:02 am »
This doesn't seem to work in TTT.
Logged
Cobalt
Full Member
Posts: 216
Karma: 44
http://steamcommunity.com/id/__yvl/
Re: Censored words?
«
Reply #6 on:
January 07, 2014, 09:58:59 am »
Yeah it's kind of crappy, I'll make you a good one when I get home.
Logged
Storm
Full Member
Posts: 220
Karma: 4
Re: Censored words?
«
Reply #7 on:
January 07, 2014, 12:19:07 pm »
If you do I would use it I think just to censor racist language.
Logged
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
General
»
Off-Topic
»
Censored words?