Skip to content

Zmegolaz/frogesport

Repository files navigation

###########################################################################
### Frogesport                                                          ###
###########################################################################
###
#
#    Copyright 2011-2014 Zmegolaz <zmegolaz@kaizoku.se>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

REQUIREMENTS
Eggdrop version 1.8 or later, this is where the procedure putnow is introduced, and it's used to send messages past the flood fitlered queues.
A MySQL database.
TCL package mysqltcl.

COMMANDS
Command - Description - Requirements
!answer - Get the answer for the last question - OP
!clear - Clear all pending actions, should never have to be used - Admin
!clearqueue - Clear the queue of questions to ask next - Depends on configuration
!compare - Compare any number of users to eachother, ordered by season points - Anyone
!comparetot - Compare any number of users to eachother, ordered by total points - Anyone
!continue - If the bot has been paused, start it again - Admin
!hof - Hall of fame, the 10 users with the highest total points - Anyone
!hofclan - Hall of fame, the 10 clans with the highest total points - Anyone
!pause - Pause the bot, without clearing the questions IDs - Admin
!punish - Take points from a user - Admin
!queue [number] <string/id> - Add one or more question matching the search string to the queue of questions to ask next - Depends on configuration
!reward - Give points to a user - Admin
!spell <spell> [nick|id] - Cast a spell - Anyone of level 5 or higher
!startmess <interval> <message> - Start sending a message every <interval> minutes - Admin
!startquiz - Start the bot - Admin
!stats [nick] - Check the stats for someone, if [nick] is omitted, you will get your own stats - Anyone
!stopmess - Stop sending a message every x minutes - Admin
!stopquiz - Stop the bot - Admin
!recommend - Get help about how to recommend questions - Anyone
!report <id> <comment> - Report a question - Anyone
!time - Shows time left until the user can switch channel - Anyone
!top10 - Top 10 users of this season - Anyone
!top10clan - Top 10 clans of this season - Anyone
!version - Show the bot version - Anyone

[PM]checkq <id> [perm] - Check any question and it's answers - Admin
[PM]checku <nick> - Check a user, an alias to !stats - Admin
[PM]clearqueue - Clear the queue of questions to ask next - Depends on configuration
[PM]addq <category>|<question>|<answer>\[|answer\]... - Add a question - Admin
[PM]delq <id> [perm] - Delete a question - Admin
[PM]modq <id> [perm] <category|question|answer> <value> - Modify a part of a question - Admin
[PM]modu <nick|season|total|time|inarow|mana|class|last|customclass|transfer|help> <nick|subcommand> [new value] - Modify any part of a user - Admin
[PM]newseason [help] - Start a new season - Admin
[PM]updateclasses - Correct all users' classes - Admin
[PM]queue [number] <string/id> - Add one or more question matching the search string to the queue of questions to ask next - Depends on configuration
[PM]recommend <category>|<question>|<answer>[|<answer>] - Recommend a question - Anyone
[PM]clan create <clan name>|join <clan name>|leave|role <nick> <member|admin> <yes|no>|change name <new name>|members

TODO, no internal order:
Make sure all all MySQL indexes are as they should be.
Newseason should save the old table as users_unixtime.
Newseason should remove inactive users with low (configurable) total points.
Newseason should reset the mana too.
Send some kind of message if someone tries to compare a user to the same user.
Move all text to a separate file for easier translations.
Translate everything to English.
Documentation.
Logg all user/question modifications.
Happy hour.
Config sanity check.
Separate the help, stats and similar from the question asking.
Best time per question.
Number of times a question is asked, and number of times it was answered correctly.
Different points for different questions.