dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.2.5
britneywright has joined #cinch
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #cinch
_djbkd has quit [Remote host closed the connection]
postmodern has joined #cinch
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has quit [Quit: Leaving]
dryicebomb has quit [Ping timeout: 265 seconds]
green-big-frog has quit [Ping timeout: 265 seconds]
ConcernedQuestin has quit [Ping timeout: 265 seconds]
green-big-frog has joined #cinch
dryicebomb has joined #cinch
ConcernedQuestin has joined #cinch
postmodern has joined #cinch
green-big-frog has quit [Ping timeout: 272 seconds]
waxjar has quit [Ping timeout: 256 seconds]
ChasedSpade has quit [Read error: Connection reset by peer]
Centrixx has joined #cinch
waxjar has joined #cinch
<apeiros> if I'd want to change the CAP REQ line the cinch bot sends - how'd I best go about that? specifically, I want to send `CAP REQ :extended-join account-notify`
<dominikh> fix Cinch to allow registering your own capabilities and send a patch. although I'm not sure if extended-join won't break the parser for JOIN messages
<dominikh> which, coincidentally, is why we don't allow users to mess with caps
<apeiros> ok. patch orgy again then :D
<dominikh> tbh, Cinch should/could support account-notify
<apeiros> extended-join too. makes authname handling a lot easier.
<dominikh> easier or just more performant?
<apeiros> both
<dominikh> User#authname works for newly joined users without extended-join just fine, but it has to do a WHOIS
<apeiros> you don't have to query authname anymore
<dominikh> same level of easy, though
<apeiros> no, current User#authname can fail
<dominikh> how so.
<apeiros> the "waiting for 10s… 20s… 30s… giving up" messages
<apeiros> it might only happen when the query is performed on a lot of users at once
<dominikh> meh. so authname works, but sending the user a message might still need a WHOIS. back to square one.
<apeiros> and I think that even caused a crash for me (probably the OS which shot down the process due to too many IOs)
* apeiros brb, work interruption
<dominikh> anyway, I'd accept a patch for account-notify if it actually uses the message to update a user's authname. and I'd accept a patch for extended-join if it makes use of that information, too.
<leftylink> oh. yeah, my authname time out when bot is first starting because bot is querying channel info so the whois is way behind in the queues. I just deal with it I guess; I don't restart too often
<leftylink> account-notify would be quite interesting
<dominikh> (most stuff shouldn't need a WHOIS, we use WHOX when joining a channel to get most of the relevant information. that is user/host/realname/authname)
<dominikh> extended-join would only come into play for newly joining folks
<dominikh> (and account-notify I'm not sure about, e.g. freenode does a part/join cycle in that case anyway, I think. at least when the hostname changes)
<apeiros> ah, cinch already does WHOX? great.
<apeiros> and yes, extended-join + account-notify should make it unnecessary to query for any channel user
<apeiros> which matters with channels as large as #ruby (900 users)
<apeiros> grah. sorry, brb again
<dominikh> it matters for channels with a lot of people leaving or joining ;) traffic is the key metric here, not volume :P
<dominikh> but yeah, it'd be a nice optimization
<apeiros> well, join/part often correlate with size ;-)
<apeiros> and #ruby has a lot of join/parts
<dominikh> well, as I said, write those patches and I'll glady accept them ;)
<apeiros> will do. I'll run it a while via monkey patches. when that doesn't exhibit problems, I'll fork & patch properly and provide them as PR
<dominikh> alright.
<dominikh> just make it non-hacky please ;)
<dominikh> for all the flaws in Cinch's code, I still care about quality patches :P
<apeiros> given the time I can allot to this I'm not sure I can give guarantees for that. but you can always review my PR and tell me where to improve.
<dominikh> I'll do just that :)
<dominikh> I also won't blame you if you don't send a PR at all ;) I'm not holding my breath for a shiny new feature, I'm just making it possible for people to add features they need :P
<apeiros> oh, sure. that's just healthy to do.
<dominikh> (most people do because monkeypatching is more work once they update to new versions of Cinch)
<apeiros> I won't guarantee any PR either :)
<apeiros> but I prefer having changes upstream instead of maintaining my patches. which fits with what you just said :D
<dominikh> :>
<dominikh> it reminds me of http://www.rubyinside.com/the-end-of-monkeypatching-4570.html which was such a stupid article
<apeiros> mh, MP's are easier to maintain IME than forks
<apeiros> they only break when the API changes
<apeiros> forks are more fragile
<dominikh> it's harder to know in advance if something breaks, though
<dominikh> it will blow up some day, maybe
<apeiros> that's true
<apeiros> but overall effort is IME less
<apeiros> and I say that having ~15 custom patched gems at work. almost all of them through forking.
<dominikh> no idea, I refuse to monkeypatch by principle ;)
<dominikh> (also because it makes it easier not to contribute upstream)
<apeiros> I'm antidogmatic :)
<dominikh> I'm pro cleanliness :P
<apeiros> I'm pro pragmatism (word fight! go!)
<dominikh> so am I :P
<apeiros> hehe
green-big-frog has joined #cinch
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
sarkyniin has joined #cinch
britneywright has joined #cinch
<apeiros> dominikh: looks actually like it was a trivial patch. I just wish I didn't have to do it between coffee breaks :D
<apeiros> it's just 3 LoC which change
<apeiros> or actually 2
<apeiros> add the caps in send_cap_req, and in on_join add `update_whois(msg.user, {:authname => authname}) if @network.capabilities.include?(:"extended-join")`
<apeiros> oh, authname is one of the params
<apeiros> update_whois(msg.user, {:authname => msg.params[2]}) if @network.capabilities.include?(:"extended-join") && msg.params[2] != "*".freeze # better
<dominikh> well, that postfix if is ugly, but apart from that, yeah…
<apeiros> *shrug*, can make it multiline for your PR
<dominikh> I'd prefer that, then I won't have to edit that part of the patch ;)
<apeiros> account-notify looks similarly trivial. where do you register IRC#on_join etc.?
<dominikh> it's done via magic
<apeiros> :-O
<dominikh> meth = "on_#{msg.command.downcase}"
<dominikh> __send__(meth, msg, events) if respond_to?(meth, true)
<apeiros> ah
<dominikh> literally magic :P
<apeiros> then it's a 3 line patch
<apeiros> def on_account
<apeiros> and in there: update_whois(msg.user, {:authname => msg.params[1]})
<dominikh> and the update_whois in on_join is not correct
<dominikh> neither is it in on_account
<apeiros> why?
<dominikh> look at on_352 for how to do it properly
<dominikh> update_whois is for WHOIS responses
<dominikh> because they consist of multiple messages
<dominikh> they all collect their data via update_whois and do a batch update when the whois reply is completed
<dominikh> you're not in a WHOIS though
<apeiros> are you sure 352? because I don't see you set authname there…
<dominikh> ...
<apeiros> user, host, realname - but not authname
<dominikh> try to extrapolate
<dominikh> be clever
<dominikh> it's doing that for user, host and realname. gee I wonder how it'd be done for the authname :P
<apeiros> ok, so user_object.sync(:authname, VAR, true)
<dominikh> yes
<apeiros> ok
<apeiros> and set it to nil when he logs out of his account?
<dominikh> yeah
<apeiros> does cinch automatically set it to nil for users which it loses sight of?
<apeiros> i.e. no shared channels
<dominikh> it unsyncs the attribute, so the next request would fire a WHOIS
<apeiros> ok
<dominikh> (which then of course gets cached, which can bite you)
<dominikh> sane thing would be not to cache for users we cannot see
<dominikh> will see if I can patch that into the current architecture for the attributes (which is horrifyingly bad, but there's already a branch to fix that)
<dominikh> anyway, going to bed, nn
<apeiros> n8
ConcernedQuestin is now known as ConcernedHobbit
dryicebomb has quit []
sarkyniin has quit [Read error: No route to host]
sarkyniin has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 264 seconds]
Crazy_Atheist has joined #cinch
Crazy_Atheist has joined #cinch
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ConcernedHobbit is now known as ConcernedQuestin
britneywright has joined #cinch
britneywright has quit [Read error: Connection reset by peer]
britneywright has joined #cinch
Crazy_Atheist has quit [Quit: Leaving]
anomaly_ has left #cinch ["Leaving"]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
apt-get_ has quit [Remote host closed the connection]
<dominikh> apeiros: any more issues while I was asleep? :P
<apeiros> technically I'm asleep now. 0:-)
<apeiros> patch works. cinch still does whois on User(). will figure out why tomorrow.
<dominikh> probably for another argument it needs then ;) (I can send you a monkeypatch to log why a WHOIS was done tomorrow if you want)
<apeiros> sure
<dominikh> just remind me.
<apeiros> no hurry. I won't get to it within the next 16h.
<apeiros> big release tomorrow. that's why I'm technically asleep already ;-)
<dominikh> in 16h I'll be asleep again :D
<apeiros> my znc doesn't sleep. just write me ;-)
<apeiros> anyway, I go hit the pillow for real now
<dominikh> nn
Centrixx is now known as ChasedSpade