From fc1b8aa331cc84544c5253bcb02729a0a028da17 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 11 May 2011 21:05:51 +0300 Subject: [PATCH 3/4] Use idle_muc_channel_is_typechar --- src/idle-handles.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/idle-handles.c b/src/idle-handles.c index fd5cea0..8a05028 100644 --- a/src/idle-handles.c +++ b/src/idle-handles.c @@ -29,6 +29,7 @@ #define IDLE_DEBUG_FLAG IDLE_DEBUG_PARSER #include "idle-debug.h" +#include "idle-muc-channel.h" /* When strict_mode is true, we validate the nick strictly against the IRC * RFCs (e.g. only ascii characters, no leading '-'. When strict_mode is @@ -92,7 +93,7 @@ gboolean idle_nickname_is_valid(const gchar *nickname, gboolean strict_mode) { static gboolean _channelname_is_valid(const gchar *channel) { static const gchar not_allowed_chars[] = {' ', '\007', ',', '\r', '\n', ':', '\0'}; - if ((channel[0] != '#') && (channel[0] != '!') && (channel[0] != '&') && (channel[0] != '+')) + if (!idle_muc_channel_is_typechar(channel[0])) return FALSE; gsize len = strlen(channel); -- 1.7.4.4