dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.3.1 | You're being logged at https://irclog.whitequark.org/cinch/
_whitelogger has joined #cinch
_whitelogger has joined #cinch
blerrp has quit [Changing host]
blerrp has joined #cinch
<blerrp>
for options like messages_per_second, server_queue_size
<blerrp>
it says 'Default value : Network dependent' in the docs
<blerrp>
are they really determined dynamically?
<blerrp>
by looking at the server messages upon connecting or something?
<blerrp>
how i can i see what they're set at when a bot's running
<blerrp>
(to help with deciding what to adjust them to)
<blerrp>
*how can i see
<dominikh>
you can just print the config values. @bot.config.something – and they're determined either by specific messages, or usually based on the network name.
<blerrp>
i have a line m.reply @bot.config
<blerrp>
and in there, i only see messages_per_second=nil, server_queue_size=nil
<dominikh>
ah. right. dump @bot.irc.network instead. in particular, default_messages_per_second and default_server_queue_size
<blerrp>
ty
<dominikh>
actually, you have to dump these specifically, they're methods
<blerrp>
also interesting you have sendQ for quakenet but not freenode, and you have mps for freenode and not quakenet
<blerrp>
lol
<dominikh>
well, from the IRC server's point of view it's their recvq
<dominikh>
but yeah, it boils down to the same concept
<dominikh>
that code is old, so there's a non-zero chance that I just didn't specify freenode and quakenet respectively because their values match the default. there's no telling now.
<dominikh>
maybe we just didn't have the information available
<blerrp>
i don't think it's usually announced in the capability messages
<blerrp>
have to determine experimentally
<dominikh>
some mention it in documentation, which IIRC is where we got those values from. if they were announced, we sure as hell should've extracted that info
<dominikh>
bbl
<blerrp>
are there any helpers or something built in to help mitigate abuse
<blerrp>
like users spamming commands
<blerrp>
and eating up the bot's send capacity
<blerrp>
or do you have to roll your own and put it on anything that sends a message
<blerrp>
and if it's roll your own, do you have suggestions
<dominikh>
our ecosystem isn't really a thing… you'll have to implement most fancy things yourself. for rate limiting user commands you'll want to look into the "filter" feature for messages and into ruby mixins. that way you don't have to manually add the check to each handler, just mixin the filter stuff into each plugin class