From d0b4fa56a3f8334cfffce45a9eadfcd8143f7944 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 22 Jul 2013 17:02:32 -0400 Subject: Friend requests should be better. --- core/Messenger.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/Messenger.c') 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() } 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)) { -- cgit v1.2.3