mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +02:00
irc: improve split of privmsg, add split of some other messages (bug #29879), add new info_hashtable "irc_message_split", split irc messages in relay plugin
List of new features/bugs fixed: - improve split of privmsg: keep CTCP in split - add split of messages: ison, join, notice, wallops, 005, 353 - add new info_hashtable "irc_message_split" (for plugins/scripts) - in relay plugin: split irc messages sent to clients of irc proxy
This commit is contained in:
@@ -1908,9 +1908,9 @@ IRC_PROTOCOL_CALLBACK(001)
|
||||
|
||||
IRC_PROTOCOL_CALLBACK(005)
|
||||
{
|
||||
char *pos, *pos2, *pos_start;
|
||||
int length_isupport, length;
|
||||
|
||||
char *pos, *pos2, *pos_start, *error;
|
||||
int length_isupport, length, nick_max_length;
|
||||
|
||||
/*
|
||||
* 005 message looks like:
|
||||
* :server 005 mynick MODES=4 CHANLIMIT=#:20 NICKLEN=16 USERLEN=10
|
||||
@@ -1938,6 +1938,22 @@ IRC_PROTOCOL_CALLBACK(005)
|
||||
pos2[0] = ' ';
|
||||
}
|
||||
|
||||
/* save max nick length */
|
||||
pos = strstr (argv_eol[3], "NICKLEN=");
|
||||
if (pos)
|
||||
{
|
||||
pos += 8;
|
||||
pos2 = strchr (pos, ' ');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
error = NULL;
|
||||
nick_max_length = (int)strtol (pos, &error, 10);
|
||||
if (error && !error[0] && (nick_max_length > 0))
|
||||
server->nick_max_length = nick_max_length;
|
||||
if (pos2)
|
||||
pos2[0] = ' ';
|
||||
}
|
||||
|
||||
/* save whole message (concatenate to existing isupport, if any) */
|
||||
pos_start = NULL;
|
||||
pos = strstr (argv_eol[3], " :");
|
||||
|
||||
Reference in New Issue
Block a user