Show external IP in the log. Closes #968.

This commit is contained in:
sledgehammer999 2013-10-13 23:08:55 +03:00
parent 97fe948f6c
commit ff789fc493

View file

@ -2634,6 +2634,10 @@ void QBtSession::readAlerts() {
}
}
}
else if (external_ip_alert *p = dynamic_cast<external_ip_alert*>(a.get())) {
boost::system::error_code ec;
addConsoleMessage(tr("External IP: %1", "e.g. External IP: 192.168.0.1").arg(p->external_address.to_string(ec).c_str()), "blue");
}
} catch (const std::exception& e) {
qWarning() << "Caught exception in readAlerts(): " << e.what();
}