mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
stratum: log ip of new clients (#262)
This commit is contained in:
parent
138b0079bb
commit
078ace3a65
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
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)",
|
db_query(db, "INSERT INTO accounts (username, coinsymbol, balance, donation, hostaddr) values ('%s', '%s', 0, %d, '%s')",
|
||||||
client->username, symbol, gift);
|
client->username, symbol, gift, client->sock->ip);
|
||||||
client->userid = (int)mysql_insert_id(&db->mysql);
|
client->userid = (int)mysql_insert_id(&db->mysql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue