<feed xmlns='http://www.w3.org/2005/Atom'>
<title>watbot.git/wat, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/'/>
<entry>
<title>Prevent dice overflow</title>
<updated>2024-10-10T16:43:46+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-10T00:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=930839ab58a60a5e3026de6f8a659fdcd8c25173'/>
<id>930839ab58a60a5e3026de6f8a659fdcd8c25173</id>
<content type='text'>
rand.Int() would panic when the max value is &lt;= 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 &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rand.Int() would panic when the max value is &lt;= 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 &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Configurable database path</title>
<updated>2024-10-09T22:04:16+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-09T22:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=dfe7deff72ec77f798efe243c1c22bb63c523040'/>
<id>dfe7deff72ec77f798efe243c1c22bb63c523040</id>
<content type='text'>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Lower nickname in Jeopardy cashout</title>
<updated>2024-10-09T21:36:45+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-09T21:36:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=5ce4d4bfe461fff3581b6a955ccf9126b541f4dd'/>
<id>5ce4d4bfe461fff3581b6a955ccf9126b541f4dd</id>
<content type='text'>
Align with GetTarget() which is used in games to have consistent
handling of nicknames regardless of their casing.

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Align with GetTarget() which is used in games to have consistent
handling of nicknames regardless of their casing.

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve Jeopardy cashout message</title>
<updated>2024-10-03T17:43:39+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-03T13:25:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=7ec49a9769d10dd66e1c30f579aba715ea8e7447'/>
<id>7ec49a9769d10dd66e1c30f579aba715ea8e7447</id>
<content type='text'>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Change host lookup to be optional</title>
<updated>2024-10-02T20:30:06+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-02T20:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=accf16c92aa8420dd12d414ab05c60358cbc23ba'/>
<id>accf16c92aa8420dd12d414ab05c60358cbc23ba</id>
<content type='text'>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Strip formatting codes</title>
<updated>2024-10-02T19:40:30+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-02T19:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=d99a0d84bf3f473a5b78cf8b16b72c7ca927fdb0'/>
<id>d99a0d84bf3f473a5b78cf8b16b72c7ca927fdb0</id>
<content type='text'>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Explain Jeopardy finishers parsing</title>
<updated>2024-10-02T18:03:56+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-10-01T18:55:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=89ed59a9c71e4b21e462a5c7746a8decc41dc487'/>
<id>89ed59a9c71e4b21e462a5c7746a8decc41dc487</id>
<content type='text'>
Elaborate as the convoluted logic can be difficult to understand.

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Elaborate as the convoluted logic can be difficult to understand.

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor integrations</title>
<updated>2024-10-02T18:03:56+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-09-29T12:35:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=d06e724f067deb55b8009b62be8e300fe79d1961'/>
<id>d06e724f067deb55b8009b62be8e300fe79d1961</id>
<content type='text'>
Move to a separate file for better code structure and to avoid huge
branching inside Msg().

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move to a separate file for better code structure and to avoid huge
branching inside Msg().

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement Jeopardy cashout</title>
<updated>2024-09-29T12:36:23+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-09-22T15:42:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=97e9d7d0c2312385bfd8dcbb85a1bc4bd7d263cc'/>
<id>97e9d7d0c2312385bfd8dcbb85a1bc4bd7d263cc</id>
<content type='text'>
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 &lt;mail@georg-pfuetzenreuter.net&gt;

Add sample message to Jeopardy logic

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mail@georg-pfuetzenreuter.net&gt;

Add sample message to Jeopardy logic

Signed-off-by: Georg Pfuetzenreuter &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement automatic channel joining</title>
<updated>2024-09-28T17:33:18+00:00</updated>
<author>
<name>Georg Pfuetzenreuter</name>
</author>
<published>2024-09-21T16:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.casa/watbot.git/commit/?id=0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e'/>
<id>0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e</id>
<content type='text'>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mail@georg-pfuetzenreuter.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
