Commit Graph

22 Commits

Author SHA1 Message Date
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