Browsing the Requests section and seeing many requests related to chat commands, I made this. This is (as far as I know) the only public chat command solution that includes proper quote parsing (similar to Source console).
Distributed as an easy to use Lua module and can be used exactly like concommands.
[lua]require( “chatcommand” )
local function PrintToChat( ply, cmd, args )
ply:ChatPrint( table.concat( args, ", " ) )
chatcommand.Add( “chatprint”, PrintToChat )
concommand.Add( “chatprint”, PrintToChat )[/lua]
[/li][li]Prefixes are / for private (doesn’t print anything) and ! for public. These can be changed with chatcommand.PrefixPrivate and PrefixPublic.
[/li][li]By default this doesn’t block any other types of chat commands, but you can change that with chatcommand.Blocking.
[/li][li]You can also change the settings by editing the Lua script.
[li]Extract to garrysmod/
[li]Lexi for pattern to parse quotes