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 | f256ae71eb195f21e344dd26c1d2310bd01794e7 (patch) | |
tree | 7399d1eff078eb6efcd87b33159b7a00092277a7 | |
parent | 1e3962a742facd5fef7a2166d872a29da7597d0b (diff) | |
download | pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.tar pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.tar.gz pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.tar.bz2 pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.tar.lz pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.tar.xz pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.tar.zst pttbbs-f256ae71eb195f21e344dd26c1d2310bd01794e7.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@418 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/util/indexuser.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/pttbbs/util/indexuser.c b/pttbbs/util/indexuser.c index c626303b..bd761ccf 100644 --- a/pttbbs/util/indexuser.c +++ b/pttbbs/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; } |