Commit Graph

241 Commits

Author SHA1 Message Date
Morfent
3aada3608b Trivia plugin: fix crashes from question submission 2015-04-16 22:35:18 -03:00
Joimer
b480deb2d2 Fix typo in Trivia ladder function 2015-04-15 00:49:55 +02:00
sirDonovan
376406aadd The Studio plugin: fix crashes and nominations 2015-04-14 02:29:36 -05:00
Morfent
41b4c3cbc1 Trivia plugin: optimize ladder updates, bug fixes
- the ladder is now saved in triviadata.json, and gets updated at the
  same time ranks do instead of needing to loop through the leaderboard
  once more
- Trivia.inactivityCounter clears properly on answer
- number and timer modes accept multiple answers again
- added question and intermission timeout consts
- Trivia property names are more specific
2015-04-12 17:40:12 -03:00
Morfent
3fd7efebf1 The Studio plugin: fix /aotd end 2015-04-11 22:49:28 -03:00
Ivo Julca
f6146b1a6d Plugin AotD: support io.js without es6-shim 2015-04-11 20:38:12 -05:00
Konrad Borowski
d87a307796 Allow | as alternate separator for /starthunt. 2015-04-11 15:29:34 +02:00
Morfent
89ccdd5203 Trivia plugin: fix rank sorting, levenshtein answers 2015-04-07 07:47:59 -03:00
Rhythms
f4ca4b8a8b TCG: fix spacing
wasn't really needed, but it's 'more correct.'
2015-04-04 11:58:45 -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
Morfent
9c7cae1aea Trivia plugin: score ladder and ranking, bug fixes
- /trivia rank now shows the user's rank for each of the three score
  types
- Add /trivia ladder
- Fix crash in timer mode scoring
- Fix /trivia submit excluding all but the first answer in certain cases
- Fix /trivia accept and reject
- Consistent object notation
2015-04-02 10:10:25 -03: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
The Immortal
476d00a079 Merge pull request #1700 from Morfent/trivia
Trivia plugin: fix crash in timer mode scoring
2015-03-31 16:17:14 +04:00
Morfent
36817bedf9 Trivia plugin: fix crash in timer mode scoring
Theoretically it's possible to get over 5 points from answering if the
answer was sent before the current question's askedAt was reassigned.
2015-03-30 23:04:14 -03: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
Morfent
b5455d1bf5 Trivia plugin: fix crash in /trivia kick 2015-03-30 04:43:01 -03:00
Quinton Lee
8e0a50dc97 Trivia plugin: fix crash in /trivia kick 2015-03-30 01:25:45 -05:00
Morfent
d166d06fb2 Trivia plugin: fix crash in /trivia accept and /trivia reject 2015-03-24 05:44:06 -03:00
Juanma Serrano
b525928731 Fix crash in Trivia plugin
Target is being splitted and saved on var indices, but target itself is still a string.
2015-03-23 17:33:47 +01:00
Guangcong Luo
56a7e723fa Merge pull request #1652 from Morfent/trivia
Trivia plugin: scoring bug fixes
2015-03-20 02:07:01 -05:00
Morfent
cf25f0afa9 Trivia plugin: scoring bug fixes 2015-03-20 03:04:14 -03:00
Guangcong Luo
09ad03089a Merge pull request #1649 from Morfent/trivia
Trivia plugin: fix crash in /trivia join
2015-03-19 19:56:01 -05:00
Morfent
57c106862d Trivia plugin: fix crash in /trivia join 2015-03-19 21:15:58 -03:00
Guangcong Luo
de142a407a Merge pull request #1599 from Morfent/trivia
Trivia plugin: optimize, question statistics...
2015-03-14 15:41:24 -05:00
Morfent
252a56e3a6 Trivia plugin: optimize, question statistics...
- participants are now stored in a map
- part of the score calculations are now handled on answer, rather than
  all of them being done when the answering period ends
- the responders object has been removed in favour of storing more
  information in participants
