communi / libcommuni

A cross-platform IRC framework for Qt
https://communi.github.io
BSD 3-Clause "New" or "Revised" License
84 stars 37 forks source link

Add IrcConnection::connectionCount to count established #71

Closed Thaodan closed 4 years ago

Thaodan commented 4 years ago

See #69

jpnurmi commented 4 years ago

Thanks! :+1:

Should it reset the counter when the connection is explicitly closed?

Thaodan commented 4 years ago

Hm could be. My idea behind it was to collect amount of times a connection was established to decide if the channel topic should be shown again or the connection should be closed if the connection accours to fast in a given amount of time.

jpnurmi commented 4 years ago

I'm wondering because a desktop client can run in the background long periods without reboot. I wouldn't expect the counter to tell how many times the client has reconnected over the course of the whole runtime history, if I have manually disconnected and connected in between. ;)

Thaodan commented 4 years ago

No idea but is that bad? We could reset the counter when a manual disconnect is issued sure.