Process events when destroying CoreNetwork
authorShane Synan <digitalcircuit36939@gmail.com>
Mon, 5 Sep 2016 19:07:51 +0000 (14:07 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 6 Sep 2016 20:33:29 +0000 (22:33 +0200)
commit59ed0127591f946a68a6ee7f30b23deb37d26821
tree4685dc9ccba2769405a7be9c8f9a6e8a20356ee8
parentff2aeb5dad907f833b4311243213e5ee9fe12dfc
Process events when destroying CoreNetwork

During shutdown, process events in CoreNetwork, and wait for the
socket to disconnect.  This fixes the QUIT command not getting sent
to IRC networks.

Examples
[Unreal 3.2]
> Before
<-- dcircuit_dev (quasseldev@hostmask.IP) has quit (Input/output error)
> After
<-- dcircuit_dev (quasseldev@hostmask.IP) has quit (Quit: My Message!)
[Freenode]
> Before
<-- dcircuit_dev (~quasselde@hostmask) has quit (Remote host closed the connection)
> After
<-- dcircuit_dev (~quasselde@hostmask) has quit (Quit: My Message!)

Where "My Message!" is specified in Configure Quassel -> IRC
-> Identities -> Advanced -> Quit Reason

Note: Freenode hides quit messages from clients that disconnect soon
after connecting.  Stay connected ~10 minutes before testing QUIT.
src/core/corenetwork.cpp
src/core/corenetwork.h