mirror of
https://github.com/HackHerz/pusher
synced 2025-12-06 02:10:19 +00:00
Login instructions.
This commit is contained in:
parent
a0da807c23
commit
b4dcd02aa6
1 changed files with 9 additions and 4 deletions
13
src/main.cpp
13
src/main.cpp
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue