mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
parent
91d883c4a4
commit
b471236c50
|
@ -51,6 +51,7 @@ static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len)
|
|||
|
||||
wattron(ctx->history, COLOR_PAIR(2));
|
||||
wprintw(ctx->history, "%02d:%02d:%02d ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
|
||||
wattroff(ctx->history, COLOR_PAIR(2));
|
||||
wattron(ctx->history, COLOR_PAIR(4));
|
||||
wprintw(ctx->history, "%s: ", nick);
|
||||
wattroff(ctx->history, COLOR_PAIR(4));
|
||||
|
@ -116,6 +117,7 @@ static void chat_onKey(ToxWindow* self, int key) {
|
|||
/* make sure the string has at least non-space character */
|
||||
wattron(ctx->history, COLOR_PAIR(2));
|
||||
wprintw(ctx->history, "%02d:%02d:%02d ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
|
||||
wattroff(ctx->history, COLOR_PAIR(2));
|
||||
wattron(ctx->history, COLOR_PAIR(1));
|
||||
wprintw(ctx->history, "you: ", ctx->line);
|
||||
wattroff(ctx->history, COLOR_PAIR(1));
|
||||
|
@ -254,6 +256,6 @@ ToxWindow new_chat(int friendnum) {
|
|||
x->friendnum = friendnum;
|
||||
|
||||
ret.x = (void*) x;
|
||||
|
||||
free(x);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,9 @@ static void execute(ToxWindow* self, char* cmd) {
|
|||
}
|
||||
|
||||
dht.ip.i = resolved_address;
|
||||
DHT_bootstrap(dht, hex_string_to_bin(key));
|
||||
unsigned char *binary_string = hex_string_to_bin(key);
|
||||
DHT_bootstrap(dht, binary_string);
|
||||
free(binary_string);
|
||||
}
|
||||
else if(!strncmp(cmd, "add ", strlen("add "))) {
|
||||
uint8_t id_bin[32];
|
||||
|
|
Loading…
Reference in New Issue
Block a user