diff options
author | bbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-05-20 10:01:09 +0800 |
---|---|---|
committer | bbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-05-20 10:01:09 +0800 |
commit | 78a987a664f4c0ae21970a9e84063c77cbd2bfe3 (patch) | |
tree | 8e9c28f249617fd24eae8388f11eac71580ee10b | |
parent | 95c883dbfd9319b317477e2aef4a46ccff212249 (diff) | |
download | pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.tar pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.tar.gz pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.tar.bz2 pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.tar.lz pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.tar.xz pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.tar.zst pttbbs-78a987a664f4c0ae21970a9e84063c77cbd2bfe3.zip |
search_ulist_userid()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@884 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/proto.h | 3 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/proto.h b/include/proto.h index c0c2326e..3aae3190 100644 --- a/include/proto.h +++ b/include/proto.h @@ -1,4 +1,4 @@ -/* $Id: proto.h,v 1.41 2003/05/18 07:46:37 in2 Exp $ */ +/* $Id: proto.h,v 1.42 2003/05/20 02:01:09 bbs Exp $ */ #ifndef INCLUDE_PROTO_H #define INCLUDE_PROTO_H @@ -115,6 +115,7 @@ void add_to_uhash(int n, char *id); int setumoney(int uid, int money); int getbtotal(int bid); userinfo_t *search_ulist_pid(int pid); +userinfo_t *search_ulist_userid(int userid); int moneyof(int uid); void hbflreload(int bid); int hbflcheck(int bid, int uid); diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 9498f963..c8bfec24 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1,4 +1,4 @@ -/* $Id: mbbsd.c,v 1.79 2003/05/18 07:31:09 in2 Exp $ */ +/* $Id: mbbsd.c,v 1.80 2003/05/20 02:01:09 bbs Exp $ */ #include "bbs.h" #define SOCKET_QLEN 4 @@ -916,11 +916,18 @@ do_aloha(char *hello) userinfo_t *uentp; int tuid; +#if 1 + if ((uentp = (userinfo_t *) search_ulist_userid(userid)) && + isvisible(uentp, currutmp)) { + my_write(uentp->pid, genbuf, uentp->userid, 2, NULL); + } +#else if ((tuid = searchuser(userid)) && tuid != usernum && (uentp = (userinfo_t *) search_ulist(tuid)) && isvisible(uentp, currutmp)) { my_write(uentp->pid, genbuf, uentp->userid, 2, NULL); } +#endif } fclose(fp); } |