mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Friend requests should be better.
This commit is contained in:
parent
11d02de9a1
commit
d0b4fa56a3
|
@ -426,6 +426,15 @@ static void doFriends()
|
|||
}
|
||||
if(friendlist[i].status == 2 || friendlist[i].status == 3) /* friend is not online */
|
||||
{
|
||||
if(friendlist[i].status == 2)
|
||||
{
|
||||
if(friendlist[i].friend_request_id + 10 < unix_time()) /*I know this is hackish but it should work.*/
|
||||
{
|
||||
send_friendrequest(friendlist[i].client_id, friendlist[i].info, friendlist[i].info_size);
|
||||
friendlist[i].friend_request_id = unix_time();
|
||||
|
||||
}
|
||||
}
|
||||
IP_Port friendip = DHT_getfriendip(friendlist[i].client_id);
|
||||
switch(is_cryptoconnected(friendlist[i].crypt_connection_id))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user