- /trivia qs with no argument returns question statistics
- some slight optimizations in the question commands
- /trivia help is now less verbose
- the code is now much more legible
2015-03-14 17:24:38 -03:00
The Immortal
21d0390b00 Wi-Fi Plugin: Remove space in winning message 2015-03-11 22:01:48 +04:00
Siiilver
047d0243d3 Added in an exception in the IP checking part of the code.
Added an exception "matchUser.userid !== user.userid", so that the original user isn't recognized as an alt.
http://prntscr.com/6eyje8
2015-03-10 13:01:39 +05:30
codelegend
d37bff05cc wifi plugin: improve performance of alt checking 2015-03-07 16:42:10 +05:30
Rhythms
81256fdd22 Add aliases for wifi
well, ``lotto`` is a command, so it makes sense that ``join`` and ``leave`` have ``joinlotto`` and ``leavelotto`` as aliases in addition to ``joinlottery`` and ``leavelottery``.
2015-03-07 00:06:46 -07:00
Kris Johnson
cc6fb8e8d7 Add aliases
``/trivia ranking`` is pretty much like /ranking on the ladder
`/trivia create`` is just like when using ``/tour create``
2015-03-06 15:55:04 -07:00
Guangcong Luo
cd79765ff8 Merge pull request #1589 from Morfent/thestudio
The Studio plugin: separate response for changing nominations
2015-03-05 20:13:21 -06:00
Morfent
552c123f9c The Studio plugin: separate response for changing nominations 2015-03-05 21:27:17 -04:00
Guangcong Luo
951a7a1602 Merge pull request #1576 from Morfent/thestudio
The Studio plugin: implement prenominations
2015-03-03 14:57:31 -06:00
Siiilver
fae8082cbb Fixed problems with guessing
Users weren't able to guess more than once in a question giveaway because their current name was in their list of previous names.
http://prntscr.com/6c5r4p

Added a line of code to fix that problem. Thanks to Cranham (and maybe a few others too) for pointing this out originally, btw.
2015-03-03 19:02:20 +05:30
Morfent
c083764bc9 The Studio plugin: implement prenominations 2015-03-03 05:16:26 -04:00
Morfent
098c1d7caf The Studio plugin: overhaul nomination commands
The plugin can now manage nominations on its own instead of not doing
much more than broadcasting HTML, and the Artist of the Day survives
hotpatching and server restarts.
2015-03-01 17:54:49 -04:00
Ivo Julca
253c2b951e Update dependencies 2015-02-23 04:14:30 -05:00
Blizzard
f0f98a61b5 Update grammar and merge search commands into one. 2015-02-18 20:13:21 -05:00
Bär Halberkamp
f96501961c Fix some problems in the TCG searcher 2015-02-12 01:50:56 +01:00
Bär Halberkamp
14d478d3b8 Fixed up the TCG search functions 2015-02-11 16:00:28 +01:00
codelegend
efb6d60fcd Revert "Wi-fi Plugin: Finish Exporting states" 2015-01-30 23:24:34 +05:30
Guangcong Luo
5b01b63833 Merge pull request #1476 from DanielCranham/patch-3
Wi-fi Plugin: Finish Exporting states
2015-01-28 19:11:10 -06:00
Guangcong Luo
d68440d896 Merge pull request #1478 from Morfent/trivia
Trivia plugin: actually fix /trivia add permissions
2015-01-28 16:25:39 -06:00
Cranham
2982dc3cb9 Wi-fi Plugin: Finish Exporting states
following morfents commit but updating it for the wi-fi plugin aswell, to avoid issues after hotpatching

Wi-fi Plugin: Finish Exporting states

Wi-fi Plugin: Finish Exporting states

Fix build errors

Wi-fi Plugin: Finish Exporting states

Fix massive style errors I made with indentation
2015-01-28 21:51:41 +00:00
Morfent
ab0a5fdae2 Trivia plugin: actually fix /trivia add permissions 2015-01-28 17:34:46 -04:00
Guangcong Luo
41ce1115cd Merge pull request #1475 from bumbadadabum/master
Implemented a mtg search function as well, together with fixing concerns
2015-01-28 13:37:02 -06:00
Bär Halberkamp
78d0d86f20 Implemented a mtg search function as well, together with fixing some of the concerns in my previous PR 2015-01-28 13:34:44 +01:00
The Immortal
aacc51ac02 Wi-Fi Plugin: Allow unregistered users to join lotteries 2015-01-28 04:39:08 +04:00
Bär Halberkamp
c3f15e8d72 Added a /yugioh command for the TCG room, allowing the user to search for yugioh cards 2015-01-27 14:29:19 +01:00
Siiilver
5b8cb3ce30 Prevent guests from joining lotteries.
Fixed small error. ~_~
2015-01-27 17:27:38 +05:30
Morfent
c4b2c6fad4 Trivia plugin: fix /trivia add permissions 2015-01-26 01:41:50 -04:00
Guangcong Luo
db66e3abb1 Merge pull request #1456 from Morfent/chatplugins
Chat plugins: finish exporting plugin states
2015-01-21 15:45:21 -06:00
Guangcong Luo
d8023041e0 Merge pull request #1457 from codelegend/wifi-patch3
wifi plugin: export plugin data
2015-01-21 15:45:16 -06:00
blazikenmask
b40252065f wifi plugin: export plugin data 2015-01-21 12:02:35 +05:30
Morfent
49f8023f4a Chat plugins: finish exporting plugin states
(Scavengers variables) --> Rooms.get('scavengers').plugin
Jeopardy jeopardies --> Rooms.get('academics').plugin.jeopardies

The The Happy Place plugin now saves the quote of the day in
Rooms.get('thehappyplace').chatRoomData.
2015-01-21 00:00:34 -04:00
Guangcong Luo
15f4cd409b Merge pull request #1451 from Morfent/chatplugins
/hotpatch chat preserves chat plugin exports
2015-01-20 20:51:48 -06:00
Morfent
7c305c01d6 Trivia plugin: preserve state over /hotpatch chat
Export triviaData, writeTriviaData, and trivia to a cache in the Trivia and
Question Workshop room objects, if they exist, and if they have already been
exported (i.e. /hotpatch chat reloaded the plugin), reassign their cached
values so games are no longer broken.
2015-01-20 20:53:36 -04:00
blazikenmask
ae6ccd30a8 wifi plugin: remove unused object, some minor style changes 2015-01-19 17:29:09 +05:30
Guangcong Luo
8022eab491 Merge pull request #1408 from Morfent/trivia
Trivia plugin: instantiate Trivia for each game
2015-01-16 16:00:59 -08:00
Morfent
179debc922 Trivia plugin: instantiate Trivia for each game
...over using an unreliable singleton to handle them.

Export triviaData to CommandParser imstead of the trivia room when the
first Trivia instance is created.
2015-01-16 12:15:11 -04:00
Cranham
fc26ef8df1 Wifi Plugin: Make questions less restrictive
Increase the answer field limit for answers; does not break the answer mechanics when I tested, also increasing the number of winners in lottos from 5 to 10. After a few days of having the script in the chat I feel these changes would be more suitable for it.

Wifi Plugin: Bug fixes aswell

fixing a issue of /giveaway end returning the 'access denied message' but still ending the giveaway

Wifi Plugin: Bug fixes aswell

Fixed /giveaway end from returning access denied message when it actually goes ahead with force ending
2015-01-16 05:40:29 +00:00
Cranham
fb8ecc7865 Wi-Fi Plugin: allow global staff to use script
Allows global staff have the ability to use the script in the room; if they wish to do so, any % or higher should have the ability to start a giveaway. Furthermore updating help commands to make them more convenient to type and use.

Wifi Plugin: Global staff giveaways + help

Wifi Plugin: Global staff giveaways + help
2015-01-13 07:05:25 +00:00
Cranham
ae49c9d0f7 Wifi Plugin: Fixing a command
Codelegend's previous commit broke one of the commands when tested, making the /ga command unreconized when trying to answer a question, This commit fixes that

Wifi Plugin: Fixing a command
2015-01-12 14:18:01 +00:00
blazikenmask
47f38b34e9 WiFi plugin: fix grammatical errors, slighly modify giveaway object 2015-01-11 18:53:50 +05:30
Guangcong Luo
daa073d687 Merge pull request #1383 from codelegend/wifi
Add wi-fi chat plugin: giveaways
2015-01-09 20:57:53 -08:00
Morfent
94458778da Trivia plugin: use command namespacing, fix typos
...which would've ruined participants' leaderboard rankings, stop
binding the Trivia object's context to timeouts now that they're no
longer needed, make question database commands exclusive to Question
Workshop
2015-01-07 03:26:38 -04:00
Morfent
eda1783a9c Trivia plugin: export triviaData 2015-01-05 17:02:43 -04:00
Morfent
2e6022220b Trivia plugin: fix endless games...
Fix number and timer modes' question timeouts looping until no questions
are left, refactor Trivia object to only make methods the commands use
public, optimize /triviaaccept and /triviareject
2015-01-04 20:21:01 -04:00
blazikenmask
3f898e67b4 add wifi plugin: giveaways 2015-01-03 14:27:35 +05:30
Guangcong Luo
cfd02b9380 Fix crash in Scavengers 2014-12-22 14:49:27 -05:00
Guangcong Luo
660682b665 Merge pull request #1299 from kotarou3/jeopardy
Jeopardy
2014-12-15 15:57:52 -06:00
Morfent
4986a81832 Trivia plugin: refactor game commands, bug fixes
Stop the Q/A loop from clearing timeouts constantly so games can be
ended in case it still loops endlessly, refactor game commands and
config vars, minor bug fixes in /triviasubmit and /triviastatus
2014-12-14 23:26:02 -04:00
小太
c5a36c52d9 Add Jeopardy chat plugin 2014-12-15 01:54:30 +11:00
Morfent
2ea45413b9 Trivia plugin: fix crash in timer mode (again)
This whole time I thought negative values were falsey. At least I caught it before it could crash anything again.
Also fix /triviarank picking up the wrong alt's rank
2014-12-13 22:44:20 -04:00
Morfent
e4516d17c0 Trivia plugin: move curA, responders, and phase to Trivia properties 2014-12-12 23:00:24 -04:00
Morfent
de576e9b12 Trivia plugin: fix crash in Trivia.timeAnswers() 2014-12-08 02:36:33 -04:00
Morfent
e7ec00f5e2 Trivia plugin: modify timer mode, refactor /ta
Timer mode now gives points to all who answer within the time limit
instead of the first, and /ta works more straightforwardly. sleep should
no longer cause the Q/A loop to ignore any commands until it runs out of
questions.
2014-12-06 00:20:23 -04:00
Morfent
53433b2e20 Trivia plugin: correct scores with the wrong type
Fix scores broken from commit 6d7a3cf333,
remove unused curQ variable, remove unused parameters in the
commands, and lower the rank required to edit questions to %.
2014-11-25 03:35:47 -04:00
Morfent
698fd694fc Trivia plugin: fix crash in number mode
Also fix styling of the tables in /triviaqs and /triviareview
2014-11-22 17:22:43 -04:00
Morfent
6d7a3cf333 Trivia plugin: revert refactor, keep working updates 2014-11-17 11:19:33 -04:00
Morfent
46ffa07212 Trivia plugin: refactor Trivia object and values
Fix bug in the question/answer loop that would assign undefined to
either curQ, curA, or phase, preventing anyone from answering any
questions until this.curQs was empty, by changing all of the game
variables from global variables to Trivia properties. Created a
constructor for Trivia so its methods could be kept in its prototype
object to reduce property lookup times and later to allow me to refactor
parts of the commands that deal with these properties as prototype
methods.

Fix room.addRaw not updating chat.
2014-11-13 10:15:54 -04:00
Morfent
d9f26b4c07 Voices can start/end trivia games 2014-10-27 19:09:59 -03:00
Morfent
1b6127c7d9 Fix /triviaend and /triviakick 2014-10-21 20:53:53 -03:00
Morfent
3b0a651978 Fix crash in /triviaplayers 2014-10-17 15:19:12 -03:00
Morfent
2a438048ce Add chat plugin config directory 2014-10-12 23:27:38 -03:00
Morfent
56fc5ca0e6 Update trivia plugin 2014-10-12 18:18:57 -03:00
Morfent
eea20673ff Fix possible crash in /triviaanswer 2014-10-09 17:37:01 -03:00
Morfent
cd6ce3d0a4 Trivia plugin 2014-10-09 08:54:13 -03: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
macrarazy
e2caf6d57b Have error messages for scavenger commands. 2014-08-10 11:55:57 +05:00
小太
a2bfb57bfe Move chat plugins to their own directory 2014-08-04 18:33:52 +10:00