summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-30 14:43:42 -0700
committerirungentoo <irungentoo@gmail.com>2013-07-30 14:43:42 -0700
commitf1486e5092c35d1220056142b1751e1f18895f6b (patch)
tree8a94f6f9361053237caca4a46d93ee2dfbf7c70a /testing/nTox.c
parentee1a0f5accf5d972a00274c9937d60a2abe911c5 (diff)
parent3edb2f1f1277d9fce93d2c02e61e62a85ff0ca30 (diff)
Merge pull request #178 from theshadowfog/patch-3
Update nTox.c
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c24
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);