summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-03-07 21:49:07 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-03-07 21:49:07 +0100
commiteb5e54602ebc249e084568023a941771039c2431 (patch)
treeccb9591483dd5c152764f17b16d69eebf824f03b
parentda50ac329ae4cbeeaaf9d603571ddd5f82aa18d4 (diff)
downloadweechat-eb5e54602ebc249e084568023a941771039c2431.zip
Fix extraction and check of IRC prefix
-rw-r--r--src/plugins/irc/irc-mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-mode.c b/src/plugins/irc/irc-mode.c
index c68dbc781..6613d1371 100644
--- a/src/plugins/irc/irc-mode.c
+++ b/src/plugins/irc/irc-mode.c
@@ -389,7 +389,7 @@ irc_mode_get_nick_prefix (struct t_irc_server *server, char *mode,
if (mode && ptr_prefixes)
{
pos_mode = strchr (server->prefix + 1, mode[0]);
- if (pos_mode)
+ if (pos_mode && (pos_mode < ptr_prefixes))
{
index = pos_mode - server->prefix - 1;
if (pos_mode && (index < (int)strlen (ptr_prefixes)))