Board Thread:Support Requests - Getting Technical/@comment-1251315-20151028144244/@comment-1251315-20151031163259

Penguin-Pal wrote: Just to make this clear, are you trying to: Basically, I'm trying to see what has been sent into the chat. Say a user posts a message, everyone sees it and it says something like "Shit": I want my code to be able to see that word and post a message (through a user account automatically) into the chat that says "Usernamehere, please don't use profanity". That would cover your second bullet point.
 * 1) If a user hits "Enter" but their message contains a word in the filter, cancel the message sending and instead warn the user about it.
 * 2) If the user has already sent the message and everyone in the room can see it in main chat, do something with it.
 * 3) Other?

Now obviously I'm not going to go and add every single bad word into the filter, but really bad words that are racist and slurs should be picked up by my code and a message sent to the main chat.

By message, I don't refer to private message. :P

@Shining-Armor: I thought as much. As far as I could read of the controllers, mainRoom should always be available, but for some reason, when I used it, nothing worked as it said "mainRoom is not defined". Any pointers?