diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-18 01:16:44 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-18 01:16:44 +0800 |
commit | e644aec12e3798523c26b8ccc67ab5357af4bb1f (patch) | |
tree | dd5f2f219641d69f5d5d83b97210b9b1c4750fde /util | |
parent | fd07e149a7791ef27928e2c8eb1365ee5afa4084 (diff) | |
download | pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.tar pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.tar.gz pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.tar.bz2 pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.tar.lz pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.tar.xz pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.tar.zst pttbbs-e644aec12e3798523c26b8ccc67ab5357af4bb1f.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@418 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/indexuser.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/util/indexuser.c b/util/indexuser.c index c626303b..bd761ccf 100644 --- a/util/indexuser.c +++ b/util/indexuser.c @@ -30,12 +30,21 @@ int main() for(j = 1; j <= MAX_USERS; j++) { passwd_query(j, &u); if(!u.userid[0]) continue; - sprintf(buf,INDEXPATH"/realname/%X",string_hash(u.realname)); - append_record(buf, &j, sizeof(j)); - sprintf(buf,INDEXPATH"/email/%X",string_hash(u.email)); - append_record(buf, &j, sizeof(j)); - sprintf(buf,INDEXPATH"/ident/%X",string_hash(u.ident)); - append_record(buf, &j, sizeof(j)); + if(u.realname[0]) + { + sprintf(buf,INDEXPATH"/realname/%X",string_hash(u.realname)); + append_record(buf, &j, sizeof(j)); + } + if(u.email[0]) + { + sprintf(buf,INDEXPATH"/email/%X",string_hash(u.email)); + append_record(buf, &j, sizeof(j)); + } + if(u.ident[0]) + { + sprintf(buf,INDEXPATH"/ident/%X",string_hash(u.ident)); + append_record(buf, &j, sizeof(j)); + } } return 0; } |