summaryrefslogtreecommitdiffstats
path: root/mbbsd/chat.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-11 23:04:29 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-11 23:04:29 +0800
commit5a07030f13bacf160ce9c068f6c3b2b68fa72d25 (patch)
tree7d733927e7932a91d3214afb22b18a04a128c0e8 /mbbsd/chat.c
parent7be678a70a3718dcda2e036b6812654cfa49ff11 (diff)
downloadpttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.tar
pttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.tar.gz
pttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.tar.bz2
pttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.tar.lz
pttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.tar.xz
pttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.tar.zst
pttbbs-5a07030f13bacf160ce9c068f6c3b2b68fa72d25.zip
- chat: add /ban and /unban commands
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4298 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chat.c')
-rw-r--r--mbbsd/chat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index 3af6f4f6..b513311d 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -143,6 +143,8 @@ chat_help(char *arg)
chathelp("[/o]p <id>", "將 Op 的權力轉移給 <id>");
chathelp("[/t]opic <text>", "換個話題");
chathelp("[/w]all", "廣播 (站長專用)");
+ chathelp(" /ban <userid>", "拒絕 <userid> 再次進入此聊天室 (加入黑名單)");
+ chathelp(" /unban <userid>", "把 <userid> 移出黑名單");
// chathelp(" /ban <id>", "拒絕 <id> 再次進入此談天室");
} else {
chathelp(" /help op", "談天室管理員專用指令");
@@ -477,7 +479,8 @@ t_chat(void)
vgetstring(inbuf, 68, VGET_TRANSPARENT, "", &vge, &vgetparam);
// quick check for end flag or exit command.
- if (!chatting || strncmp(inbuf, "/b", 2) == 0)
+ if (!chatting ||
+ (strncasecmp(inbuf, "/b", 2) == 0 && strncasecmp(inbuf, "/ban", 4) != 0))
break;
// quick continue for empty input