diff options
-rw-r--r-- | testing/toxic/prompt.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index e18bdff0..3c4a27dd 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c | |||
@@ -16,6 +16,7 @@ uint8_t pending_requests[256][CLIENT_ID_SIZE]; // XXX | |||
16 | uint8_t num_requests=0; // XXX | 16 | uint8_t num_requests=0; // XXX |
17 | 17 | ||
18 | extern void on_friendadded(int friendnumber); | 18 | extern void on_friendadded(int friendnumber); |
19 | static void print_usage(ToxWindow* self); | ||
19 | 20 | ||
20 | // XXX: | 21 | // XXX: |
21 | int add_req(uint8_t* public_key) { | 22 | int add_req(uint8_t* public_key) { |
@@ -138,24 +139,7 @@ static void execute(ToxWindow* self, char* cmd) { | |||
138 | on_friendadded(num); | 139 | on_friendadded(num); |
139 | } | 140 | } |
140 | else if(!strcmp(cmd, "help")) { | 141 | else if(!strcmp(cmd, "help")) { |
141 | wattron(self->window, COLOR_PAIR(2) | A_BOLD); | 142 | print_usage(self); |
142 | wprintw(self->window, "Commands:\n"); | ||
143 | wattroff(self->window, A_BOLD); | ||
144 | |||
145 | wprintw(self->window, " connect <ip> <port> <key> : Connect to DHT server\n"); | ||
146 | wprintw(self->window, " add <id> <message> : Add friend\n"); | ||
147 | wprintw(self->window, " status <message> : Set your status\n"); | ||
148 | wprintw(self->window, " nick <nickname> : Set your nickname\n"); | ||
149 | wprintw(self->window, " accept <number> : Accept friend request\n"); | ||
150 | wprintw(self->window, " myid : Print your ID\n"); | ||
151 | wprintw(self->window, " quit/exit : Exit program\n"); | ||
152 | |||
153 | |||
154 | wattron(self->window, A_BOLD); | ||
155 | wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n"); | ||
156 | wattroff(self->window, A_BOLD); | ||
157 | |||
158 | wattroff(self->window, COLOR_PAIR(2)); | ||
159 | } | 143 | } |
160 | else if(!strncmp(cmd, "status ", strlen("status "))) { | 144 | else if(!strncmp(cmd, "status ", strlen("status "))) { |
161 | char* msg; | 145 | char* msg; |