mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-06 19:46:35 +01:00
chat window deleting and re-adding - it just werks
This commit is contained in:
9
prompt.c
9
prompt.c
@@ -158,7 +158,9 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (!strcmp(cmd, "clear")) {
|
||||
wclear(self->window);
|
||||
}
|
||||
else if(!strcmp(cmd, "help")) {
|
||||
print_usage(self);
|
||||
}
|
||||
@@ -254,9 +256,6 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
wprintw(self->window, "Message successfully sent.\n");
|
||||
}
|
||||
}
|
||||
else if (!strncmp(cmd, "clear", strlen("clear"))) {
|
||||
wclear(self->window);
|
||||
}
|
||||
else {
|
||||
wprintw(self->window, "Invalid command.\n");
|
||||
}
|
||||
@@ -316,7 +315,7 @@ static void print_usage(ToxWindow* self) {
|
||||
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, " clear : Clear the screen\n");
|
||||
wprintw(self->window, " clear : Clear this window\n");
|
||||
wprintw(self->window, " quit/exit : Exit program\n");
|
||||
wprintw(self->window, " help : Print this message again\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user