Commit Graph

65 Commits

Author SHA1 Message Date
Bär Halberkamp
d345c15336 Remove placeholder code for gen 7 sprites 2016-12-01 02:42:06 +01:00
Bär Halberkamp
30d2f6affb Fix gen 7 mons in giveaways 2016-11-22 00:45:57 +01:00
Bär Halberkamp
ed315b4937 Wifi: change wording in the GA window 2016-11-19 02:07:48 +01:00
panpawn
76285471a0 Fix double errorReply while muted in some cases (#2830)
Due to the recent refactor that changed how `this.canTalk` works, if a user was muted in a room, and then tried to do a command that wasn't allowed to be used if they can't talk, it would send two replies: "You are muted and cannot talk in this room." AND "You cannot do this while unable to talk."

This makes it so that if you're using a command while muted that isn't allowed to be used if you can't talk, it will just use the "You are muted and cannot talk in this room." errorReply.
2016-10-08 20:58:16 -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
Guangcong Luo
da1b318707 Move text processing from Tools to CommandParser
The following functions have been renamed:

- Tools.html to CommandParser.html
- Tools.plural to CommandParser.plural
- Tools.escapeHTML to CommandParser.escapeHTML
- Tools.toDurationString to CommandParser.toDurationString
- Tools.toTimeStamp to CommandParser.toTimestamp
  (notice the lowercase 's')

This is in preparation for a rename of Tools to Dex (by removing the
non-dex-related functions) and a rename of CommandParser to either
Messages or Chat.
2016-09-30 18:04:13 -07:00
Bär Halberkamp
c6814a384d Properly support custom room punishments 2016-09-24 22:49:51 +02:00
Bär Halberkamp
0e13baa9ab Wifi: Make giveaway bans persist 2016-09-17 21:31:41 +02:00
Bär Halberkamp
3b2dfc0b1a Wifi: Fix a typo in the winner message for question GAs 2016-09-04 04:02:26 +02:00
Bär Halberkamp
8a9e6c5d9e Wifi: Fix false positives 2016-09-01 00:52:49 +02:00
Bär Halberkamp
90fe6294f5 Wifi: Remove aliases
They cause too many false positives to be useful currently. I might re-implement them in a different way to avoid this, but the room staff has let me know this is a very low priority
2016-08-30 18:55:17 +02:00
Bär Halberkamp
3b18e5f31a Wifi: Improve the sprite previews for giveaways
It now works with other forms and aliases
2016-08-27 23:28:44 +02:00
Bär Halberkamp
09ab8a7370 Wifi: improve layout of GAs more 2016-08-26 08:49:23 +02:00
Bär Halberkamp
065e7d465e Wifi: fix a bug in lottery GAs 2016-08-26 08:29:35 +02:00
Bär Halberkamp
ed226667d4 Wifi: Improve lottery GAs 2016-08-24 20:52:45 +02:00
Bär Halberkamp
39be30845d Wifi: Give GAs a new layout
Also convert strings to template strings
2016-08-23 22:59:31 +02:00
Bär Halberkamp
beafb9d806 Fix really stupid mistake in the wifi GA plugin 2016-08-19 21:40:01 +02:00
Bär Halberkamp
55429ed884 Move modlog writing to Room.prototype (#2700)
* Move modlog-related functions to Room.prototype, instead of CommandParser

* Wifi: modnote the winner of a giveaway
2016-08-18 16:45:53 -05:00
panpawn
36d7728b06 Update help commands to reflect new bot rank (#2634)
Also, give the bot rank the new addhtml permission in config/config-example.js

... And, we are going to fix promoting locked users to rank bot.
2016-07-20 19:50:47 -06:00
Bär Halberkamp
0b3610c0e5 Wifi: Display . and - in lottery answers 2016-06-11 04:35:17 +02:00
Bär Halberkamp
7fe96fc137 Wifi: Improve various things 2016-05-14 18:23:07 +02:00
Bär Halberkamp
70b9f9279c Wifi: fix ending messages 2016-05-14 18:23:07 +02:00
Bär Halberkamp
682a9cefbd Fix lottery giveaway with more than 1 winner 2016-05-14 03:19:59 +02:00
Bär Halberkamp
714a0823f3 Wifi: add a missing </p> 2016-05-14 03:16:04 +02:00
panpawn
a0f8a86d45 Wifi: Escape lottery ending message (#2559) 2016-05-13 03:44:19 +02:00
Bär Halberkamp
fd608b7629 Wifi: Improve lottery ending message 2016-05-12 18:27:00 +02:00
Bär Halberkamp
9b7a76fea6 Wifi: Fix question GAs 2016-05-12 16:11:43 +02:00
Bär Halberkamp
9259c2fe00 Fix a bug in the wifi chat plugin 2016-05-12 13:15:23 +02:00
Marty-D
4c153afcee Wi-Fi Plugin: Update results messages
Got lost in 2a600596d6
2016-05-08 21:38:34 -04:00
Bär Halberkamp
2a600596d6 Rewrite and improve the wifi giveaway plugin 2016-05-09 01:52:42 +02:00
Marty-D
d62cee0ff8 Wi-Fi Plugin: Update results messages 2016-05-07 15:04:30 -04:00
Caleb Young
d02a2edd49 Wifi Plugin: Prevent muted/locked users joining giveaways (#2516) 2016-04-16 06:58:36 +04:00
Ivo Julca
10bb83bf3c Improvements to command broadcast API
- Method `this.runBroadcast()` has been split from `this.canBroadcast()`.
It's now the only method handling command-usage and intended as the main API
for synchronous commands. Async commands will execute both separately.
Note that the `suppressMessage` parameter is now passed to `runBroadcast`.

- The semantics of `broadcasting` have been similarly split.
`this,broadcastMessage` will be set to a truthy value when `this.canBroadcast` is run.
`this,broadcasting` will only be set to `true` once `this.runBroadcast` is executed.
2016-04-02 15:46:13 -05:00
Guangcong Luo
b665660608 Refactor for more ES6 features
Now that nodejs/node#3072 is mostly fixed, we can finally start using
Node 4+ features.

This refactor:

- uses arrow functions where appropriate

  Note that arrow functions still aren't used in Mocha, where `this`
  is sometimes meaningful.

  This also removes the need for .bind() nearly everywhere, as well
  as the `self = this` trick.

- refactors Validator and Connection into ES6 classes

- no longer uses Array#forEach for iterating arrays

  We strongly prefer for (let i = 0; i < arr.length; i++) because of
  performance reasons. Most forEaches have been replaced with for..of,
  though, which is 5x slower than the long-form loop but 2x faster
  than forEach, which is good enough outside of most inner loops.

  The only exception is tournaments, which is due for a more invasive
  refactor soon anyway.
2016-02-10 17:40:21 -06:00
Teremiare
7d26b5d38b Wifi plugin: change various sendReply to errorReply 2016-01-26 15:11:44 +01:00
Sebastian
da76fe2d37 Wi-Fi plugin: Remind users to use /ga to answer 2016-01-17 21:37:17 +00:00
Guangcong Luo
9d245a1652 Revert "Revert "Remove explicit decimal radix from parseInt""
This reverts commit 55df20be60.
2016-01-07 18:45:50 -06:00
Slayer95
55df20be60 Revert "Remove explicit decimal radix from parseInt" 2016-01-05 12:56:32 -05:00
Bär Halberkamp
c254c663d3 Remove explicit decimal radix from parseInt 2016-01-05 17:35:12 +01:00
Konrad Borowski
81f602b8d8 Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
Ivo Julca
9a52fe337f Parse all numerical user input as base 10
Also took the chance to commit some style fixes missed in 90973d5 and 04c64c1.
2015-11-07 20:08:01 -05:00
Juanma Serrano
c4ac8d6e2f Use strict mode and let and const instead of var
This commit also fixes some duplicated variable declarations.
2015-11-06 21:56:52 -05:00
Rhythms
c72ee7d331 Wifi Plugin: Add two aliases 2015-07-05 13:02:19 -06:00
Ivo Julca
a2d2a52301 Chain Room#update to Room#[add|addRaw] everywhere 2015-07-03 20:45:57 -05:00
Guangcong Luo
809693caeb Fix crash in wifi chat-plugin 2015-06-25 17:53:39 -04:00
Bryan AA
966da4d7ab Escape é in some chat-plugins commands. 2015-06-12 15:03:20 -06:00
sirDonovan
44bd86f9f3 Wi-Fi Plugin: various fixes/improvements
Fix giveaways becoming frozen/endless from hotpatching, fix possible
crash in lottery giveaways, simplify lottery drawings, and improve
wording in multiple statements
2015-04-04 08:15:20 -05:00
Cranham
ba249224a9 Wifi Plugin: Log what user have done giveaways
Log the user that the giveaway was done for in the modlog ontop of roomauth who did it

Wifi Plugin: Log what user have done giveaways

remove 'has'

Wifi Plugin: Log what user have done giveaways

Add back in the space.
2015-04-01 15:54:00 +01:00
Cranham
eb8421d157 Wifi Plugin: fix /showanswer
Fixes a case where /showanswer was not working correctly due to incorrect operators.
2015-03-31 00:09:10 +01:00
The Immortal
21d0390b00 Wi-Fi Plugin: Remove space in winning message 2015-03-11 22:01:48 +04:00