Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Commit

Permalink
Don't try to process variables if client features not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
r52 committed Jan 28, 2020
1 parent 939cf8a commit c099cda
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PTA/macrohandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ bool MacroHandler::processChatCommand(std::string& command)

if (match.hasMatch())
{
if (!m_client->enabled())
{
qWarning() << "Client features unavailable. Please set Client.txt path in settings to enable.";
emit humour(tr("Client features unavailable. Please set Client.txt path in settings to enable."));

return false;
}

QString var = match.captured(1);

if (!m_variables.contains(var))
Expand Down

0 comments on commit c099cda

Please sign in to comment.