summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-08 21:40:02 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-08 21:40:02 +0800
commit1d84398b8b81f1fecf791d95145e257dfe34b403 (patch)
treeaab36a9e60fab691e8ed28ba31833168adaadf87
parent84cfb62a0e72363c239f0d85c6c568388c8f7f14 (diff)
downloadpttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.tar
pttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.tar.gz
pttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.tar.bz2
pttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.tar.lz
pttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.tar.xz
pttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.tar.zst
pttbbs-1d84398b8b81f1fecf791d95145e257dfe34b403.zip
- (internal) migrate to new getdata() API names
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4101 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/talk.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index aebf3fd4..c51cc2a4 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -680,15 +680,15 @@ my_write2(void)
snprintf(genbuf, sizeof(genbuf), "攻擊 %s:", tw->userid);
i = WATERBALL_CONFIRM;
} else if (tw->msg[0].msgmode == MSGMODE_TOANGEL) {
- strcpy(genbuf, "回答小主人:");
+ strlcpy(genbuf, "回答小主人:", sizeof(genbuf));
i = WATERBALL_CONFIRM_ANSWER;
} else { /* tw->msg[0].msgmode == MSGMODE_FROMANGEL */
- strcpy(genbuf, "再問他一次:");
+ strlcpy(genbuf, "再問他一次:", sizeof(genbuf));
i = WATERBALL_CONFIRM_ANGEL;
}
#endif
- if (!oldgetdata(0, 0, genbuf, msg,
- 80 - strlen(tw->userid) - 6, DOECHO))
+ if (!getdata_str(0, 0, genbuf, msg,
+ 80 - strlen(tw->userid) - 6, DOECHO, genbuf))
break;
if (my_write(tw->pid, msg, tw->userid, i, tw->uin))
@@ -3042,16 +3042,8 @@ userlist(void)
case 'N':
if (HasUserPerm(PERM_LOGINOK)) {
char tmp_nick[sizeof(cuser.nickname)];
- // XXX why do so many copy here?
- // why not just use cuser.nickname?
- // XXX old code forget to initialize.
- // will changing to init everytime cause user
- // complain?
-
- strlcpy(tmp_nick, currutmp->nickname, sizeof(cuser.nickname));
-
- if (oldgetdata(1, 0, "新的暱稱: ",
- tmp_nick, sizeof(tmp_nick), DOECHO) > 0)
+ if (getdata_str(1, 0, "新的暱稱: ",
+ tmp_nick, sizeof(tmp_nick), DOECHO, cuser.nickname) > 0)
{
strlcpy(cuser.nickname, tmp_nick, sizeof(cuser.nickname));
strcpy(currutmp->nickname, cuser.nickname);