added cipher to channel + user
[quassel.git] / src / common / ircuser.cpp
index 5220025..1dbb0f0 100644 (file)
@@ -47,6 +47,10 @@ IrcUser::IrcUser(const QString &hostmask, Network *network) : SyncableObject(net
     _codecForDecoding(0)
 {
   updateObjectName();
+  
+  #ifdef HAVE_QCA2
+  _cipher = 0;
+  #endif
 }
 
 IrcUser::~IrcUser() {
@@ -310,3 +314,16 @@ void IrcUser::setLastSpokenTo(BufferId buffer, const QDateTime &time) {
   _lastSpokenTo[buffer] = time;
   emit lastSpokenToUpdated(buffer, time);
 }
+
+#ifdef HAVE_QCA2
+Cipher* IrcUser::cipher() {
+  if(!_cipher)
+    _cipher = new Cipher();
+  return _cipher;
+}
+#endif
+
+void IrcUser::setEncrypted(bool e) {
+  Q_UNUSED(e);
+  // TODO
+}
\ No newline at end of file