More improvements to encoding handling. There is now a server encoding that
[quassel.git] / src / common / ircchannel.cpp
index edb2c71..f5710ba 100644 (file)
 #include <QDebug>
 
 
-IrcChannel::IrcChannel(const QString &channelname, Network *network) 
-  : SyncableObject(network),
+IrcChannel::IrcChannel(const QString &channelname, Network *network) : SyncableObject(network),
     _initialized(false),
     _name(channelname),
     _topic(QString()),
-    network(network)
+    network(network),
+    _codecForEncoding(0),
+    _codecForDecoding(0)
 {
   setObjectName(QString::number(network->networkId().toInt()) + "/" +  channelname);
 }
@@ -124,7 +125,7 @@ QString IrcChannel::decodeString(const QByteArray &text) const {
   return ::decodeString(text, _codecForDecoding);
 }
 
-QByteArray IrcChannel::encodeString(const QString string) const {
+QByteArray IrcChannel::encodeString(const QString &string) const {
   if(codecForEncoding()) {
     return _codecForEncoding->fromUnicode(string);
   }
@@ -244,8 +245,8 @@ void IrcChannel::ircUserDestroyed() {
   IrcUser *ircUser = static_cast<IrcUser *>(sender());
   Q_ASSERT(ircUser);
   _userModes.remove(ircUser);
-  emit ircUserParted(ircUser);
-  //qDebug() << "DEST" << name() << ircUsers().count();
+  // no further propagation.
+  // this leads only to fuck ups.
 }
 
 void IrcChannel::ircUserNickSet(QString nick) {