1
0
Fork 0
mirror of https://github.com/HackHerz/pusher synced 2025-12-06 02:10:19 +00:00

Login instructions.

This commit is contained in:
Daniel Stein 2016-06-25 14:29:07 +02:00
parent a0da807c23
commit b4dcd02aa6

View file

@ -135,12 +135,17 @@ int main(int argc, char **argv)
// Check if reading of config is possible // Check if reading of config is possible
if(iniReader.LoadFile(CONFIG_FILE) < 0) if(iniReader.LoadFile(CONFIG_FILE) < 0)
{ {
cout << "Error" << endl; throw PusherError("You need to login first.");
return 1; }
string username = iniReader.GetValue("pusher", "username", "");
string appToken = iniReader.GetValue("pusher", "appToken", "");
if(username.empty() || appToken.empty())
{
throw PusherError("You need to login first.");
} }
string username = iniReader.GetValue("pusher", "username", NULL);
string appToken = iniReader.GetValue("pusher", "appToken", NULL);
// Loading values // Loading values