1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-11 05:06:35 +01:00

implement group status/nick changes, various fixes

This commit is contained in:
Jfreegman
2015-01-11 16:48:40 -05:00
parent b3ab0bde05
commit ff3da5f657
8 changed files with 113 additions and 49 deletions

View File

@@ -229,7 +229,7 @@ void on_group_peer_exit(Tox *m, int groupnumber, uint32_t peernumber, const uint
char msg[MAX_STR_SIZE + 1];
if (length == 0 || !partmsg) {
strcpy(msg, "Quit.");
strcpy(msg, "Quit");
length = 5;
} else {
length = copy_tox_str(msg, sizeof(msg), (const char *) partmsg, length);
@@ -260,10 +260,12 @@ void on_group_topic_change(Tox *m, int groupnumber, uint32_t peernumber, const u
void on_group_nick_change(Tox *m, int groupnumber, uint32_t peernumber, const uint8_t *newname, uint16_t length,
void *userdata)
{
fprintf(stderr, "newname before: %s. len: %d\n", newname, length);
char name[TOXIC_MAX_NAME_LENGTH + 1];
length = copy_tox_str(name, sizeof(name), (const char *) newname, length);
filter_str(name, length);
fprintf(stderr, "newname before: %s. len: %d\n", name, length);
int i;
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {