summaryrefslogtreecommitdiff
path: root/src/irc/irc-mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/irc-mode.c')
-rw-r--r--src/irc/irc-mode.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/irc/irc-mode.c b/src/irc/irc-mode.c
index cc1cd243c..ba76c7dfc 100644
--- a/src/irc/irc-mode.c
+++ b/src/irc/irc-mode.c
@@ -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);
}