diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-01-09 10:28:02 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-01-09 10:28:02 +0800 |
commit | 61642c585dd6cd62de5dc2b36f80cbc7b81624d7 (patch) | |
tree | d06b5b202ab8202af0241114e32a8b33f24256a3 | |
parent | f32cfe18a8a9a888478f922732ffd0a0437efaff (diff) | |
download | pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.tar pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.tar.gz pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.tar.bz2 pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.tar.lz pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.tar.xz pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.tar.zst pttbbs-61642c585dd6cd62de5dc2b36f80cbc7b81624d7.zip |
add display of IP in reg screen
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5291 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/register.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c index dc3bb100..d92920c9 100644 --- a/pttbbs/mbbsd/register.c +++ b/pttbbs/mbbsd/register.c @@ -2255,10 +2255,18 @@ regform2_validate_page(int dryrun) forms[i].u.realname, forms[i].u.career); move(i*2+1, 0); - prints(" %s %-50s%20s\n", - (forms[i].u.userlevel & PERM_NOREGCODE) ? - ANSI_COLOR(1;31) "T" ANSI_RESET : " ", - forms[i].u.address, forms[i].u.phone); + prints(" %s ", (forms[i].u.userlevel & PERM_NOREGCODE) ? + ANSI_COLOR(1;31) "T" ANSI_RESET : " "); + // try to print lasthost if possible + int delta = 70 - 2 - strlen(forms[i].u.address) - + strlen(forms[i].u.phone) - strlen(forms[i].u.lasthost); + if (delta < 0) + prints("%-50s%20s\n", forms[i].u.address, forms[i].u.phone); + else + prints("%s" ANSI_COLOR(0;33) " %*s%s " ANSI_RESET "%s\n", + forms[i].u.address, delta, "", + forms[i].u.lasthost, forms[i].u.phone); + cforms++, tid ++; } |