Commit Graph

37 Commits

Author SHA1 Message Date
Guangcong Luo
1856bb1ff9 Fix Config.pmmodchat to allow PMing auth 2017-07-20 18:22:06 -04:00
Konrad Borowski
4ac00df5d2 Multiply PP in move data (#3701) 2017-07-12 17:20:29 +09:00
Quinton Lee
bfc3ddf710 Fix trailing whitespace from 2353a74b59 2017-07-11 15:55:01 -05:00
William Granados
2353a74b59 Add emoji filters to roomsettings (#3745) 2017-07-12 01:49:57 +09:00
Konrad Borowski
c0d69110a3 Update URL regex to match one in client
Recently URL regex was modified in client to have \b in different
places to allow http: links without requiring a space before such
links. This commit also updates server, as it will likely handle
formatting in the future.
2017-06-26 13:17:33 +02:00
Guangcong Luo
0143ae28dd Replace fs module (#3686)
The new FS module is an abstraction layer over the built-in fs module.

The main reason it exists is because I need an abstraction layer I can
disable writing from. But that'll be in another commit.

Currently, mine is better because:
 - paths are always relative to PS's base directory
 - Promises (seriously wtf Node Core what are you thinking)
 - PS-style API: FS("foo.txt").write("bar") for easier argument order
 - mkdirp

This also increases the minimum supported Node version from v6.0 to
v7.7, because we now use async/await. Sorry for the inconvenience!

This also drops the mock-fs-require-fix dependency

mock-fs-require-fix was always kind of a huge hack. It's no longer
necessary, with an FS API that does everything it used to.

This removes a lot of other hacks from test/main.js, which is nice.
2017-06-24 13:42:54 -07:00
Spandan Punwatkar
d1400f4644 Refactor /data to generate HTML (#3378) 2017-06-19 17:02:47 -07:00
Bär Halberkamp
961ffc3f9b Upgrade eslint to 4.x (#3657) 2017-06-18 22:37:43 -07:00
Bär Halberkamp
92aa82794d Add usage of <psicon> (#3653)
* Add support for <psicon> to parseText

* Utilize <psicon> in giveaways

* Utilize <psicon> in /dexsearch and /itemsearch
2017-06-17 17:48:47 -07:00
Charlie Kobayashi
114d5fd649 Scavengers: add games, multiple hosts and answers (#3646) 2017-06-16 11:52:24 -05:00
HoeenHero
093701eb40 Notify users when a declare is used (#3435) 2017-06-13 22:07:56 -05:00
HoeenHero
9e186b5ea6 Apply spam filter to the help (#3608) 2017-06-11 10:21:43 -05:00
Charlie Kobayashi
f861dfddfe Scavengers: Add leak block, fix grammar, autojoining, /leavehunt (#3540) 2017-05-24 23:58:42 +09:00
Charlie Kobayashi
49b1f5bd7f Scavengers: autolink links in scavenger hunts. (#3527) 2017-05-17 23:09:30 -05:00
Guangcong Luo
5ed4bfe3d1 More TypeScript refactoring
prng.js is now validated by TypeScript. battle-engine is too huge and
tsc bugs out on it, but it needs to be split into a number of smaller
files anyway.
2017-05-05 16:48:38 -05:00
Teremiare
ef0658d1f4 Change chat filter bypassing (#3485) 2017-05-03 03:41:30 -07:00
Charlie Kobayashi
a844906098 Fix HTML and date field check in room-events (#3298) 2017-02-25 22:28:19 -05:00
CheeseMuffin
b0278d59f9 Fix typo in chat.js (#3274) 2017-02-22 16:47:00 -06:00
Guangcong Luo
82ed0c04c1 Fix username banword filter
It was mixing a ! and also it didn't work when filtercaps and
filterstretch were off.
2017-01-06 04:48:38 -05:00
CheeseMuffin
3ea6a384dd Prevent users from talking when name is banned in room (#3077) 2017-01-05 17:02:42 -08:00
Bär Halberkamp
37205d9b24 Implement /sharedip (#2870)
* Implement /markshared

* Refactor /whois ips to two lines

* Refactor splitTarget
2016-12-25 14:26:17 -08:00
asgdf
9a727972cd Make duration strings use rounding (#3021) 2016-12-13 19:39:20 +01:00
Bär Halberkamp
88a3450572 Report global punishments in staff if they're done outside it 2016-12-12 00:26:14 -08:00
panpawn
54837cb504 Check for more missing tags in this.canHTML (#2999)
This checks for if there are missing strong, marquee, blink, em, code, details, and summary tags
2016-12-11 04:29:46 -05:00
panpawn
62760c3836 Rename unclear variable in Chat#toDurationString (#2971)
This renames 'limit' -> 'precision'.
2016-11-30 19:56:19 -06:00
Bär Halberkamp
1fc0103cfb Fix toDurationString 2016-11-30 18:46:03 +01:00
Guangcong Luo
639b6c340d Silence "command tried to write to global" error
Commands currently write to global all the time but I don't really have
time to fix it right now.

TODO: actually fix
2016-11-30 01:11:25 -05:00
Bär Halberkamp
8fce8c2633 Refactor /whois and /checkpunishment (#2967)
Also add a Punishment monitor
2016-11-29 19:18:24 -06:00
Guangcong Luo
27ffe81ff4 Apply filterCaps/filterStretch to usernames 2016-10-21 16:04:30 -04:00
panpawn
420e28ce91 Chat: Tell locked users their lock duration (#2823)
This also adds `Punishments#checkLockExpiration` - mostly for this, but also to remove some repetitive code in the whois command as well.
2016-10-04 23:52:19 -07:00
Ben Davies
54d0ff203a Performance: replace direct references to arguments with rest parametres (#2818)
Replacing direct references to the arguments object of functions with rest
parametres prevents the function from being deoptimized while still allowing
use of arbitrary arguments. This may also fix some minor memory leaks related
to mishandling the arguments object.
2016-10-04 16:29:14 -07:00
Guangcong Luo
4db67f3cca Report crashes in Dev
Currently, only crashes that require a server restart are reported
outside of the crash emailer and stdout. This makes it so all crashes
are reported.
2016-10-03 03:18:22 -07:00
Bär Halberkamp
a1b69a7b89 Refactor lockdowns (#2808) 2016-10-02 18:52:00 -07:00
panpawn
99705c7cc1 Rename commands.js -> chat-commands.js (#2805) 2016-10-01 21:37:16 -07:00
panpawn
0efd7133f7 Chat: Fix /reply not working correctly (#2804)
In one of the recent refactors, it dropped code like this that broke /reply to not work right
2016-10-01 17:02:11 -07:00
Guangcong Luo
99347093c4 Fix bugs in Chat refactor 2016-10-01 16:16:33 -07:00
Guangcong Luo
d6f5404e7e Rename CommandParser to Chat
We had a lot of discussion in Dev and a somewhat-close poll, but in
the end "Chat" was a better name than "Messages", and also has the
advantage of being shorter (which is nice for Chat.html and
Chat.plural which should be short).
2016-09-30 18:31:15 -07:00