Commit Graph

619 Commits

Author SHA1 Message Date
Tanner 290c895379 Added streak length info, bolding 2015-01-17 23:12:02 -06:00
Tanner 405152c4bd syntax fixes 2015-01-17 22:45:27 -06:00
Tanner f7ad2b67d1 Bug fix; db for levels; spacing 2015-01-17 22:39:11 -06:00
Tanner 4e5c2f2728 Preparation for levels; spacing 2015-01-17 22:25:19 -06:00
Tanner 81f1aad860 Removes spaces before and after sendMessage() 2015-01-16 23:46:10 -06:00
Tanner 4c92bd143d Update readme, minor edits to breakstreak 2015-01-16 23:28:57 -06:00
Tanner c737e50698 streakbreak works now :)
#262
2015-01-16 23:21:32 -06:00
Tanner b4d8b4edf0 Bug fix #1 streakbreak
#262
2015-01-16 23:15:37 -06:00
Tanner 8759fb6782 Fixes to streakbreaker
Hopefully this works...
2015-01-16 20:36:56 -06:00
Tanner 7be1126e64 Fix spacing issue 2015-01-16 20:31:25 -06:00
Tanner 3b6b407971 Add streak-breaker bonus
Adds the streak-breaker bonus feature from issue #262 and the config
option. Awards an additional 5% of the question's point value and states
message to channel; configuration added. Not yet tested.
2015-01-16 20:22:37 -06:00
Tanner a1de8858f0 Pseudo code for levels
TODO: db, checking and changing level, testing
2014-12-13 23:51:39 -06:00
Yizhe Shen bbded392cd Fixed incrementation of correct answer counter.
- Correct answers of a question increments the counter by 1 instead of
  (4-self.hintsCounter)
2014-10-21 00:28:23 -04:00
Tanner 23bd879631 Updates for v1.07 2014-08-25 19:50:00 -05:00
Yizhe Shen 28243c9945 Modified output of top players.
- Changed output of 'day', 'week', 'month', and 'year' commands to be
  closer to old output (v1.06 and older) when empty list is returned from
  query
2014-08-25 08:49:06 -04:00
Yizhe Shen 290a908d59 Added try statement for re.sub() for 'report' command. 2014-08-24 14:51:50 -04:00
Yizhe Shen 3a5d1b75fc Fixed typo.
- Introduced in d6dce89
2014-08-24 13:35:01 -04:00
Yizhe Shen 97e31c56e4 Removed forced addition of trailing whitespace for '^' pattern. 2014-08-23 10:15:25 -04:00
Yizhe Shen b6803834f4 Updated messages for editing errors.
- Added error message for 'edit' command when the edit is the same as the
  old question
- Updated regex error message when expression results in no change
2014-08-23 10:08:26 -04:00
Yizhe Shen 2f41a2f437 Minor fix for 'showreport' command.
- Bug introduced in b5501e5.
2014-08-23 09:43:59 -04:00
Yizhe Shen f31a45a9de Improved handling of regex. (issue #309)
- Added proper handling of regex substitution expressions in the
  'report' command
- Substitions that don't change the original question are now ignored and
  an error reply message is given
- Forced addition of trailing space when using '^' pattern since
  leading/trailing whitespace is stripped by the bot
2014-08-23 09:38:21 -04:00
Tanner 73d2ecbae4 Minor adjustments to output text 2014-08-19 19:00:31 -05:00
Yizhe Shen 9ecc3d3e4c Fixed minor syntax errors from previous commits. 2014-08-18 19:40:24 -04:00
Yizhe Shen 20a0752178 Cleaned up SQL statements for retrieving top stats. (issue #93)
- Also added new messages if queries return empty lists
2014-08-18 18:10:30 -04:00
Yizhe Shen cce93e0263 More updates to Storage methods.
- Changed query methods that return a list of rows to use
  Cursor.fetchall()
- Updated more row references from indices to keys
2014-08-18 17:32:41 -04:00
Yizhe Shen d6dce89dcc Cleaned up some SQL statements (issue #93) and refactoring.
- Cleaned up methods in Storage which return boolean or integer
- Small change in 'edit' command
2014-08-18 09:45:47 -04:00
Yizhe Shen 1890815ffb More improvements.
- Updated Storage.getQuestionByRound() to return a sqlite3.Row object
- Updated methods that use Storage.getQuestionByRound() to reference
  results using keys instead of indices (for better readability)
- Fixed 'delete' command to record the user by username instead of nick
- Added error message when regex reports has fewer than 2 arguments
- Refactored 'delete' and 'report' commands to remove excess return
  statements
2014-08-18 08:52:15 -04:00
Yizhe Shen 2d4961b195 Modified Storage.getQuestion().
- Moved the method to a more logical location
- Renamed it to Storage.getQuestionById()
2014-08-18 08:20:03 -04:00
Yizhe Shen 01bea9e5cc Fix to disallow TriviaMods from accepting their own changes.
- Affects 'acceptnew', 'acceptdelete', and 'acceptedit' commands
2014-08-18 08:15:10 -04:00
Yizhe Shen ebafcd2d2b Updated SQL queries to return sqlite3.Row objects.
- Improves overall code readability by replacing indices with keys
- Updated Storage constructor to set DB connection row_factory to
  sqlite3.Row
- Updated Storage.getByID(), Storage.getTop3() and Storage.getQuestion()
  methods to return sqlite3.Row objects
- Affects 'list', 'show', 'accept' and 'rm' commands
- Replaced some if statements with ternary expressions where apprpriate
2014-08-18 02:36:08 -04:00
Yizhe Shen b5501e524e Fix for hint command.
- Fix to prevent replies to the hint command after a KAOS question is over
2014-08-07 23:40:14 -04:00
Tanner 6bd733a9d6 Added 1K questions
While #trivialand uses our own list of questions, we are providing 1,000
questions for free to new users of TriviaTime
2014-08-01 17:31:52 -05:00
Tanner e5390b9acc Touchups to readme 2014-07-27 22:44:11 -05:00
Tanner b57ef07bb0 Improvements to readme 2014-07-27 22:39:15 -05:00
Yizhe Shen 07dea60287 Further improvement on previous commit. 2014-07-25 22:45:32 -04:00
Yizhe Shen 6d2b49fcbb Fixed handling of 'page' parameter for 'list' commands.
- The 'page' parameter will default to the total number of pages,
  if it's greater than the total
2014-07-25 22:07:15 -04:00
Yizhe Shen 992d4ea62d Updated some output text.
- Removed leading spaces in 'add' command  messages
- Updated 'list' command messages when no data is found
2014-07-25 21:14:51 -04:00
Yizhe Shen b892751a3a Updated other commands that use a Storage.getByID() method. (issue #300)
- Also synchonized 'not found' messages
2014-07-25 20:55:26 -04:00
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
Yizhe Shen c7913aae92 Fixed typo in README.md.
- Change 'involded' to 'involved'
2014-07-20 19:22:11 -04:00
Tanner f00f017b11 Preparations for the next update 2014-06-28 20:27:22 -05:00
Tanner ff58dba94d Added detail on editing tools to readme 2014-06-25 18:27:39 -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