from time to time, random people join my server and spam ads in the chat. Usually this isn't so bad as they only do it once and never come back.
But today some guy kept joining over and over again spamming stuff.
The problem is, apparently he is able to get around the function that handles every output to the chat.
function Chat.redirect(message, messageType)ifnotisElement(source)thenreturnendcancelEvent()local arenaElement =getElementParent(source)ifnot arenaElement orgetElementType(arenaElement)~="Arena"thenreturnendlocal chat_color =getElementData(source,"setting:chat_color")or"#ffffff"local message = Chat.parseEmotis(message)ifnotgetElementData(arenaElement,"showSpectatorChat")andgetElementData(source,"Spectator")then
Chat.outputSpectatorChat(arenaElement,getPlayerName(source).."#ffffff: "..chat_color..message)returnendif messageType ==0thenifgetElementData(arenaElement,"silence")andnot exports["CCS"]:export_acl_check(source,"silence")thenoutputChatBox("Sorry, Silence mode is active!", source,255,0,128)returnend
Chat.outputArenaChat(arenaElement,getPlayerName(source).."#ffffff: "..chat_color..message)elseif messageType ==1thenifgetElementData(arenaElement,"silence")andnot exports["CCS"]:export_acl_check(source,"silence")thenoutputChatBox("Sorry, Silence mode is active!", source,255,0,128)returnend
Chat.outputArenaChat(arenaElement,"#ff00ff* "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." "..message:gsub("#%x%x%x%x%x%x",""))elseif messageType ==2thenlocalteam=getPlayerTeam(source)ifnotteamthenreturnendfor i, p inpairs(getPlayersInTeam(team))dooutputChatBox("#00f000[Team] #ffffff"..getPlayerName(source).."#ffffff: "..chat_color..message, p,255,255,255,true)endtriggerEvent("onServerChatMessage", root,"#00f000[Team] #ffffff"..getPlayerName(source).."#ffffff: "..chat_color..message)endendaddEventHandler("onPlayerChat", root, Chat.redirect)
Normally, he shouldn't be able to write anything in the chat without going through this function.
But it seems when you join a server and very fast after that spam a message, it will be output to the chatbox without trigger the "onPlayerChat" event.
[2017-03-0710:55:47] KICK: MAFYA=BALTROS was kicked from the game by (Command Flood)[2017-03-0710:55:47] CHAT: MAFYA=BALTROS: multi theft auto turkis de +70 araç+70 sikin adminilklerimiz indirimdedirrrrr!!![2017-03-0710:56:04] KICK: MAFYA=BALTROS was kicked from the game by (Command Flood)[2017-03-0710:56:04] CHAT: MAFYA=BALTROS: multi theft auto turkis de +70 araç+70 sikin adminilklerimiz indirimdedirrrrr!!![2017-03-0710:56:12] KICK: MAFYA=BALTROS was kicked from the game by (Command Flood)[2017-03-0710:56:12] CHAT: MAFYA=BALTROS: multi theft auto turkis de +70 araç+70 sikin adminilklerimiz indirimdedirrrrr!!![2017-03-0710:56:27] KICK: MAFYA=BALTROS was kicked from the game by (Command Flood)[2017-03-0710:56:27] CHAT: MAFYA=BALTROS: multi theft auto turkis de +70 araç+70 sikin adminilklerimiz indirimdedirrrrr!!![2017-03-0710:56:33] CONNECT: MAFYA=BALTROS connected (IP:78.174.8.126 Serial:0D3C0C3E418D7DEDF4E60FE33CB64753 Version:1.5.3-9.11204.0)[2017-03-0710:56:33] JOIN: MAFYA=BALTROS joined the game (IP:78.174.8.126)[2017-03-0710:56:35] KICK: MAFYA=BALTROS was kicked from the game by (Command Flood)[2017-03-0710:56:35] CHAT: MAFYA=BALTROS: multi theft auto turkis de +70 araç+70 sikin adminilklerimiz indirimdedirrrrr!!!
I would also like to request a tempory ban or something like that for this guy. Maybe it will teach him and his friends a lesson.
Question
Bonsai
Hi,
from time to time, random people join my server and spam ads in the chat. Usually this isn't so bad as they only do it once and never come back.
But today some guy kept joining over and over again spamming stuff.
The problem is, apparently he is able to get around the function that handles every output to the chat.
Normally, he shouldn't be able to write anything in the chat without going through this function.
But it seems when you join a server and very fast after that spam a message, it will be output to the chatbox without trigger the "onPlayerChat" event.
I would also like to request a tempory ban or something like that for this guy. Maybe it will teach him and his friends a lesson.
Bonsai
Link to comment
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now