diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-22 17:02:32 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-22 17:02:32 -0400 |
commit | d0b4fa56a3f8334cfffce45a9eadfcd8143f7944 (patch) | |
tree | 39478aeb93be9be4182f3f0da3b673a4e5d98cb8 | |
parent | 11d02de9a16dff3a9e3cdb911588f67b650881bb (diff) |
Friend requests should be better.
-rw-r--r-- | core/Messenger.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Messenger.c b/core/Messenger.c index 3d874837..1330e8ed 100644 --- a/core/Messenger.c +++ b/core/Messenger.c | |||
@@ -426,6 +426,15 @@ static void doFriends() | |||
426 | } | 426 | } |
427 | if(friendlist[i].status == 2 || friendlist[i].status == 3) /* friend is not online */ | 427 | if(friendlist[i].status == 2 || friendlist[i].status == 3) /* friend is not online */ |
428 | { | 428 | { |
429 | if(friendlist[i].status == 2) | ||
430 | { | ||
431 | if(friendlist[i].friend_request_id + 10 < unix_time()) /*I know this is hackish but it should work.*/ | ||
432 | { | ||
433 | send_friendrequest(friendlist[i].client_id, friendlist[i].info, friendlist[i].info_size); | ||
434 | friendlist[i].friend_request_id = unix_time(); | ||
435 | |||
436 | } | ||
437 | } | ||
429 | IP_Port friendip = DHT_getfriendip(friendlist[i].client_id); | 438 | IP_Port friendip = DHT_getfriendip(friendlist[i].client_id); |
430 | switch(is_cryptoconnected(friendlist[i].crypt_connection_id)) | 439 | switch(is_cryptoconnected(friendlist[i].crypt_connection_id)) |
431 | { | 440 | { |