PrivateParlorXT::DownvoteHandler
Inherits PrivateParlorXT::HearsHandler < PrivateParlorXT::Handler < Reference < Object
A command-like HearsHandler used for downvote messages sent by other users.
Instance methods
Checks if the user is authorized to downvote a message
Returns true if so, false otherwise
Downvotes the message that the given message replies to if it meets requirements
Adds user's dowvote to message history and update reply_user's karma Returns false if user has already downvoted the message or user attempted to remove his own karma
Checks if the user has lost a karma level when karma levels are set, and if so, queues a 'leveled down' response
Records message statistics about downvotes if the Statistics module is enabled
Queues 'gave downvote' and 'got downvoted' replies for the user and reply_user, respectively
Includes a reason for the downvote if karma reasons are enabled.
Checks if the user is spamming downvotes
Returns true if the user is spamming downvotes, false otherwise
Returns the User associated with the message if the User could be found in the Database.
This will also update the User's username and realname if they have changed since the last message.
Returns nil if:
- Message has no sender
Userdoes not exist in theDatabaseUsercannot use a command due to being blacklisted