kiwiirc / kiwibnc

Apache License 2.0
43 stars 14 forks source link

Don't link control connections to outgoing connections && fix joining channels specified in the network object #106

Closed ItsOnlyBinary closed 3 years ago

ItsOnlyBinary commented 3 years ago

This solves a couple of uncaught exceptions

best way to reproduce the exceptions is using auto-add-network with a new user

prawnsalad commented 3 years ago

I've simplified this PR into 2972c61ebd06a363fcb9b093b716a388ada4569a and 92bdbc7db113f6e3d5647201acb30c529c84cf6e.

The passing of the connection around the different contexts was complicating things but I couldn't think of a better way to refactor it either. I did realise though that the only reason the connection was needed for the two cases you found was to pass it to Helpers.extractTargetGroup() in the add buffer calls, which for these two cases is not needed anyway since the buffer names come from configs and the database - they won't ever have any status message groups in the buffer names. So simply making the upstreamCon optional simplified this.