mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-15 06:23:02 +01:00
fix formatting bug
This commit is contained in:
parent
6f45085d86
commit
38e55d55b3
@ -612,7 +612,7 @@ static void send_group_message(ToxWindow *self, Tox *m, int groupnum, const char
|
|||||||
|
|
||||||
if (tox_group_message_send(m, self->num, (uint8_t *) msg, strlen(msg)) == -1) {
|
if (tox_group_message_send(m, self->num, (uint8_t *) msg, strlen(msg)) == -1) {
|
||||||
const char *errmsg = " * Failed to send message.";
|
const char *errmsg = " * Failed to send message.";
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, RED, errmsg);
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, RED, "%s", errmsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -623,7 +623,7 @@ static void send_group_message(ToxWindow *self, Tox *m, int groupnum, const char
|
|||||||
char timefrmt[TIME_STR_SIZE];
|
char timefrmt[TIME_STR_SIZE];
|
||||||
get_time_str(timefrmt, sizeof(timefrmt));
|
get_time_str(timefrmt, sizeof(timefrmt));
|
||||||
|
|
||||||
line_info_add(self, timefrmt, selfname, NULL, OUT_MSG_READ, 0, 0, msg);
|
line_info_add(self, timefrmt, selfname, NULL, OUT_MSG_READ, 0, 0, "%s", msg);
|
||||||
write_to_log(msg, selfname, ctx->log, false);
|
write_to_log(msg, selfname, ctx->log, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -638,7 +638,7 @@ static void send_group_action(ToxWindow *self, Tox *m, int groupnum, char *actio
|
|||||||
|
|
||||||
if (tox_group_action_send(m, groupnum, (uint8_t *) action, strlen(action)) == -1) {
|
if (tox_group_action_send(m, groupnum, (uint8_t *) action, strlen(action)) == -1) {
|
||||||
const char *errmsg = " * Failed to send action.";
|
const char *errmsg = " * Failed to send action.";
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, RED, errmsg);
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, RED, "%s", errmsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ static void send_group_action(ToxWindow *self, Tox *m, int groupnum, char *actio
|
|||||||
char timefrmt[TIME_STR_SIZE];
|
char timefrmt[TIME_STR_SIZE];
|
||||||
get_time_str(timefrmt, sizeof(timefrmt));
|
get_time_str(timefrmt, sizeof(timefrmt));
|
||||||
|
|
||||||
line_info_add(self, timefrmt, selfname, NULL, OUT_ACTION_READ, 0, 0, action);
|
line_info_add(self, timefrmt, selfname, NULL, OUT_ACTION_READ, 0, 0, "%s", action);
|
||||||
write_to_log(action, selfname, ctx->log, true);
|
write_to_log(action, selfname, ctx->log, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,8 +733,8 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
|
|||||||
|
|
||||||
close_groupchat(self, m, self->num, line + offset, ctx->len - offset);
|
close_groupchat(self, m, self->num, line + offset, ctx->len - offset);
|
||||||
return;
|
return;
|
||||||
} else if (strncmp(line, "/me ", strlen("/me ")) == 0) {
|
} else if (strncmp(line, "/me ", 4) == 0) {
|
||||||
send_group_action(self, m, self->num, line + strlen("/me "));
|
send_group_action(self, m, self->num, line + 4);
|
||||||
} else {
|
} else {
|
||||||
execute(ctx->history, self, m, line, GROUPCHAT_COMMAND_MODE);
|
execute(ctx->history, self, m, line, GROUPCHAT_COMMAND_MODE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user