Telegram support and more notificatons (#217)

# 1.8.6
- Integrated Telegram push notifications
- Fixed multi miner editor
- Added miner offline/online status push notification
- Added 0/recovered hashrate push notification
This commit is contained in:
Ben Gräf 2018-12-10 14:20:51 +01:00 committed by GitHub
parent 576e803627
commit cc8b117aa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 171 additions and 30 deletions

View file

@ -60,14 +60,20 @@ static void print_commands()
}
void Summary::print_pushinfo() {
if (Options::i()->ccPushoverToken() && Options::i()->ccPushoverUser())
if (Options::i()->ccUsePushover() || Options::i()->ccUseTelegram())
{
#ifndef XMRIG_NO_TLS
if (Options::i()->colors()) {
Log::i()->text("\x1B[01;32m * \x1B[01;37mPUSHSERVICE: \x1B[01;32mEnabled");
Log::i()->text("\x1B[01;32m * \x1B[01;37mPUSHSERVICE: \x1B[01;32m%s%s%s",
Options::i()->ccUsePushover() ? "Pushover" : "",
Options::i()->ccUsePushover() && Options::i()->ccUseTelegram() ? ", " : "",
Options::i()->ccUseTelegram() ? "Telegram" : "");
}
else {
Log::i()->text(" * PUSHSERVICE: Enabled");
Log::i()->text(" * PUSHSERVICE: %s%s%s",
Options::i()->ccUsePushover() ? "Pushover" : "",
Options::i()->ccUsePushover() && Options::i()->ccUseTelegram() ? ", " : "",
Options::i()->ccUseTelegram() ? "Telegram" : "");
}
#else
if (Options::i()->colors()) {