diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/nTox_win32.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c index 71a291c6..3a9caaf5 100644 --- a/testing/nTox_win32.c +++ b/testing/nTox_win32.c | |||
@@ -37,7 +37,7 @@ void do_header() | |||
37 | system("cls"); | 37 | system("cls"); |
38 | printf(users_id); | 38 | printf(users_id); |
39 | printf("\n---------------------------------"); | 39 | printf("\n---------------------------------"); |
40 | printf("\n[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status), /n nick (to change nickname), /l (lists friends), /q (to quit), /r (reset screen)"); | 40 | printf("\n[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status), /n nick (to change nickname), /l (lists friends), /d friendnumber (deletes friend), /q (to quit), /r (reset screen)"); |
41 | printf("\n---------------------------------"); | 41 | printf("\n---------------------------------"); |
42 | } | 42 | } |
43 | 43 | ||
@@ -149,7 +149,16 @@ void line_eval(char* line) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | else if (line[1] == 'd') { | 151 | else if (line[1] == 'd') { |
152 | doMessenger(); | 152 | size_t len = strlen(line); |
153 | char numstring[len-3]; | ||
154 | int i; | ||
155 | for (i=0; i<len; i++) { | ||
156 | if (line[i+3] != ' ') { | ||
157 | numstring[i] = line[i+3]; | ||
158 | } | ||
159 | } | ||
160 | int num = atoi(numstring); | ||
161 | m_delfriend(num); | ||
153 | } | 162 | } |
154 | /* Send message to friend */ | 163 | /* Send message to friend */ |
155 | else if (line[1] == 'm') { | 164 | else if (line[1] == 'm') { |