summaryrefslogtreecommitdiffstats
path: root/mbbsd/chat.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-12 14:34:48 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-12 14:34:48 +0800
commit342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a (patch)
tree586c81e63bead5e3d53e949ce58fe08a14363563 /mbbsd/chat.c
parent99b2798415929b6406c738ee233c9e030ff8edaa (diff)
downloadpttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.tar
pttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.tar.gz
pttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.tar.bz2
pttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.tar.lz
pttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.tar.xz
pttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.tar.zst
pttbbs-342798eaaaf77f2cea73bd5c36f3a6ce65d9a95a.zip
- bbs: X (recommend) on vote_post should do like 'y' -- reply vote.
- config: always FAST_LOGIN. - (internal) mbbsd: speed up task before getnewutmpent to prevent multi login - (internal) chat: refine /b and /ban test code git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4302 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chat.c')
-rw-r--r--mbbsd/chat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index b513311d..2904f2d4 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -145,7 +145,6 @@ chat_help(char *arg)
chathelp("[/w]all", "廣播 (站長專用)");
chathelp(" /ban <userid>", "拒絕 <userid> 再次進入此聊天室 (加入黑名單)");
chathelp(" /unban <userid>", "把 <userid> 移出黑名單");
- // chathelp(" /ban <id>", "拒絕 <id> 再次進入此談天室");
} else {
chathelp(" /help op", "談天室管理員專用指令");
chathelp("[//]help", "MUD-like 社交動詞");
@@ -479,10 +478,17 @@ t_chat(void)
vgetstring(inbuf, 68, VGET_TRANSPARENT, "", &vge, &vgetparam);
// quick check for end flag or exit command.
- if (!chatting ||
- (strncasecmp(inbuf, "/b", 2) == 0 && strncasecmp(inbuf, "/ban", 4) != 0))
+ if (!chatting)
break;
+ if (strncasecmp(inbuf, "/b", 2) == 0)
+ {
+ // cases: /b, /bye, "/b "
+ // !cases: /ban
+ if (tolower(inbuf[2]) != 'a')
+ break;
+ }
+
// quick continue for empty input
if (!*inbuf)
continue;