summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-22 23:32:10 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-22 23:32:10 +0800
commit147904d69739fa27a6f181e9e7493ea4462b470c (patch)
tree38e5c24b0733d14619a01c48f8cecf384b3c1ac9 /mbbsd
parent08a75940277b9251d03d7724926b75bd47e0cd2e (diff)
downloadpttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.tar
pttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.tar.gz
pttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.tar.bz2
pttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.tar.lz
pttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.tar.xz
pttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.tar.zst
pttbbs-147904d69739fa27a6f181e9e7493ea4462b470c.zip
use strncasecmp instead strcasestr for checking if userid has fuck or shitJaky.i18n@1807
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1807 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/register.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c
index 7e76e897..9e6c60b3 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -64,8 +64,10 @@ bad_user_id(char *userid)
if (strcasecmp(userid, str_new) == 0)
return 1;
- if (strcasestr(userid, "fuck") != NULL ||
- strcasestr(userid, "shit") != NULL )
+ /* in2: 原本是用strcasestr,
+ 不過有些人中間剛剛好出現這個字應該還算合理吧? */
+ if( strncasecmp(userid, "fuck", 4) == 0 ||
+ strncasecmp(userid, "shit", 4) == 0 )
return 1;
/*