Rename local variable and remove unused local variable in IrcMessageBuild.cpp

This commit is contained in:
mmb L 2021-11-27 21:51:37 +08:00 committed by pajlada
parent ec966a1791
commit 179527611e

View file

@ -827,18 +827,18 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
{ {
return; return;
} }
auto &channelName = hostOn ? parts[2] : parts[0]; auto &hostedChannelName = hostOn ? parts[2] : parts[0];
if (channelName.size() < 2) if (hostedChannelName.size() < 2)
{ {
return; return;
} }
if (hostOn) if (hostOn)
{ {
channelName.chop(1); hostedChannelName.chop(1);
} }
MessageBuilder builder; MessageBuilder builder;
TwitchMessageBuilder::hostingSystemMessage(channelName, &builder, TwitchMessageBuilder::hostingSystemMessage(hostedChannelName,
hostOn); &builder, hostOn);
channel->addMessage(builder.release()); channel->addMessage(builder.release());
} }
else if (tags == "room_mods" || tags == "vips_success") else if (tags == "room_mods" || tags == "vips_success")