Chat History Mod v2.0
chat_history (by sorcerykid)
Chat History is an interactive chat history viewer with a variety of message filtering options and notification sounds for use on servers. This mod is intended to be compatible with all versions of Minetest 0.4.16+. It has been in continuous use on the Just Test Tribute server since July 2017 with only minor revisions and no known bugs.
PS. A lot of people have been asking me (for over a year now) to release this mod, so here it is finally. Sorry for the delay ;)
Download Archive (.zip)
Download Archive (.tar.gz)
Chat2 Mod (optional)
Source Code License:
Copyright (c) 2017-2018, Leslie Krause
GNU Lesser General Public License v3 (LGPL-3.0)
Creative Commons Attribution 4.0 International (CC BY 4.0)
See included README.txt for licensing terms.
With the /chat command, you can view the entire chat history (up to 100 messages) or you can filter messages by a specific player as well as by PM or shout. When filtering by PM, you will only see private messages sent to you or that you sent to other players. You can also copy the output text directly to the clipboard. For convenience sake, messages are sorted newest first.
With the /c [search_phrase] command, you can search for messages containing only a specific phrase in addition to the existing filters. For more refined queries, DOS-like wildcards are supported: ? matches a single character, + matches one or more characters, and * matches any number of characters.
Best of all, since the messages are stored server-side, it is possible to view chat history that occurred prior to logging in, including offline private messages. An alert sound will also play if you receive a private message while logged into the server. No more wading through pages of text just to catch up on any important discussions while you were away!
The primary impetus for this mod was to aid in moderation and administration tasks. For example, copying text into a translator is impossible given the existing chat interface. On a multi-lingual server, however, that is near essential. Likewise, the ability to search and filter text can be beneficial when investigating chat-related misconduct while in-game.
For server operators (and mod or game developers) that wish to interface directly with the Chat History, I've provided the following two functions:
- chat_history.add_message( sender, recipient, message )
Inserts a new message into the chat history buffer
- sender - the name of the player sending a message
- recipient - the name of the player to receive a private message, or nil for a global message
- message - the text of the new message
Opens the chat history viewer for a specified player
- name - the name of the player to show the formspec to
- filter_player - an optional player name by which to filter the messages