JanGe / xdcc

A wget-like utility for retrieving files from XDCC bots on IRC
MIT License
15 stars 1 forks source link

znc bugfix & bracket #2

Closed cbm80 closed 8 years ago

cbm80 commented 8 years ago

Hallo @JanGe

wir können offenbar deutsch miteinander sprechen.

Ich habe zwei bugs gefixed.

  1. Dein 'bracket' hat keine exceptions gefangen, ich habe es deshalb durch die Version aus dem lifted-base package ersetzt.
  2. znc schließt den Socket sobald es die '*status' Message 'disconnect' bekommt. Deshalb darf nach dem disconnect-Hook keine 'QUIT' Message mehr geschickt werden wenn znc benutzt wird, sonst gibt es eine exception.

MfG, cbm80

JanGe commented 8 years ago

Ja, könnten wir in der Tat. Nur falls jemand, der kein Deutsch kann, jemals auf den PR hier stoßen sollte, wäre für denjenigen halt einfacher uns zu verstehen, wenn wir Englisch schreiben. ;)

'bracket'

Very nice, I wasn't aware of Control.Exception.Lifted. My version of bracket was borrowed from here. Should have noted its shortcomings in a comment.

'*status' Message 'disconnect'

IMHO it would be better to keep all the logic related to ZNC in its own package. Therefore I would suggest either catching the exception thrown by disconnect or checking if the connection is still open, if SimpleIRC supports that. I will look into this tomorrow.

JanGe commented 8 years ago

I couldn't find a good way to add my commit to this PR, so I first merged your PR and then cherry-picked commit 4ca7cb6 with the changes I suggested. Any feedback on my commit?

Btw. if you want to be listed in the contributors graph you probably have to list the commit email address in your settings.