Commit Graph

45 Commits

Author SHA1 Message Date
Guangcong Luo
2ccac636a9 Global ranks can't bypass in modchat in private rooms 2014-01-02 21:19:33 -08:00
Joimer
ef7bbd182a Fix /modlog all
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.
2013-12-05 16:03:22 +01:00
Joimer
52e50cb539 Update Scavenger Hunt plugin 2013-12-04 18:03:56 +01:00
Joimer
14fcfdc47e Implement chat plugins
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.
2013-12-04 17:59:31 +01:00
Joimer
056ad5194e Improve modlog
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.
2013-11-27 15:26:06 +01:00
Guangcong Luo
6146c49764 Chat filter now passes connection instead of socket
socket no longer exists, and this change was long overdue anyway.
2013-11-13 20:25:50 -08:00
Guangcong Luo
8b13f80d13 Fix modchat message 2013-10-16 13:33:21 -07:00
Guangcong Luo
c9df0a0b6b Prevent spoilers from being used in lobby 2013-10-03 23:17:31 -07:00
Guangcong Luo
895d903ca6 Room auth overhaul
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.
2013-09-30 21:54:37 -07:00
Guangcong Luo
40edbcb3c3 Fix overly-strict Zalgo filter
It was filtering out some legitimate Thai words.
2013-09-26 23:14:49 -07:00
Guangcong Luo
1e2255f570 Allow roomvoices to talk in modchat autoconfirmed 2013-09-23 20:46:59 -07:00
The Immortal
baa7df1d8d Save IP of banned users in the modlog
This adds a second parameter to addModCommand which is shown in the
modlog but not in the room log.
2013-09-23 21:27:03 +04:00
Guangcong Luo
875e6d5988 Implement /modchat autoconfirmed 2013-09-22 00:11:56 -07:00
piiiikachuuu
a1f046cab8 If a command is unrecognized, send the error message to the correct room. 2013-09-14 17:48:18 -04:00
Guangcong Luo
ae62e9e737 Update ResourceMonitor to control bandwidth 2013-09-01 02:37:35 -07:00
Joimer
750720c88f Move emergency socket message logging to a higher level 2013-08-27 13:05:32 +02:00
Joimer
24b0721f5f Proper error logging for emergency mode file logs 2013-08-27 10:23:41 +02:00
Joimer
4285fb7618 Add emergency logging toggable by config 2013-08-27 10:18:21 +02:00
Slayer95
fd422af24f Fix typo in last commit 2013-08-20 22:15:38 -05:00
Slayer95
cccfd514d1 Improve canBroadcast()
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.
2013-08-20 20:13:40 -05:00
Guangcong Luo
cdc5f57e09 Make sure canTalk works correctly for blank messages 2013-08-18 22:02:39 -07:00
V4Victini
575b0d1c14 Parse devoice, demod, etc. commands correctly 2013-08-04 00:00:50 -04:00
Guangcong Luo
4c40185e9e Remove Thai zalgo 2013-07-31 19:57:36 -07:00
Guangcong Luo
759e2aaaef More generalized per-room auth
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.
2013-07-07 12:22:48 -07:00
Guangcong Luo
e490ee3ea8 Command cooldown is now per-room 2013-07-03 01:16:32 -07:00
Guangcong Luo
4ff26ea064 Support for per-room authority
- 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
2013-07-02 20:38:58 -07:00
Guangcong Luo
f1f3b6db98 Improved rooms support
- 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
2013-07-01 22:26:22 -07:00
Cathy J. Fitzpatrick
941da0f043 canTalk now applies more uniformly
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.
2013-06-17 03:53:46 -06:00
Cathy J. Fitzpatrick
f0d9c4a92d International-friendly anti-spam function 2013-06-05 04:59:04 -06:00
Cathy J. Fitzpatrick
8878269ff5 Basic anti-spam function only applies to the lobby 2013-06-04 22:19:17 -06:00
Cathy J. Fitzpatrick
fc5aadebb6 Implement basic anti-spamming mechanism 2013-06-04 20:51:17 -06:00
Guangcong Luo
01656c0141 Per-room muting 2013-06-02 00:20:56 -07:00
Guangcong Luo
fee174e2a8 Multiline eval
">> " 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.
2013-05-31 00:10:24 -07:00
Guangcong Luo
5c06128bb1 Private mod commands
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
2013-05-30 21:48:21 -07:00
Cathy J. Fitzpatrick
558ed856ad Improved error handling 2013-05-27 21:21:34 -06:00
Guangcong Luo
27be062395 Tons of documentation 2013-05-24 14:59:29 -07:00
Guangcong Luo
b7ece3d6f9 Crash gracefully if a command handler crashed 2013-05-24 14:59:29 -07:00
Guangcong Luo
be4e5a6134 Fix crash in this.parse 2013-05-23 21:57:06 -07:00
Guangcong Luo
9b72c9d486 Make sure command replies show up in correct room 2013-05-23 21:05:03 -07:00
Guangcong Luo
0c0019f010 Rename broadcastable to canBroadcast for consistency 2013-05-23 19:32:34 -07:00
Guangcong Luo
0f87f8e59d canTalk now handles all chat filtering 2013-05-23 19:31:21 -07:00
Guangcong Luo
e73e3f14e5 Move access denied message to this.can 2013-05-23 19:18:15 -07:00
Guangcong Luo
87005eff94 Faster broadcast cooldown implementation
This one uses an early return instead of a flag to suppress the
broadcast.
2013-05-23 19:10:01 -07:00
Guangcong Luo
dfcdd3234c Cooldown for broadcastable commands 2013-05-23 19:05:46 -07:00
Guangcong Luo
08a00d64b1 Refactor chat commands
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.
2013-05-23 05:25:33 -07:00