1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 10:13:12 +02:00

Fixed parsing of command "353" when prefixes were not received from server

This commit is contained in:
Sebastien Helleu
2007-08-14 14:42:10 +00:00
parent 57ceaba3d1
commit 0c8867c9e3
4 changed files with 20 additions and 6 deletions
+9 -3
View File
@@ -298,9 +298,15 @@ irc_mode_user_set (t_irc_server *server, char *modes)
int
irc_mode_nick_prefix_allowed (t_irc_server *server, char prefix)
{
/* if server did not send any prefix info, then consider this prefix is allowed */
char str[2];
/* if server did not send any prefix info, then use default prefixes */
if (!server->prefix)
return 1;
{
str[0] = prefix;
str[1] = '\0';
return (strpbrk (str, IRC_DEFAULT_PREFIXES_LIST)) ? 1 : 0;
}
return (strchr (server->prefix, prefix) != NULL);
}
+1
View File
@@ -53,6 +53,7 @@
#define PREFIX_SEND_MOD "<=="
#define IRC_DEFAULT_PORT 6667
#define IRC_DEFAULT_PREFIXES_LIST "@%+~&!-"
/* nick types */
+9 -3
View File
@@ -298,9 +298,15 @@ irc_mode_user_set (t_irc_server *server, char *modes)
int
irc_mode_nick_prefix_allowed (t_irc_server *server, char prefix)
{
/* if server did not send any prefix info, then consider this prefix is allowed */
char str[2];
/* if server did not send any prefix info, then use default prefixes */
if (!server->prefix)
return 1;
{
str[0] = prefix;
str[1] = '\0';
return (strpbrk (str, IRC_DEFAULT_PREFIXES_LIST)) ? 1 : 0;
}
return (strchr (server->prefix, prefix) != NULL);
}
+1
View File
@@ -53,6 +53,7 @@
#define PREFIX_SEND_MOD "<=="
#define IRC_DEFAULT_PORT 6667
#define IRC_DEFAULT_PREFIXES_LIST "@%+~&!-"
/* nick types */