Skip to content

Commit

Permalink
stratum: log ip of new clients (tpruvot#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
crackfoo authored and tpruvot committed May 2, 2018
1 parent 138b007 commit 078ace3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stratum/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ void db_add_user(YAAMP_DB *db, YAAMP_CLIENT *client)

else if(client->userid == 0 && strlen(client->username) >= MIN_ADDRESS_LEN)
{
db_query(db, "INSERT INTO accounts (username, coinsymbol, balance, donation) values ('%s', '%s', 0, %d)",
client->username, symbol, gift);
db_query(db, "INSERT INTO accounts (username, coinsymbol, balance, donation, hostaddr) values ('%s', '%s', 0, %d, '%s')",
client->username, symbol, gift, client->sock->ip);
client->userid = (int)mysql_insert_id(&db->mysql);
}

Expand Down

0 comments on commit 078ace3

Please sign in to comment.