diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-11-27 03:28:12 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-11-27 03:28:12 +0800 |
commit | 646c04559e8ddbd3d9d09fdeb0361435c8b8b272 (patch) | |
tree | d8a34cd9b0235d0a3163d113293c4ff58da4068d /mbbsd/talk.c | |
parent | 3d614cba97e739e95194150cb54063f0caf9f203 (diff) | |
download | pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.tar pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.tar.gz pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.tar.bz2 pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.tar.lz pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.tar.xz pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.tar.zst pttbbs-646c04559e8ddbd3d9d09fdeb0361435c8b8b272.zip |
Allow banning user from using angel function.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3250 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r-- | mbbsd/talk.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c index af9aad56..15165c07 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -3197,11 +3197,14 @@ talkreply(void) int t_changeangel(){ char buf[4]; - if( cuser.myangel[0] == 0 ) return 0; + + /* cuser.myangel == "-" means banned for calling angel */ + if (cuser.myangel[0] == 0 || cuser.myangel[0] == '-') return 0; + getdata(b_lines - 1, 0, "更換小天使後就無法換回了喔! 是否要更換小天使? [y/N]", buf, 3, LCECHO); - if( buf[0] == 'y' || buf[0] == 'Y' ){ + if (buf[0] == 'y' || buf[0] == 'Y') { cuser.myangel[0] = 0; outs("小天使更新完成,下次呼叫時會選出新的小天使"); } @@ -3352,6 +3355,11 @@ TalkToAngel(){ static int AngelPermChecked = 0; userec_t xuser; + if (strcmp(cuser.myangel, "-") == 0){ + AngelNotOnline(); + return; + } + if (cuser.myangel[0] && !AngelPermChecked) { getuser(cuser.myangel, &xuser); // XXX if user doesn't exist if (!(xuser.userlevel & PERM_ANGEL)) |