diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-13 16:00:07 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-13 16:00:07 +0800 |
commit | 9671494643c68203da5fcf777a3c61720d29000a (patch) | |
tree | bbdcf044d7dcbbd172f6f0a2ed65316e7b981565 /mbbsd | |
parent | 8601b22b64b7f524e299773a6915bbedb5f78ab4 (diff) | |
download | pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.gz pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.bz2 pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.lz pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.xz pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.zst pttbbs-9671494643c68203da5fcf777a3c61720d29000a.zip |
WARNING: THIS PATCHSET CHANGED SHM STRUCTURE. PLEASE READ UPDATING CAREFULLY.
- (internal) change IP/from sorting mechanism.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4307 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/mbbsd.c | 9 | ||||
-rw-r--r-- | mbbsd/talk.c | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index f907eae8..d3868532 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -962,6 +962,9 @@ setup_utmp(int mode) uinfo.sex = cuser.sex % 8; uinfo.lastact = time(NULL); + // only enable this after you've really changed talk.c to NOT use from_alias. + uinfo.from_ip = inet_addr(fromhost); + strlcpy(uinfo.userid, cuser.userid, sizeof(uinfo.userid)); strlcpy(uinfo.nickname, cuser.nickname, sizeof(uinfo.nickname)); strlcpy(uinfo.from, fromhost, sizeof(uinfo.from)); @@ -1024,7 +1027,11 @@ setup_utmp(int mode) } } # else // !FROMD - currutmp->from_alias = where(fromhost); + { + int desc = where(fromhost); + if (desc > 0) + strlcpy(currutmp->from, SHM->home_desc[desc], sizeof(currutmp->from)); + } # endif // !FROMD #endif // WHERE diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 1fc2085c..3ff0c00e 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1970,14 +1970,7 @@ descript(int show_mode, const userinfo_t * uentp, int diff) return friend_descript(uentp, description, sizeof(description)); case 0: return (((uentp->pager != PAGER_DISABLE && uentp->pager != PAGER_ANTIWB && diff) || - HasUserPerm(PERM_SYSOP)) ? -#ifdef WHERE - uentp->from_alias ? SHM->home_desc[uentp->from_alias] : - uentp->from -#else - uentp->from -#endif - : "*"); + HasUserPerm(PERM_SYSOP)) ? uentp->from : "*"); case 2: snprintf(description, sizeof(description), "%4d/%4d/%2d %c", uentp->five_win, |