projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #146 from benapetr/master
[quassel.git]
/
src
/
core
/
coreircchannel.cpp
diff --git
a/src/core/coreircchannel.cpp
b/src/core/coreircchannel.cpp
index
a7e1b6c
..
ccb82a5
100644
(file)
--- a/
src/core/coreircchannel.cpp
+++ b/
src/core/coreircchannel.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
3
by the Quassel Project *
+ * Copyright (C) 2005-201
5
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-52,6
+52,8
@@
Cipher *CoreIrcChannel::cipher() const
void CoreIrcChannel::setEncrypted(bool e)
{
void CoreIrcChannel::setEncrypted(bool e)
{
+ IrcChannel::setEncrypted(e);
+
if (!Cipher::neededFeaturesAvailable())
return;
if (!Cipher::neededFeaturesAvailable())
return;
@@
-59,14
+61,7
@@
void CoreIrcChannel::setEncrypted(bool e)
if (topic().isEmpty())
return;
if (topic().isEmpty())
return;
- QByteArray key = qobject_cast<CoreNetwork *>(network())->cipherKey(name());
- if (key.isEmpty())
- return;
-
- if (!cipher()->setKey(key))
- return;
-
- QByteArray decrypted = cipher()->decryptTopic(topic().toAscii());
+ QByteArray decrypted = cipher()->decryptTopic(topic().toLatin1());
setTopic(decodeString(decrypted));
}
}
setTopic(decodeString(decrypted));
}
}