dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
ColdBlooder has quit [Remote host closed the connection]
Spami has joined #cinch
Rylee_ has quit [Remote host closed the connection]
Rylee has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
kimoto________ has joined #cinch
kimoto_______ has quit [Ping timeout: 252 seconds]
FIQ has quit [Excess Flood]
FIQ has joined #cinch
FIQ is now known as Guest13974
Guest13974 has quit [Excess Flood]
Guest91781 has joined #cinch
postmodern has quit [Quit: Leaving]
ColdBlooder has joined #cinch
Guest91781 has quit [Changing host]
Guest91781 has joined #cinch
Guest91781 is now known as FIQ
Rylee has quit [Remote host closed the connection]
Rylee has joined #cinch
Spami has joined #cinch
xeviox|afk is now known as xeviox
Spami has quit [Read error: Connection reset by peer]
Spami has joined #cinch
quaxim has quit [Ping timeout: 240 seconds]
quaxim has joined #cinch
systems_glitch has joined #cinch
<systems_glitch>
question about extending the base functionality of Cinch::IRC
<systems_glitch>
i want to add support for LIST (numerics 321, 322, 323)
<systems_glitch>
is this best done in a plugin, or should i submit a pull request with my changes?
postmodern has joined #cinch
<dominikh>
depends what you maen by "add support for LIST"
<systems_glitch>
i mean nothing responds to those numerics right now
<systems_glitch>
i've implemented for my project by monkey patching Cinch::IRC and Cinch::Network to respond to LIST and store the results on the network
<dominikh>
on the majority of networks, doing a "LIST" is a sure way to get yourself flooded off the network, so I probably don't want to provide a method to do that
<systems_glitch>
that's a good point, you'd get swamped on freenode
<dominikh>
also not sure what'd happen if someone ran LIST twice concurrently; we couldn't tell the lists apart
<systems_glitch>
due to the way i implemented storage of the LIST results, it would just update existing entry in a channels hash, or add them if they didn't exist
<dominikh>
and what about removing ones that disappeared?
<systems_glitch>
it starts with a new hash when it received 321 RLP_LISTSTART
<systems_glitch>
so i guess in the case of a double concurrent call, you might empty the hash after some channels had been inserted
<systems_glitch>
but you'd end up with all of them in the end
<onewheelskyward>
oi
<onewheelskyward>
Given the time it takes to complete a list you should consider blocking concurrent calls.
<dominikh>
multiple LIST calls should be coalesced, yeah. either way, I'm not sure it'd make sense to add that to Cinch itself, considering how rarely using LIST is desirable
<systems_glitch>
we're using it for a stats page for the irc server
<systems_glitch>
i'm trying to replace an ancient Perl bot
<dominikh>
ah
<dominikh>
well, it's easily doable as a plugin, giving your needs
<dominikh>
*given
<systems_glitch>
yep, i've started wrapping it up in a plugin
xeviox is now known as xeviox|afk
<systems_glitch>
any recommendation on registering new numeric response handlers in Cinch::IRC without monkey patching?
<systems_glitch>
looks like i could hook :catchall but that seems inefficient
<dominikh>
systems_glitch: what do you mean?
<dominikh>
you don't need to add anything to Cinch::IRC to handle numerics in your plugins.
<systems_glitch>
no? how do i listen for them?
<dominikh>
listen_to "123". or listen_to Cinch::Constants::RPL_WHATEVER.to_s
<systems_glitch>
d'oh
<systems_glitch>
so since i got a crash course in non-super-trivial Cinch today, i'll be submitting PRs for documentation :D