Commit Graph

78 Commits

Author SHA1 Message Date
Guangcong Luo
db09d66039 Update zalgo filter 2014-12-01 16:49:29 -05:00
Guangcong Luo
4c32621593 Reintroduce command crashguard
If a crash happens during a command (which is around 99% of all
crashes), a bug in either Node or SockJS causes the user who issued
the command to be unable to do say or do anything (although they'll
still receive messages).

We used to have a crashguard to prevent this from happening, but
it was removed due to suspicions of being a significant lag source.
Later lag investigation has shown that it's not the biggest source
of lag, so we're reintroducing that crashguard for now.
2014-10-21 16:49:22 -04:00
小太
ae6da14ca0 Misc cleanup
The important fixes from pull request #865
2014-10-12 21:34:59 -05:00
Guangcong Luo
2fbb1d52a3 Optional 'global' for global promotion/demotion
Adds support for adding the word 'global' in front of global
promotion/demotion commands, for instance /globalmod username
to promote a user to global mod.

Also adds /roomdeauth.
2014-10-12 22:13:22 -04:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
Guangcong Luo
4a761b470d Update zalgo filter
Some users were using some zalgo not caught by the current filter.
The new filter fixes that.
2014-09-05 23:16:14 -04:00
Guangcong Luo
34f9137d69 Fix crash when sending '/ ' 2014-09-04 16:19:20 -04:00
Guangcong Luo
0570c0dbcb canTalk now supports returning /command
returning /command will parse the command returned. This is mainly
useful for Config.chatfilter.
2014-08-30 02:12:09 -04:00
Guangcong Luo
7bf6269813 Remove lobby spoiler filter
It belongs in the config chatfilter
2014-08-22 00:35:04 -04:00
Guangcong Luo
b1cd4e81dc New command API sendModCommand
Does the same thing as privateModCommand, but without logging it
2014-08-12 20:42:35 -04:00
Guangcong Luo
af2026436a More style fixes and Gulpfile updates
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.

The code has been fixed to match the new stricter standards.

JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
2014-08-10 20:43:53 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
Morfent
57482eb7f9 Only merge .js files from ./chat-plugins/ 2014-08-07 07:19:26 -03:00
小太
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