From 38b12ff0081a1ff4b193771cefc6afa5ed116efc Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Fri, 13 May 2016 19:47:41 +0200 Subject: Use connection->nickName() instead of Config.IRC.Nick where appropriate --- src/crsm.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/crsm.cpp b/src/crsm.cpp index 55b18e6..3aec907 100644 --- a/src/crsm.cpp +++ b/src/crsm.cpp @@ -465,7 +465,7 @@ void CRSM::ircMessageReceived(IrcMessage *message) { IrcModeMessage* modeMessage = (IrcModeMessage*)message; QRegExp modeExp("^\\+[a-zA-Z]*(a|o)"); - if(Config.IRC.UseIngameChat && message->parameters().size() >= 3 && modeMessage->target() == Config.IRC.IngameChannel && modeExp.exactMatch(modeMessage->mode()) && modeMessage->argument() == Config.IRC.Nick) + if(Config.IRC.UseIngameChat && message->parameters().size() >= 3 && modeMessage->target() == Config.IRC.IngameChannel && modeExp.exactMatch(modeMessage->mode()) && modeMessage->argument() == connection->nickName()) { ircSetIngameChannelTopic(); } @@ -476,7 +476,7 @@ void CRSM::ircConnected() { IrcConnection* conn = (IrcConnection*)sender(); Q_ASSERT(conn == connection); - connection->sendCommand(IrcCommand::createMode(Config.IRC.Nick, "+B")); + connection->sendCommand(IrcCommand::createMode(connection->nickName(), "+B")); connection->sendCommand(IrcCommand::createJoin(Config.IRC.Channel)); if(Config.IRC.UseIngameChat && !Config.IRC.IngameChannel.isEmpty()) { @@ -609,13 +609,13 @@ QString GetRandomString(int length = 5) void CRSM::newDCCData() { QTcpSocket* socket = (QTcpSocket*)sender(); - const DCCConnection& connection = dccSocketConnections[socket]; + const DCCConnection& dccConnection = dccSocketConnections[socket]; QString message = QString::fromUtf8(socket->readLine()); if(message.endsWith('\n')) { message.chop(1); } - handleIrcMessage(connection.client, message, Config.IRC.Nick, true, false); + handleIrcMessage(dccConnection.client, message, connection->nickName(), true, false); } void CRSM::newDCCConnection() @@ -631,7 +631,7 @@ void CRSM::newDCCConnection() dccConnectionIdentifiers.insert(identifier, socket); connect(socket, SIGNAL(disconnected()), this, SLOT(disconnectedDCCConnection())); - socket->write(QString("Weise diese Verbindung deinem IRC-Nick zu, indem du diesen Befehl eingibst: /msg " + Config.IRC.Nick + " dcc identify " + identifier + "\n").toUtf8()); + socket->write(QString("Weise diese Verbindung deinem IRC-Nick zu, indem du diesen Befehl eingibst: /msg " + connection->nickName() + " dcc identify " + identifier + "\n").toUtf8()); } void CRSM::disconnectedDCCConnection() -- cgit v1.2.3-54-g00ecf