Yizhe Shen
fe100c52eb
Added a timeout list for extra hint command. (Issue #315 )
2015-01-31 01:54:04 -05:00
Tanner
8a90d9c406
Remove old command for remaining KAOS
2015-01-25 20:55:51 -06:00
Yizhe Shen
1297a9def0
Finished SQL statement clean up. (Issue #93 )
...
- Some small tweaks in SQL statement format
- Cleaned up SQL statements in Storage.getUserStat() and
Storage.getUserRank()
2015-01-24 23:00:00 -05:00
Yizhe Shen
823f6f7e14
More SQL clean-up. (Issue #93 )
...
- Cleaned up SQL delete update statements
- Some other small SQL tweaks
- Fixed errors in SQL statements for trivialevel table
2015-01-24 21:38:53 -05:00
Yizhe Shen
c0dd03eb9c
More SQL cleanup. (Issue #93 )
...
- Cleaned up SQL delete statements
2015-01-24 20:46:28 -05:00
Yizhe Shen
4e5d21e7a6
More SQL cleanup. (Issue #93 )
...
- Cleaned up SQL create statements
- Moved Storage.getVersion() to a more logical (alphabetical) location
2015-01-24 20:33:18 -05:00
Yizhe Shen
08c3a09ba2
Fixed typo, cleaned up insert statements. (Issue #93 )
...
- Cleaned up SQL insert statements
2015-01-24 20:12:55 -05:00
Tanner
956a64ed47
More psuedo code for levels (Issue #91 )
2015-01-19 17:20:05 -06:00
Yizhe Shen
05a58810a2
Fixed syntax error.
2015-01-18 01:46:39 -05:00
Yizhe Shen
5d5344b57b
Updates for trivialevel table in DB. (Issue #91 )
...
- Updated table definition for trivialevel
- Added methods for DB interaction with trivialevel table
2015-01-18 01:34:20 -05:00
Tanner
4555224034
Make levels a dict, pseudo code
2015-01-17 23:56:54 -06:00
Tanner
5c73598560
Fixes bolding for kaos
2015-01-17 23:17:15 -06:00
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
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
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