Ulysses Stuff > Releases
CenKik - Censoring and Kicking
Storm:
Neku, how can I adjust the code so that it returns to admins that the player was censored and what he tried to say? It was in Eccid's code but I am not sure how to adapt it to yours. Not only would it be good to know who is trying to use racist words, but it would be great to use when screening potential moderators.
Neku:
Here's a hint.
--- Code: ---ulx.fancyLogAdmin( calling_ply, true, "#A attempted to say: " .. text )
--- End code ---
The true in this line of code indicates this will be silent.
Which means that you need to allow moderators to see silent commands.
Decicus:
--- Quote from: Neku on January 16, 2014, 09:05:41 AM ---Here's a hint.
--- Code: ---ulx.fancyLogAdmin( calling_ply, true, "#A attempted to say: " .. text )
--- End code ---
The true in this line of code indicates this will be silent.
Which means that you need to allow moderators to see silent commands.
--- End quote ---
Another option is also to do this. You won't have to give the silent command permission.
--- Code: ---for _, ad in pairs ( player.GetAll() ) do
if ad:IsAdmin() then
ad:ChatPrint( ply:Nick() .. " attempted to say: " .. text )
end
end
--- End code ---
If you have groups that don't inherit the default "admin" group, but are still counted as "admins" in your eyes, change this:
--- Code: ---if ad:IsAdmin() then
--- End code ---
to this
--- Code: ---if ad:query( "ulx seeasay" ) then
--- End code ---
The code above will change it so whoever has access to "ulx seeasay" (people that can see messages sent to admins), will get the real chat message sent to their screen.
Storm:
I tried putting this code in your addon but, as a complete non-coder, nothing seemed to work. Where should I put what code??
Decicus:
Inside the "string.find":
--- Code: ---if string.find( string.lower( filter[a] ), v, 1, true ) then
local replace = string.rep( "*", string.len( v ) )
filter[a] = string.gsub( string.lower( filter[a] ), v, replace )
filter = string.Implode( " ", filter )
kikpls = true
for _, ad in pairs ( player.GetAll() ) do
if ad:IsAdmin() then
ad:ChatPrint( ply:Nick() .. " attempted to say: " .. text )
end
end
end
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version