summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index 17f4b0e7..f7d929f2 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -106,24 +106,28 @@ void line_eval(char lines[HISTORY][STRING_LENGTH], char *line)
106 char temp_id[128]; 106 char temp_id[128];
107 for (i = 0; i < 128; i++) 107 for (i = 0; i < 128; i++)
108 temp_id[i] = line[i+prompt_offset]; 108 temp_id[i] = line[i+prompt_offset];
109
109 int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); 110 int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo"));
110 char numstring[100]; 111 char numstring[100];
111 switch (num) { 112 switch (num) {
112 case -1: 113 case -1:
113 sprintf(numstring, "[i] Incorrect key length"); 114 sprintf(numstring, "[i] Message is too long.");
114 break; 115 break;
115 case -2: 116 case -2:
116 sprintf(numstring, "[i] That appears to be your own key"); 117 sprintf(numstring, "[i] Please add a message to your request.");
117 break; 118 break;
118 case -3: 119 case -3:
119 sprintf(numstring, "[i] Friend request already sent"); 120 sprintf(numstring, "[i] That appears to be your own ID.");
120 break; 121 break;
121 case -4: 122 case -4:
122 sprintf(numstring, "[i] Could not add friend"); 123 sprintf(numstring, "[i] Friend request already sent.");
123 break; 124 break;
124 default: 125 case -5:
125 sprintf(numstring, "[i] Added friend %d", num); 126 sprintf(numstring, "[i] Undefined error when adding friend.");
126 break; 127 break;
128 default:
129 sprintf(numstring, "[i] Added friend as %d.", num);
130 break;
127 } 131 }
128 new_lines(numstring); 132 new_lines(numstring);
129 do_refresh(); 133 do_refresh();