Commit Graph

254 Commits

Author SHA1 Message Date
Yizhe Shen b7c411db56 Updated editing commands for issue #300.
- Updated all methods which use Storage.getEditById()
- Synchronized 'edit not found' messages
2014-07-25 18:31:09 -04:00
Yizhe Shen 8f92854df6 Updated Storage.getByID() methods with channel parameter.
- Channel parameter is optional
- For use in issue #300
2014-07-25 18:00:54 -04:00
Yizhe Shen 92cbbae770 Updated 'show' commands when no number is given.
- Simplified the 'show' commands to call their corresponding 'list'
  commands when no number is given so their behaviours are synchronized
2014-07-25 01:39:15 -04:00
Yizhe Shen eaca558380 Updated 'list' commands. (issue #300, #308)
- Updated Storage.getTop3() methods to take in channel parameter to pass
  into queries
- Updated 'list' commands to only show reports for the specified channel
  when not in 'globalstats' mode
- Moved Storage.getEditTop3() to a more logical location
2014-07-25 01:38:23 -04:00
Yizhe Shen e828c3732c Updated Storage.count() methods.
- Storage.count() methods now take an optional channel parameter to allow
  greater control of the query to the db
2014-07-24 22:31:41 -04:00
Yizhe Shen 7611b6905e Changed 'value' to 'key' for TimeoutList methods. 2014-07-24 21:24:13 -04:00
Yizhe Shen 681e8f6b34 Allow capability checks to be case-insensitve for channels. 2014-07-24 21:20:58 -04:00
Tanner f00f017b11 Preparations for the next update 2014-06-28 20:27:22 -05:00
Tanner 4a661f8bf9 Reduce streak bonus per #296
Reduces the streak bonus to half the question's point value, see #296
2014-06-25 13:27:58 -05:00
Tanner a641cadbd3 Improvements to readme; minor def changes
* Readme now includes information on which files to update from specific
versions to the current version.
2014-06-25 13:10:42 -05:00
Yizhe Shen b491baae1e Fixed MVP voicing to voice by nick instead of username.
- Switched the actual voicing of players to use the player's nick
- Some small formatting changes
2014-06-25 11:51:39 -04:00
Yizhe Shen 0f1f5dc7c9 Modified MVP voicing behaviour.
- MVP message will now only be shown if voice is given (ie. when there's
  no voiceTimeout for the user)
2014-06-23 21:52:49 -04:00
Yizhe Shen 170052c1b8 Fixed small error in TriviaTime.handleVoice().
- Forgot to replace an instance of 'user' with 'stat'
2014-06-23 21:43:21 -04:00
Yizhe Shen b00876be53 Small fix for TriviaTime.givepoints().
- Reverted functionality back to original state after breaking with the
  introduction of TriviaTime.getUsername()
- Still does not properly convert nick into username
2014-06-22 14:08:38 -04:00
Yizhe Shen 2b4f1f2caf Added back a check in Game.checkAnswer().
- Added back a check to see if Storage.getUserStat() actually returns a
  non-empty dict, just in case
2014-06-22 04:10:49 -04:00
Yizhe Shen 2cf3fef51d Updated Storage.getUser() and Storage.getUserRanks().
- Both methods now return dicts
- getUser() no longer appends the results of getUserRanks()
- Updated calls with new usage
- Added some comments for readability
- Renamed Storage.getUser() to Storage.getUserStat()
- Renamed Storage.getUserRanks() to Storage.getUserRank()
2014-06-21 19:46:14 -04:00
Yizhe Shen 76cdf1ba5c Add TriviaTime.getUsername().
- New method returns a user's registered username if it's a registered
  user or returns their nick if not
2014-06-21 16:26:33 -04:00
Yizhe Shen fb9feb8b44 Fixed MVP voicing.
- MVP voicing now works for week, month and year
2014-06-21 13:00:14 -04:00
Tanner 232d151f97 Preparations for future updates 2014-06-20 16:43:10 -05:00
Yizhe Shen ea2c936f2a Added check for inactive games.
- Fixes inactive game starts caused by an empty question database
2014-06-20 11:43:12 -04:00
Yizhe Shen c6ac55df9e Fix for TriviaTime.getTriviaCapability().
- Added list typecast which makes the 'in' keyword work as desired
2014-06-19 06:12:12 -04:00
Tanner cc1907e579 General minor improvements to text 2014-06-18 16:24:10 -05:00
Yizhe Shen ff9a735624 Minor fix in TriviaTime.next(). 2014-06-18 00:04:04 -04:00
Tanner eb4c2500e8 Convert tab to 4 spaces 2014-06-17 22:38:50 -05:00
Tanner e2e8592c0d Convert tab to 4 spaces 2014-06-17 22:34:06 -05:00
Tanner b9aa665364 Bug fix
Third time's the charm
2014-06-17 22:03:58 -05:00
Tanner 593148f4d3 Bug fix
for real this time ;)
2014-06-17 21:52:36 -05:00
Tanner 15014d4481 Bug fix 2014-06-17 21:47:40 -05:00
Tanner d49d24503c Improvements to skip; improved definitions; updated README
In plugin.py:
* Updated version
* created getTimeLeft
* Changed next() message
* Changed regex message when reporting
* Changed restore question messages
* Included timeSeconds when inactive users try to skip
* Included skipSeconds when a user tries to skip again
In config.py:
* Updated skipActiveTime definition to include seconds
* Improved skipTime, quizfile, showstats, skipTime, hintTime, hintKAOS,
waitTime, enableVoice, timeoutVoice, nextMinStreak, skipThreshold,
definition
In README.md:
* Added that restarting isn't required
* Added update instructions for v1.04
* Fixed typo
2014-06-17 21:41:15 -05:00
Yizhe Shen 4bae5dcc8c Created a TriviaTime.reply() method for fast replies.
- Added a method comparable to irc.reply() for TriviaTime purposes
- Replaced irc.reply() with self.reply() in instances where message
  queuing disrupts their order (ie. where irc.sendMsg() would be used)
