mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
commit
c3b5fe3fa1
|
@ -137,6 +137,26 @@ static void execute(ToxWindow* self, char* cmd) {
|
|||
wprintw(self->window, "Friend added as %d.\n", num);
|
||||
on_friendadded(num);
|
||||
}
|
||||
else if(!strcmp(cmd, "help")) {
|
||||
wattron(self->window, COLOR_PAIR(2) | A_BOLD);
|
||||
wprintw(self->window, "Commands:\n");
|
||||
wattroff(self->window, A_BOLD);
|
||||
|
||||
wprintw(self->window, " connect <ip> <port> <key> : Connect to DHT server\n");
|
||||
wprintw(self->window, " add <id> <message> : Add friend\n");
|
||||
wprintw(self->window, " status <message> : Set your status\n");
|
||||
wprintw(self->window, " nick <nickname> : Set your nickname\n");
|
||||
wprintw(self->window, " accept <number> : Accept friend request\n");
|
||||
wprintw(self->window, " myid : Print your ID\n");
|
||||
wprintw(self->window, " quit/exit : Exit program\n");
|
||||
|
||||
|
||||
wattron(self->window, A_BOLD);
|
||||
wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n");
|
||||
wattroff(self->window, A_BOLD);
|
||||
|
||||
wattroff(self->window, COLOR_PAIR(2));
|
||||
}
|
||||
else if(!strncmp(cmd, "status ", strlen("status "))) {
|
||||
char* msg;
|
||||
|
||||
|
@ -292,6 +312,7 @@ static void print_usage(ToxWindow* self) {
|
|||
wprintw(self->window, " accept <number> : Accept friend request\n");
|
||||
wprintw(self->window, " myid : Print your ID\n");
|
||||
wprintw(self->window, " quit/exit : Exit program\n");
|
||||
wprintw(self->window, " help : Print this message again\n");
|
||||
|
||||
|
||||
wattron(self->window, A_BOLD);
|
||||
|
|
Loading…
Reference in New Issue
Block a user