Modlog now uses synchronous fs directory reading to check all existing
modlogs.
Additionally, A new folder has been created to save all modlogs, since
battle modlogs are saved as well.
Chat plugins are a set of functionalities and data that allows
users to implement in their server additional plugins less related
to the main purpose of the simulator.
The plugins are to be used with chat commands and are tightly
implemented with them. Plugins can be used for games or other
relevant interaction of users with the chat commands.
Modlog is now separated by rooms and each room has its own independent
modlog file to be searched into.
The new syntax allows to search directly into the room's modlog, but also
allows you to input a room and add then the criteria after a comma to
find about other rooms's modlogs.
You can also search in all rooms at once using 'all' as roomid.
Usage:
/modlog - Searchs for last 100 lines on current room's modlog.
/modlog lines or word - Searches for lines lines or word into room's
modlog.
/modlog roomid, lines or word - Searches for lines lines or word into
roomid's modlog.
/modlog all, word - Searches for word onto all modlogs.
Room auth now match regular auth much better. There are now room voices,
room drivers, room mods, etc. They correspond to the global versions,
except with their powers restricted to the current room.
Roomdriver no longer gets /roomvoice; it's now roommod and higher.
If still in cooldown, the command is not added to the room anymore, and a message is sent to the user.
If an unauthorized user attempts to broadcast, the error message is now sent to the current room rather than to Lobby.
Per-room auth is now less hardcoded. Promotion/demotion is still
done manually in commands.js, but at least users.js doesn't have
as much hardcoded.
A result of this is that /roomvoice is now possible.
- if room.auth exists, the room will have its own authority instead
of global authority
- # is room owner, % is room moderator, admins are still there, and
every other auth becomes voice
- % can mute/unmute/announce
- # can additionally roommod/deroommod/declare/modchat
- modchat is now per-room
- Rooms now stay in existence through restarts
- Room data is stored in config/chatrooms.json
- By default, there's a staff room autojoined by staff and joinable
only by staff
The `canTalk` filter now applies to broadcast commands and private
messages. In particular, this means that the maximum message length
(currently 300 characters) now applies to private messages.
">> " and ">>> " now accept multiple lines. In addition, ">> "
does not broadcast by default.
Their functionality are also available by !eval (which does
broadcast) and !evalbattle, although those are single-line.
While /eval doesn't broadcast, /evalbattle still does because
it's unnecessarily difficult to make simulator processes send
things privately.
Certain actions are now shown only to online auth, the modlog,
and the room log. These include:
- Demotion
- Muting/locking/banning a user that's already muted/locked/banned,
without a message
chat-commands.js is no more, it's been split into command-parser.js,
commands.js, and config/commands.js.
There's also a new API for commands which should be much easier to
use.