Commit Graph

65 Commits

Author SHA1 Message Date
小太
a2bfb57bfe Move chat plugins to their own directory 2014-08-04 18:33:52 +10:00
Guangcong Luo
21ec515844 nimp no longer needs to be hardcoded 2014-07-27 02:25:46 -04:00
Relados
965ec31d27 Add missing '/' in unrecognized command message
Using '//' would begin a message with '/' and the message should reflect that accurately.
2014-06-30 09:39:30 -05:00
Guangcong Luo
7474c79330 Fix bug in HTML validator 2014-06-28 09:12:00 -04:00
Guangcong Luo
73e3ffaf9a Roomintro feature 2014-06-26 22:53:37 -04:00
Guangcong Luo
3f862c4049 Roomauth can see private commands 2014-06-18 01:23:50 -04:00
TalkTakesTime
4d5f32fd4c Refactor unlinking code 2014-05-06 00:08:54 +12:00
小太
31d784cfd0 Fix previous fix... 2014-04-22 02:51:32 +10:00
小太
031127085d Fix missed quote in command-parser.js 2014-04-22 02:46:33 +10:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
小太
6fb3bc332a Spaces around operators and === instead of == 2014-04-22 01:56:11 +10:00
小太
071863d9f8 Use proper quotes for all the command related files and other minor cleanup
Proper quotes are " for strings that will eventually be read by a human and ' for everything else
2014-04-21 18:55:08 +10:00
Guangcong Luo
de3b4c4432 Introduce !htmlbox
Displays an HTML box. Can only be used by leaders+, or by
roomowners who are also globally drivers+.
2014-04-20 02:54:42 -04:00
Slayer95
05e7060474 Deprecate 'toUserid' global
Replaced by 'toId'.
2014-04-18 16:49:16 -05:00
Slayer95
4c18aa60f1 Remove global 'fs' 2014-04-17 14:37:32 -05:00
Slayer95
75559362b4 Rename global config to Config 2014-04-17 01:12:28 -04:00
Guangcong Luo
2bf7416bcc Refactor targetUserOrSelf
It now always fills out targetUsername, and passes the exactName
flag through to splitTarget. /whois will no longer follow through
name changes unless the /whois user has auth (voice counts).

This is not a secure way to hide from unvoiced users; other
commands such as PMing will still follow through.
2014-04-15 16:46:12 -04:00
Guangcong Luo
f3b698581a Drop support for server version hashing 2014-04-10 19:04:24 -04:00
Guangcong Luo
f6f6ece41f Battles all go into a single battle modlog 2014-02-26 15:13:50 -05:00
Tyler Stark
afb3dc0c09 First pass at code quality: adding semicolons. 2014-02-09 20:35:42 -06:00
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