summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 15:58:43 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 15:58:43 +0800
commita94b472a72351631253be327d73738cc4d0dd00d (patch)
tree51aa0170f6ba89561451469efb067290191920e3 /mbbsd/talk.c
parent1d8009f548a41b171b7c9ef562ce043f7103b671 (diff)
downloadpttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.gz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.bz2
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.lz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.xz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.zst
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.zip
General Update by PttSuggest:
- 'w' in mail can msg - author in mail header will highlight if online - recommendation message fix - ignore empty input for login - better prompt for empty fav git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3599 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r--mbbsd/talk.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 50be465c..d7eccb6a 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -82,6 +82,24 @@ isvisible_stat(const userinfo_t * me, const userinfo_t * uentp, int fri_stat)
return !(fri_stat & HRM);
}
+int query_online(const char *userid)
+{
+ userinfo_t *uentp;
+
+ if (!userid || !*userid || *userid == '-')
+ return 0;
+
+ if (strchr(userid, '.') || SHM->GV2.e.noonlineuser)
+ return 0;
+
+ uentp = search_ulist_userid(userid);
+
+ if (!uentp ||!isvisible(currutmp, uentp))
+ return 0;
+
+ return 1;
+}
+
const char *
modestring(const userinfo_t * uentp, int simple)
{