- Minor changes to TriviaTime.repeat()
2014-06-15 18:01:33 -04:00
Yizhe Shen cec3f8af68 Modified TriviaTime.info() to work in PM. (issue #299)
- Also removed setting of -triviamod and -triviaadmin capabilities when
  TriviaTime.start() is called
2014-06-15 12:03:06 -04:00
Yizhe Shen 054bbb1663 Fix for issues #295, #300.
- Modified queries for Storage.removeUserLogs() and
  Storage.transferUserLogs() to use a channel parameter
- Transferring and clearing points are now channel-isolated
2014-06-15 11:28:07 -04:00
Yizhe Shen ad5a60a25a Partial fix for issue #295.
- Removed overriding of channel parameter in TriviaTime.givepoints() and
  TriviaTime.transferpoints()
2014-06-15 03:34:49 -04:00
Yizhe Shen 28cbb561b6 Allow stats commands to be used in PM. (issue #299)
- Added an optional 'channel' parameter to all stats commands to allow
  usage in PM
- Affects TriviaTime.day(), TriviaTime.week(), TriviaTime.month(),
  TriviaTime.year(), TriviaTime.me(), TriviaTime.stats()
- Minor editing of message output for those commands
- Edited some command documentation
2014-06-15 03:08:20 -04:00
Yizhe Shen 38950a2762 Minor change in TriviaTime.add().
- Changed it back to the old way of user checking since it wasn't an issue
  (same case as TriviaTime.addfile() with owner)
2014-06-14 16:25:17 -04:00
Yizhe Shen d520414339 Updated TriviaMod-only commands. (issue #300)
- Updated TriviaMod-only commands with the new capability checking methods
2014-06-14 16:08:12 -04:00
Yizhe Shen 8fe0faac8c Updated TriviaAdmin-only commands. (issue #300)
- Updated TriviaTime.clearpoints(), TriviaTime.givepoints() and
  TriviaTime.transferpoints() with new capability checking methods
2014-06-14 15:46:16 -04:00
Yizhe Shen 58cdb8117f Added custom capability checks. (issue #300)
- Added TriviaTime.isTriviaMod(), TriviaTime.isTriviaAdmin() and
  TriviaTime.getTriviaCapability() to allow better control over TriviaTime
  commands
- Updated TriviaTime.acceptdelete(), TriviaTime.acceptedit(),
  TriviaTime.acceptnew(), TriviaTime.add() and TriviaTime.authweb() to use
  the new capability checking methods
2014-06-14 15:32:37 -04:00
Yizhe Shen 3e31309985 Small change in TriviaTime.authweb().
- Set capability based on decreasing importance
2014-06-14 14:10:59 -04:00
Yizhe Shen 5462d30d83 Fixed TriviaTime.authweb().
- Replaced 'checkChannelCapability' with 'channel' from wrapper due to the
  existing (better) check within the method
2014-06-14 12:03:33 -04:00
Yizhe Shen 26a152c8b5 Fix for 'clear/give/transferpoints' commands.
- Added channel parameter, required for the switch to 'triviaadmin'
  channel capability
- Not a fix for issue #300
2014-06-14 06:42:01 -04:00
Yizhe Shen 98759fc8de Updated sanity checking for TriviaTime.start(). 2014-06-14 05:47:05 -04:00
Yizhe Shen 5ee70f33aa Minor changes.
- Some minor refactoring
- Moved 'start' command's start message into the constructor of Game to
  ensure that messages are sent out in the right order
- Channel capability checks are now only performed if the 'start' command
  actually starts a new game
2014-06-14 04:26:01 -04:00
Yizhe Shen 01825105d8 Modified some comments, refactored TriviaTime.stop(). 2014-06-14 02:35:38 -04:00
Yizhe Shen ad3fff361c Replaced bot messaging with irc.reply() for some methods.
- Replaced instances of irc.sendMessage() and irc.error() with irc.reply()
  in TriviaTime.stop(), TriviaTime.start(), TriviaTime.skip(),
  TriviaTime.repeat(), TriviaTime.next() and TriviaTime.time()
- Used the parameter 'prefixNick=False' in cases where the reply shouldn't
  include the caller's nick as a prefix
2014-06-13 09:40:11 -04:00
Yizhe Shen 5f79ef4688 Added Game.sendQuestion() method to clean up code.
- Eliminates code repetition in Game.nextQuestion() and
  Game.repeatQuestion()
2014-06-13 08:27:48 -04:00
Yizhe Shen ed378a7629 Updated 'time' and 'repeat' commands. (issue #299)
- 'time' command now responds in PM as well
- 'repeat' command is now in-channel only
- Moved sanity checking from Game.repeatQuestion() to TriviaTime.repeat()
  and added an extra check to see if the game is currently running in the
  channel
2014-06-13 08:01:47 -04:00
Yizhe Shen bd12e46731 Updated 'stop' command. (issue #299)
- 'stop' command only responds in-channel now
- Partial refactoring of stop()
2014-06-13 03:33:01 -04:00
Yizhe Shen c42aeebc99 More code refactoring.
- Updated 'next' command to use 'onlyInChannel' wrapper parameter
- Partial refactoring of next() and skip()
2014-06-13 02:02:41 -04:00
Yizhe Shen 0a1ed5cb37 Partial fix for issue #288.
- For registered users, the 'skip' command now stores the registered name
  of the user instead of the user's current nick
- Unregistered users still won't have tracking for 'skip' across different
  nicks
- Made skip() an 'onlyInChannel' command
- Partial refactoring of skip() method
- Small fix for kaosRemainingCommand
2014-06-13 01:16:25 -04:00