fixed a bug in IrcChannel. Upgrade is strongly advised! Distclean as usual.
[quassel.git] / src / common / network.cpp
index da1be33..8f5680b 100644 (file)
@@ -95,7 +95,8 @@ bool Network::isConnected() const {
   return _connected;
 }
 
-Network::ConnectionState Network::connectionState() const {
+//Network::ConnectionState Network::connectionState() const {
+int Network::connectionState() const {
   return _connectionState;
 }
 
@@ -235,6 +236,7 @@ void Network::removeIrcUser(IrcUser *ircuser) {
     return;
 
   _ircUsers.remove(nick);
+  disconnect(ircuser, 0, this, 0);
   emit ircUserRemoved(nick);
   emit ircUserRemoved(ircuser);
   ircuser->deleteLater();
@@ -369,8 +371,11 @@ void Network::setConnected(bool connected) {
   emit connectedSet(connected);
 }
 
-void Network::setConnectionState(ConnectionState state) {
+//void Network::setConnectionState(ConnectionState state) {
+void Network::setConnectionState(int state) {
   _connectionState = (ConnectionState)state;
+  //qDebug() << "netstate" << networkId() << networkName() << state;
+  emit connectionStateSet(state);
   emit connectionStateSet(_connectionState);
 }