Skip to content

TAServers/gmod-custom-chat

 
 

Repository files navigation

Custom Chat

A simple and customizable chat box that can format text, display images and emojis.

GLuaLint Workshop Page

Features

  • Customizable
  • Supports embeds
  • Code blocks
  • Find text with Ctrl+F
  • Pre-added emojis
  • Display icons for prop models
  • Show images from URLs (Only loads images from trusted websites by default)
  • Keeps the default "hands on the ear" behaviour
  • Can be enabled/disabled at any time (Using the customchat_disable console variable)
  • (Admin Only) Suggest a theme to be used on your server
  • (Admin Only) Set custom emojis to be used on your server

Text Formatting Options

||Spoilers here||
*Italic text here*
**Bold text here**
***Bold & Italic text here***
$$rainbow text here$$
`line of code here`
{{block of code here}}
```block of code here```
[[Marquee-like advert here]]
[Link text Here](https://link-url-here.org)
<255,0,0>Red text here, and <0,0,255>blue text here

Fonts

You can change the font by typing ;fontname; before the text. (A list of fonts can be found on the workshop page.)

;comic; This will be displayed as Comic Sans


Whitelisted Sites

By default, the chat box will only load pictures from trusted websites. You can open a pull request to add more, or send a request here.

For developers

You can prevent links from certain players from embedding, by using the CanEmbedCustomChat hook on the clientside.

hook.Add( "CanEmbedCustomChat", "override_chat_embed_access", function( ply, url, urlType )
    -- return false to block embeds from "url"

    -- "urlType" will be one of these strings:
    -- "image", "audio", and "url" for other stuff

    -- example: only allow super admins to use embeds
    if not ply:IsSuperAdmin() then return false end

    -- example: prevent audio from embedding for everyone
    if urlType == "audio" then return false end
end )

About

A customizable chat box for Garry's Mod.

Resources

License

Stars

Watchers

Forks

Languages

  • Lua 100.0%