Note that I'm not an IRCop, these are information I got from asking
around then and there. So, be aware that they are not authoritative answers...
On Wed, 21 Apr 2021,
klu@tilde.club wrote:
Hi I want to write a small IRC bot for tilde.chat, where should I start?
Read Tilde.chat bot guidelines:
<
https://rfc.tildeverse.org/rfcs/2>
Also, while the bot policy on Tilde.chat is you may connect your bot(s)
to the network, subjected to the requirements on above guidelines;
be aware that joining bot into individual existing _channel_
is subjected to channel moderator's approval (certain exceptions exist [1]). Joining bot into #meta channel is also subjected to IRCops' approval
and extra scrutiny.
If you plan to get your hand dirty by implementing things on your own
(or would like to gain understanding of full implication of each command
you sent), you might want to read the IRC specifications. [2]
- any framework recommendation?
I'm not a framework aficionado, so I'm not exactly a right person
to answer that; you might have to wait for suggestions from others.
(I have an unfinished IRC bot in the work, which is written in Perl,
and barely use any library)
- suggestion on where and how to host the bot?
You could host your Tilde.chat-connected IRC bot right in Tilde.club;
although you have to make sure that your bot is not going to be a
resource hog in processor time and/or memory usage, even when it got
mildly abused. [3] (Also prefixing `nice -n 19` when you're running it
might be a good idea too)
Note that hosting bot directly in Tilde.club also means you can connect
locally to Inspircd node there <irc://localhost:6667/> without having
to deal with TLS; which may relieve you from using additional libraries
and save you from certain troubleshooting depending on the tech used.
Doing this also means that your bot(s) share your ident, which can avert
them from certain ban problems.
Downside of doing this, as I'm aware of, is when Tilde.club reboots.
(It does not happen _that_ often, but it still does happen
for time to time) When it happens, your bot would go down, and you
would have to start it again manually. I'm not sure what is Tilde.club's
policy on users' SystemD units; so I wouldn't suggest you to count on that.
Another catch is your bot would be subjected to the usual Tilde.club
firewall rules: no outgoing connections to weird, nonstandard ports,
and no accepting other incoming connections from outside of the club.
Regards,
~xwindows
-----
[1] The main exception is #bots, where bots may roam freely, and you may
test them there as much as you like. Other exceptions are
your own channels; this also includes channels that you made dedicated
to your bot(s).
[2] IRC specifications:
- RFC 1459 (original IRC2 specification, 1993)
<
https://tools.ietf.org/html/rfc2810>
- RFC 2810-2813 (IRC2, 2000 update)
<
https://tools.ietf.org/html/rfc2810>
<
https://tools.ietf.org/html/rfc2811>
<
https://tools.ietf.org/html/rfc2812>
<
https://tools.ietf.org/html/rfc2813>
[3] Tilde.chat's servers have been configured with rate limiting [4];
so the issue of "other users flooding you" might not be the main
problem that you would need to worry about. (That is, unless you
intend to leave your bot in the wrath of #chaos,
a place that rate limit need not apply)
In normal cases, you just have to make sure that users cannot
send/do something that trigger bot into doing some runaway processing,
or doing things that cause other security issues.
[4] IIRC, the Tilde.chat's default limit is that a client (including bots)
can send no more than 10 messages per 2 seconds; exceeding that would
result in the server immediately disconnect that client.
--- Synchronet 3.18b-Linux NewsLink 1.113