| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/27
|
|/
|
|
|
|
|
|
|
|
| |
rand.Int() would panic when the max value is <= 0, which happens when
big.NewInt() was fed with a too large number. Avoid this by validating
the big.NewInt() return beforehand. Add error handling to all callers to
both gracefully return to IRC and to log an error message.
Rename the shadowed "max" variable whilst at it to avoid confusion.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/26
|
|/
|
|
|
|
|
| |
Allow the database file to reside in a user defined location instead of
requiring it to be in the working directory.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| |
| |
| | |
jeopardylower into master
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/25
|
|/
|
|
|
|
|
| |
Align with GetTarget() which is used in games to have consistent
handling of nicknames regardless of their casing.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| |
| |
| | |
into master
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/24
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Print only a single message instead of one per winner to reduce chat
clutter.
Skip cashout to users who won less than the possible cashout value as
limited by the division value to avoid congratulating someone who only
gets 0.
Abort should a regression cause the logic to process an empty set of
finishers to prevent unexpected behavior.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| |
| |
| | |
into master
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/23
|
|/
|
|
|
|
|
|
|
|
|
| |
Some parts of the logic do not make use of the host column in the
players table, allow the field to be empty and do not query for an empty
value (which might return bogus entries) if no value is passed to the
lookup function.
This additionally avoids the need for the hardcoded initial host when
configuring the bot player.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/19
|
|/
|
|
|
|
|
|
| |
To allow for correct parsing of messages containing formatting codes and
to avoid exploitation of unparseable messages, strip all formatting
codes from a message when entering the parsing chain.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/18
|
| |
| |
| |
| |
| |
| | |
Elaborate as the convoluted logic can be difficult to understand.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
| |
| |
| |
| |
| |
| |
| | |
Move to a separate file for better code structure and to avoid huge
branching inside Msg().
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds integration between Watbot and the Limnoria Jeopardy plugin.
If a game of Jeopardy ends, Watbot will parse the finishers message and
pay a small share of the Jeopardy price money in the form of Watcoins.
To avoid abuse, only Jeopardy finishing messages from authorized bots
are considered. An IRC user is considered an authorized bot if the
hostmask matches one of the configured bot hostmasks, and if the
nickname is configured for "jeopardy" in the newly introduced bot games
configuration.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Add sample message to Jeopardy logic
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| |
| |
| | |
joining' (#14) from config into master
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/14
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid the need for an administrator to join the bot to channels by
implementing a configuration option allowing the passing of channels
the bot should always join to by itself upon startup.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
| |
| |
| |
| |
| |
| |
| | |
The Allowed() function already implements this loop, use it to reduce
redundant code.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|/
|
|
|
|
|
|
| |
Abstract settings which commonly differ between instances to a YAML
based configuration file to allow for easy administration without the
need for modifying the source code.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/16
|
|/
|
|
|
|
| |
Unable to find a purpose.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/15
|
|/
|
|
|
|
| |
Build artifacts shouldn't be tracked in version control.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/12
|
|/
|
|
|
|
|
| |
For some administrative operations, such as joining channels, it would
be useful if I could "imp"ersonate the bot.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
|\
| |
| |
| | |
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/4
|
|/
|
|
| |
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
restarts), removed aliases from command list, ping, strongest, don't allow vlk to roll.
|
|
|
|
| |
quickly abused), made anarchy less likely to win and time limited
|
| |
|
|
|
|
|
|
|
|
| |
reactivated bench with a 2400 limit
help command just outputs command structs because that's easier
lower all commands to account for caps mistakes
some hardcoded nick bits :\
removed disused db structs
|
|
|
|
|
| |
added toplost
removed an ignore
|
|
|
|
|
|
|
|
|
| |
added a link to source, healing
parse ints through one function and return helpful errors that can be used as return values
added more error checking
improved some output
made some more joke methods
lazily added more if conditions for people i'm sick of
|
| |
|
|
|
|
|
| |
fixed imp with imps but should go back to privmsg detection
give the bot money when people lose lel
|
|
|
|
|
|
|
| |
added self reference, allowing the bot to accrue currency
messed about with some messages (removed swears, changed 'schlorped', etc)
improved send output
regular wattery to make 'wat' interesting
|
| |
|
|
|
|
| |
method map to avoid sending spurious messages
|
|
|
|
| |
remove db
|
| |
|
| |
|
|
|
|
|
|
| |
Added original source
Fixed readme typo (I fat fingered your username again whoops)
Fiddling with golang config
|
|
|