mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 06:23:02 +01:00
a couple formatting fixes
This commit is contained in:
parent
76c21c8b34
commit
1bd880708b
@ -33,7 +33,7 @@ void cmd_set_title(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
|
|||||||
char title[MAX_STR_SIZE];
|
char title[MAX_STR_SIZE];
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
snprintf(title, sizeof(title), "Group title: %s", self->name);
|
snprintf(title, sizeof(title), "Title is set to: %s", self->name);
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, MAGENTA, title);
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, MAGENTA, title);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ void cmd_set_title(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
|
|||||||
uint16_t sn_len = tox_get_self_name(m, (uint8_t *) selfnick);
|
uint16_t sn_len = tox_get_self_name(m, (uint8_t *) selfnick);
|
||||||
selfnick[sn_len] = '\0';
|
selfnick[sn_len] = '\0';
|
||||||
|
|
||||||
line_info_add(self, timefrmt, selfnick, title, NAME_CHANGE, 0, 0, " changed the group title to ");
|
line_info_add(self, timefrmt, selfnick, NULL, NAME_CHANGE, 0, 0, " set the group title to: %s", title);
|
||||||
|
|
||||||
char tmp_event[MAX_STR_SIZE];
|
char tmp_event[MAX_STR_SIZE];
|
||||||
snprintf(tmp_event, sizeof(tmp_event), "set title to %s", title);
|
snprintf(tmp_event, sizeof(tmp_event), "set title to %s", title);
|
||||||
|
@ -285,20 +285,18 @@ static void groupchat_onGroupTitleChange(ToxWindow *self, Tox *m, int groupnum,
|
|||||||
|
|
||||||
set_window_title(self, title, length);
|
set_window_title(self, title, length);
|
||||||
|
|
||||||
char event[MAX_STR_SIZE];
|
|
||||||
char timefrmt[TIME_STR_SIZE];
|
char timefrmt[TIME_STR_SIZE];
|
||||||
get_time_str(timefrmt, sizeof(timefrmt));
|
get_time_str(timefrmt, sizeof(timefrmt));
|
||||||
|
|
||||||
/* announce title when we join the room */
|
/* announce title when we join the room */
|
||||||
if (!timed_out(groupchats[self->num].start_time, get_unix_time(), GROUP_EVENT_WAIT)) {
|
if (!timed_out(groupchats[self->num].start_time, get_unix_time(), GROUP_EVENT_WAIT)) {
|
||||||
snprintf(event, sizeof(event), "Title set to: %s", title);
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, MAGENTA, "Title is set to: %s", title);
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, MAGENTA, event);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char nick[TOX_MAX_NAME_LENGTH];
|
char nick[TOX_MAX_NAME_LENGTH];
|
||||||
get_group_nick_truncate(m, nick, peernum, groupnum);
|
get_group_nick_truncate(m, nick, peernum, groupnum);
|
||||||
line_info_add(self, timefrmt, nick, title, NAME_CHANGE, 0, 0, (char *) "changed the group title to");
|
line_info_add(self, timefrmt, nick, NULL, NAME_CHANGE, 0, 0, " set the group title to: %s", title);
|
||||||
|
|
||||||
char tmp_event[MAX_STR_SIZE];
|
char tmp_event[MAX_STR_SIZE];
|
||||||
snprintf(tmp_event, sizeof(tmp_event), "set title to %s", title);
|
snprintf(tmp_event, sizeof(tmp_event), "set title to %s", title);
|
||||||
|
Loading…
Reference in New Issue
Block a user