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
Arburator
dc8a328118
minute(s) not minutes [poll.js]
...
"The poll timer was turned on: the poll will end in 1 minutes"
2016-03-28 17:17:56 +01:00
Bär Halberkamp
3465829e22
Add permissions for roomgames
2016-02-26 22:19:19 +01:00
Bär Halberkamp
c207fab3cd
Fix false negatives in polls upon joining
2016-02-17 21:09:44 +01: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
Marty-D
ccd75e0325
Fix build error in 64a5b14445
2016-01-27 21:51:00 -05:00
Guangcong Luo
64a5b14445
Polls: Make clear you can't vote after seeing results
2016-01-27 18:32:59 -05:00
Guangcong Luo
b355059f4e
Polls: Optimize bandwidth use
2016-01-27 18:32:59 -05: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
panpawn
239accce9d
Poll: replies should say 'timer', not 'timeout'
...
"Timeout" is mostly a programming term; not something I want to show users. - Zarel
2015-12-21 17:18:56 +00:00
Guangcong Luo
fab79a636a
Fix poll display
...
Polls now correctly display to connections, not users.
2015-12-14 17:22:41 -05:00
Guangcong Luo
b6e370e789
Add 'Show results' button to polls
2015-12-09 06:25:49 -05:00
Guangcong Luo
2c9ceb23af
Make polls stay in roomlog after ending
2015-12-09 06:23:54 -05:00
Bär Halberkamp
f133118ab4
Poll: convert poll to the new class syntax
2015-12-05 15:50:45 +01:00
Guangcong Luo
dfc79474d7
Polls: Better error messages
2015-11-24 23:54:27 -05:00
panpawn
6727d87808
Standardize canTalk() permission in chat-plugins
2015-11-23 16:06:12 +00:00
Ivo Julca
4adc1b4ca4
Fix /poll timer
...
- Check for max supported timeout.
- Fix return value for /poll timer clear
2015-11-20 20:40:15 -05:00
Bär Halberkamp
75a6b6549a
Fix a serious mistake in the poll code
2015-11-12 04:43:29 +01:00
Bär Halberkamp
a731536451
Add a check for userid for polls
...
This way, users with a dynamic IP will not be able to vote twice on the same name.
2015-11-09 22:32:02 +01:00
Bär Halberkamp
20efd5d395
Update polls to indicate what option was voted for
2015-11-09 22:31:21 +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
Ivo Julca
9106519add
Log content of polls
2015-11-04 00:15:02 -05:00
Bär Halberkamp
e91e28eb0c
Send a reply when there's no timer for the poll as well
2015-10-27 21:57:40 +01:00
Bär Halberkamp
3850950fe1
Allow the timer of a poll to be cleared with /poll timer clear
2015-10-27 21:57:40 +01:00
Bär Halberkamp
eb1658326e
Make /poll timer check for negative time
2015-10-27 21:57:37 +01:00
Bär Halberkamp
367beb3868
Update /poll timer to show the timeout
...
as well as showing it to everyone when being set
2015-10-27 20:40:02 +01:00
Bär Halberkamp
d88922da57
Allow users to do /poll results to see the results instead of voting
2015-10-27 20:27:03 +01:00
Bär Halberkamp
1f86ed1bac
add alias 'show' for /poll display
2015-10-14 00:44:37 +02:00
Bär Halberkamp
2b0e227346
Make /poll return the entire help, and remove the second line from the help
2015-10-14 00:41:53 +02:00
panpawn
ac0fd7413f
Specifiy "poll" timeout in /poll timer
...
Some room staff or people looking in the modlog may get confused by the message "The timeout was set to...," so this specifies that it's referring to "The poll" as it does when a poll is started / ended.
2015-10-12 19:35:19 -04:00
Guangcong Luo
7acd5bfa1e
Merge pull request #2200 from bumbadadabum/poll3
...
More updates to /poll
2015-10-11 17:11:45 -05:00
Guangcong Luo
467a01171b
Fix build error
2015-10-10 18:56:05 -04:00
Guangcong Luo
bb344627bd
Minor poll redesign
2015-10-10 18:16:48 -04:00
Bär Halberkamp
bfa254f320
Update /poll
2015-10-09 11:41:17 +02:00
Guangcong Luo
34041dd63d
Redesign polls
...
Polls now have bar charts and also overall look much nicer.
2015-10-09 04:46:38 -04:00
Guangcong Luo
48cd66814a
Add basic poll documentation
2015-10-09 04:45:18 -04:00
Guangcong Luo
804078ee0e
Add some aliases for polls
2015-10-09 04:43:58 -04:00
Guangcong Luo
f3e8eb94af
Limit polls to 1024 chars total
2015-10-09 04:43:58 -04:00
Bär Halberkamp
e47b5de3dc
Updates to polls
2015-10-07 14:20:49 +02:00
Bär Halberkamp
4eef1e9c2b
Implement polls (serverside code)
2015-10-05 01:30:44 +02:00