Prevent the core from restoring its state if it is unconfigured.
[quassel.git] / src / common / ircuser.cpp
index 99f2ae3..223a02f 100644 (file)
@@ -49,10 +49,6 @@ IrcUser::IrcUser(const QString &hostmask, Network *network)
 }
 
 IrcUser::~IrcUser() {
-  QList<IrcChannel *> channels = _channels.toList();
-  foreach(IrcChannel *channel, channels) {
-    partChannel(channel);
-  }
 }
 
 // ====================
@@ -284,10 +280,8 @@ void IrcUser::partChannel(const QString &channelname) {
 void IrcUser::channelDestroyed() {
   // private slot!
   IrcChannel *channel = static_cast<IrcChannel*>(sender());
-  Q_ASSERT(channel);
   if(_channels.contains(channel)) {
     _channels.remove(channel);
-    disconnect(channel, 0, this, 0);
   }
 }