diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/nTox.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/testing/nTox.c b/testing/nTox.c index 9876f4ba..a12d6cf0 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -179,7 +179,29 @@ void line_eval(char lines[HISTORY][STRING_LENGTH], char *line) | |||
179 | new_lines("[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)"); | 179 | new_lines("[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)"); |
180 | new_lines("[i] /l list (list friends), /h for help, /n nick (to change nickname), /q (to quit)"); | 180 | new_lines("[i] /l list (list friends), /h for help, /n nick (to change nickname), /q (to quit)"); |
181 | } | 181 | } |
182 | 182 | ||
183 | else if (line[1] == 'i') { //info | ||
184 | char idstring0[200]; | ||
185 | char idstring1[32][5]; | ||
186 | char idstring2[32][5]; | ||
187 | uint32_t i; | ||
188 | for(i = 0; i < 32; i++) | ||
189 | { | ||
190 | if(self_public_key[i] < 16) | ||
191 | strcpy(idstring1[i],"0"); | ||
192 | else | ||
193 | strcpy(idstring1[i], ""); | ||
194 | sprintf(idstring2[i], "%hhX",self_public_key[i]); | ||
195 | } | ||
196 | // | ||
197 | strcpy(idstring0,"[i] ID: "); | ||
198 | for (i=0; i<32; i++) { | ||
199 | strcat(idstring0,idstring1[i]); | ||
200 | strcat(idstring0,idstring2[i]); | ||
201 | } | ||
202 | new_lines(idstring0); | ||
203 | } | ||
204 | |||
183 | else if (line[1] == 'q') { //exit | 205 | else if (line[1] == 'q') { //exit |
184 | endwin(); | 206 | endwin(); |
185 | exit(EXIT_SUCCESS); | 207 | exit(EXIT_SUCCESS); |