summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
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)
{