summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-13 16:00:07 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-13 16:00:07 +0800
commit9671494643c68203da5fcf777a3c61720d29000a (patch)
treebbdcf044d7dcbbd172f6f0a2ed65316e7b981565 /mbbsd/mbbsd.c
parent8601b22b64b7f524e299773a6915bbedb5f78ab4 (diff)
downloadpttbbs-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/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c9
1 files changed, 8 insertions, 1 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