Cuberite Forum
More Chat Support? - Printable Version

+- Cuberite Forum (
+-- Forum: Plugins (
+--- Forum: Plugin Discussion (
+--- Thread: More Chat Support? (/thread-2983.html)

More Chat Support? - djlw78 - 06-27-2017

Is there a way to capture the out going message?

  • Check to see what the message starts with "Example lowercase"
  • Replace the chat message
It would be nice to be able to do this.

RE: More Chat Support? - NiLSPACE - 06-27-2017

You can use the OnChat hook to do that.
For example you can use this to make the first character uppercase:
function OnChat(a_Player, a_Message)
	a_Message = (a_Message:gsub("^%l", string.upper))
	return false, a_Message

RE: More Chat Support? - djlw78 - 06-28-2017

Did you use regex for "^%l"