Take list of auto-rejoin channels directly from core
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 13 Jan 2009 22:37:42 +0000 (23:37 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 13 Jan 2009 22:59:25 +0000 (23:59 +0100)
This might fix the dreaded auto-rejoin bug. I can only guess, but maybe the cached list
in CoreNetwork and the list in the database get out of sync in some circumstances. This
gets rid of the (unneeded) caching; please let me know if the rejoin bug is still present.

src/core/corenetwork.cpp
src/core/corenetwork.h

index ba152a4..a40b546 100644 (file)
@@ -406,7 +406,7 @@ void CoreNetwork::sendPerform() {
   // rejoin channels we've been in
   if(rejoinChannels()) {
     QStringList channels, keys;
-    foreach(QString chan, persistentChannels()) {
+    foreach(QString chan, coreSession()->persistentChannels(networkId()).keys()) {
       QString key = channelKey(chan);
       if(!key.isEmpty()) {
         channels.prepend(chan);
index c3a932e..f088707 100644 (file)
@@ -74,7 +74,6 @@ public:
   QByteArray userEncode(const QString &userNick, const QString &string) const;
 
   inline QString channelKey(const QString &channel) const { return _channelKeys.value(channel.toLower(), QString()); }
-  inline QStringList persistentChannels() const { return _channelKeys.keys(); }
 
   inline bool isAutoWhoInProgress(const QString &channel) const { return _autoWhoInProgress.value(channel.toLower(), 0); }