mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-05 18:16:46 +02:00
Make test clients compatible with userstatus kinds
No features were added, just fixed callbacks.
This commit is contained in:
8
prompt.c
8
prompt.c
@ -91,7 +91,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
dht.ip.i = resolved_address;
|
||||
unsigned char *binary_string = hex_string_to_bin(key);
|
||||
DHT_bootstrap(dht, binary_string);
|
||||
free(binary_string);
|
||||
free(binary_string);
|
||||
}
|
||||
else if(!strncmp(cmd, "add ", strlen("add "))) {
|
||||
uint8_t id_bin[32];
|
||||
@ -137,7 +137,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
|
||||
num = m_addfriend(id_bin, (uint8_t*) msg, strlen(msg)+1);
|
||||
switch (num) {
|
||||
case -1:
|
||||
case -1:
|
||||
wprintw(self->window, "Message is too long.\n");
|
||||
break;
|
||||
case -2:
|
||||
@ -151,7 +151,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
break;
|
||||
case -5:
|
||||
wprintw(self->window, "Undefined error when adding friend.\n");
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
wprintw(self->window, "Friend added as %d.\n", num);
|
||||
on_friendadded(num);
|
||||
@ -172,7 +172,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
}
|
||||
msg++;
|
||||
|
||||
m_set_userstatus((uint8_t*) msg, strlen(msg)+1);
|
||||
m_set_userstatus(USERSTATUS_KIND_RETAIN, (uint8_t*) msg, strlen(msg)+1);
|
||||
wprintw(self->window, "Status set to: %s\n", msg);
|
||||
}
|
||||
else if(!strncmp(cmd, "nick ", strlen("nick "))) {
|
||||
|
Reference in New Issue
Block a user