Make cleanChannelName a NOOP for IRC (#4154)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Mm2PL
2022-11-16 17:54:59 +01:00
committed by GitHub
parent 991cf6364d
commit 32d077c43b
4 changed files with 6 additions and 9 deletions
+2 -4
View File
@@ -373,10 +373,8 @@ std::shared_ptr<Channel> AbstractIrcServer::getCustomChannel(
QString AbstractIrcServer::cleanChannelName(const QString &dirtyChannelName)
{
if (dirtyChannelName.startsWith('#'))
return dirtyChannelName.mid(1);
else
return dirtyChannelName;
// This function is a Noop only for IRC, for Twitch it removes a leading '#' and lowercases the name
return dirtyChannelName;
}
void AbstractIrcServer::addFakeMessage(const QString &data)
+2 -4
View File
@@ -219,8 +219,7 @@ void IrcServer::readConnectionMessageReceived(Communi::IrcMessage *message)
case Communi::IrcMessage::Join: {
auto x = static_cast<Communi::IrcJoinMessage *>(message);
if (auto it =
this->channels.find(this->cleanChannelName(x->channel()));
if (auto it = this->channels.find(x->channel());
it != this->channels.end())
{
if (auto shared = it->lock())
@@ -243,8 +242,7 @@ void IrcServer::readConnectionMessageReceived(Communi::IrcMessage *message)
case Communi::IrcMessage::Part: {
auto x = static_cast<Communi::IrcPartMessage *>(message);
if (auto it =
this->channels.find(this->cleanChannelName(x->channel()));
if (auto it = this->channels.find(x->channel());
it != this->channels.end())
{
if (auto shared = it->lock())