summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-18 01:16:44 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-18 01:16:44 +0800
commite644aec12e3798523c26b8ccc67ab5357af4bb1f (patch)
treedd5f2f219641d69f5d5d83b97210b9b1c4750fde /util
parentfd07e149a7791ef27928e2c8eb1365ee5afa4084 (diff)
downloadpttbbs-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.c21
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;
}