From 52dc9cb4b3264d1703b4b8ac4e792e07bad04615 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 27 Jul 2012 14:54:11 +0000 Subject: fix xchatd id test git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5691 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/util/xchatd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pttbbs/util/xchatd.c b/pttbbs/util/xchatd.c index bf148b4f..a97828c9 100644 --- a/pttbbs/util/xchatd.c +++ b/pttbbs/util/xchatd.c @@ -315,6 +315,9 @@ debug_room() static int valid_chatid(register char *id) { register int ch, len; + if (DBCS_strcasestr(id, "กป") || + DBCS_strcasestr(id, "กฐ")) + return 0; for(len = 0; (ch = *id); id++) { /* Thor: check for endless */ if(ch == '/' || ch == '*' || ch == ':') @@ -322,9 +325,6 @@ static int valid_chatid(register char *id) { if(++len > 8) return 0; } - if (DBCS_strcasestr(id, "กป") || - DBCS_strcasestr(id, "กฐ")) - return 0; return len; } -- cgit v1.2.3