Make cleanChannelName a NOOP for IRC (#4154)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -207,7 +207,7 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent)
|
||||
outerBox->addRow("Server:", view);
|
||||
}
|
||||
|
||||
outerBox->addRow("Channel:", this->ui_.irc.channel = new QLineEdit);
|
||||
outerBox->addRow("Channel: #", this->ui_.irc.channel = new QLineEdit);
|
||||
|
||||
auto tab = notebook->addPage(obj.getElement());
|
||||
tab->setCustomTitle("Irc (Beta)");
|
||||
|
||||
Reference in New Issue
Block a user