about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--pcoin.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/pcoin.cpp b/pcoin.cpp
index 5c4273e..57f1faf 100644
--- a/pcoin.cpp
+++ b/pcoin.cpp
@@ -49,13 +49,24 @@
 #define TCOIN_PATH_W_SLASH "/home/login/tcoin/"
 #define TCOIN_SCRYPT_PATH "/home/login/bin/scrypt"
 */
+
+#define KROWBAR_OFF
+#define DA_OFF
+#define MINERCOIN_OFF
+
 #define LS_HOME_CMD "/bin/ls /home"
 #define BIN_ECHO_CMD "/bin/echo $$"
-#define KROWBAR_SCORE_PATH "/home/krowbar/Code/irc/data/tildescores.txt"
+#ifndef KROWBAR_OFF
+  #define KROWBAR_SCORE_PATH "/home/krowbar/Code/irc/data/tildescores.txt"
+#endif
 #define WHOAMI_PATH "/usr/bin/whoami"
-#define TROIDO_DACOINS_CMD "cd /home/troido/daily_adventure/client/ && /home/troido/daily_adventure/client/daclient printinfo 2>&1 | /bin/grep -oP '(?<=\"Coins\", )\[[:digit:]]+'"
-#define MINERCOIN_CMD_PRE_USERNAME "/bin/grep -oP '(?<=\"~"
-#define MINERCOIN_CMD_POST_USERNAME "\": )[[:digit:]]+' /home/minerobber/Code/minerbot/minercoin.json"
+#ifndef DA_OFF
+  #define TROIDO_DACOINS_CMD "cd /home/troido/daily_adventure/client/ && /home/troido/daily_adventure/client/daclient printinfo 2>&1 | /bin/grep -oP '(?<=\"Coins\", )\[[:digit:]]+'"
+#endif
+#ifndef MINERCOIN_OFF
+  #define MINERCOIN_CMD_PRE_USERNAME "/bin/grep -oP '(?<=\"~"
+  #define MINERCOIN_CMD_POST_USERNAME "\": )[[:digit:]]+' /home/minerobber/Code/minerbot/minercoin.json"
+#endif
 #define USERNAME_LENGTH_LIMIT 25
 
 void exit_program(const int error_number)
@@ -1569,6 +1580,7 @@ int main(int argc, char *argv[])
   krowbar_amount = 0;
   minercoin_amount = 0;
 
+  #ifndef KROWBAR_OFF
   //adding tildebot scores from krowbar to base amount
   {
     std::string line;
@@ -1607,7 +1619,9 @@ int main(int argc, char *argv[])
       delete[] line_c_string;
     }
   }
+  #endif
 
+  #ifndef DA_OFF
   //adding minercoin scores from minerobber to base amount
   {
     std::string command_to_exec = std::string(MINERCOIN_CMD_PRE_USERNAME) + get_username() + std::string(MINERCOIN_CMD_POST_USERNAME);
@@ -1620,6 +1634,7 @@ int main(int argc, char *argv[])
       //multiplied by 100 to convert tildecoins to centitildecoins, which
       //is the unit used throughout the program (and converted appropriately when displayed)
   }
+  #endif
 
   user_amount = get_file_value(get_username().c_str());