Giter Site home page Giter Site logo

gmod-custom-chat's Introduction

Custom Chat

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

GLuaLint Workshop Page

Features

  • Customizable
  • Has built-in emojis
  • Supports text formatting (bold, italic, fonts, code blocks, etc.)
  • Embed image/audio files (Only loads from trusted websites by default)
  • Find text with Ctrl+F
  • Shows icons for prop models
  • Keeps the default "hands on ear when the chat is open" 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
  • (Admin Only) Set custom chat tags
  • (Admin Only) Set custom join/leave messages

โš  A major refactor was implemented recently.

Heres some of the more notable changes:

  • Moved and renamed files, now using more appropriate names
  • Replaced all references of SChat with CustomChat
  • Made functions from the CustomChat global table use : only when necessary
  • Implemented new data save formats, save data to a separate folder
  • Written a data migration script
  • Use a dedicated library to synchonize server theme/emojis/tags across clients
  • Made the chat history panel able to be used separately
  • Store emojis in a more readable format
  • Vastly faster way to access emoji properties
  • Moved the main chat interface to a separate vgui panel
  • Made the right-click menu options work independently (so now it can show both "Copy text..." and "Copy link...", for example)
  • Theme editor overhaul & the ability to save multiple themes
  • All text is stored in language files now

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 )

Contributing

Before you open a pull request, please read this.

gmod-custom-chat's People

Contributors

styledstrike avatar shockpast avatar mka0207 avatar novadiablox avatar anormaltwig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.