summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/nTox.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index 29726a3a..ff8f8caf 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -172,13 +172,17 @@ void line_eval(char lines[HISTORY][STRING_LENGTH], char *line)
172 else if (inpt_command == 'a') { 172 else if (inpt_command == 'a') {
173 uint8_t numf = atoi(line + 3); 173 uint8_t numf = atoi(line + 3);
174 char numchar[100]; 174 char numchar[100];
175 sprintf(numchar, "[i] friend request %u accepted", numf);
176 new_lines(numchar);
177 int num = m_addfriend_norequest(pending_requests[numf]); 175 int num = m_addfriend_norequest(pending_requests[numf]);
178 sprintf(numchar, "[i] added friendnumber %d", num); 176 if (num != -1) {
179 new_lines(numchar); 177 sprintf(numchar, "[i] friend request %u accepted", numf);
178 new_lines(numchar);
179 sprintf(numchar, "[i] added friendnumber %d", num);
180 new_lines(numchar);
181 } else {
182 sprintf(numchar, "[i] failed to add friend");
183 new_lines(numchar);
184 }
180 do_refresh(); 185 do_refresh();
181
182 } 186 }
183 else if (inpt_command == 'h') { //help 187 else if (inpt_command == 'h') { //help
184 new_lines("[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)"); 188 new_lines("[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)");