diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-04-11 21:54:33 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-04-21 20:23:35 -0300 |
commit | 5f137d2c81878c41aa3b893fb56b1116bc27bc78 (patch) | |
tree | 2d6eadb2474e2d7b234b3dda9efd7559335adce7 /src/common/modes.c | |
parent | e2cfba040e26927b94a4e311a0a61365a81a41b1 (diff) | |
parent | 133f62806441a5db1156653aa1f077d2e8deeb34 (diff) |
Merge upstream changes
Diffstat (limited to 'src/common/modes.c')
-rw-r--r-- | src/common/modes.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/modes.c b/src/common/modes.c index 82b466cb..756f0858 100644 --- a/src/common/modes.c +++ b/src/common/modes.c @@ -67,8 +67,8 @@ send_channel_modes (session *sess, char *tbuf, char *word[], int wpos, int usable_modes, orig_len, len, wlen, i, max; server *serv = sess->server; - /* sanity check. IRC RFC says three per line. */ - if (serv->modes_per_line < 3) + /* sanity check. IRC RFC says three per line but some servers may support less. */ + if (serv->modes_per_line < 1) serv->modes_per_line = 3; if (modes_per_line < 1) modes_per_line = serv->modes_per_line; @@ -880,7 +880,7 @@ inbound_005 (server * serv, char *word[], const message_tags_data *tags_data) g_free (serv->nick_prefixes); g_free (serv->nick_modes); serv->nick_prefixes = g_strdup (pre + 1); - serv->nick_modes = g_strdup (tokvalue); + serv->nick_modes = g_strdup (tokvalue + 1); } else { /* bad! some ircds don't give us the modes. */ @@ -913,6 +913,9 @@ inbound_005 (server * serv, char *word[], const message_tags_data *tags_data) { server_set_encoding (serv, "UTF-8"); } + } else if (g_strcmp0 (tokname, "UTF8ONLY") == 0) + { + server_set_encoding (serv, "UTF-8"); } else if (g_strcmp0 (tokname, "NAMESX") == 0) { /* 12345678901234567 */ |