From a1d31eed1c0c90d5da1f0c34016278f11ccd0733 Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 23 May 2009 07:49:26 +0000 Subject: - xchatd: provide real user id in private messages (thanks: Bluesdan@PttSuggest) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4463 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/xchatd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/xchatd.c b/util/xchatd.c index 5b216b9d..37b4dde0 100644 --- a/util/xchatd.c +++ b/util/xchatd.c @@ -1128,6 +1128,7 @@ chat_private(ChatUser *cu, char *msg) { /* Thor.0724: 用 userid也可傳悄悄話 */ xuser = cuser_by_userid(recipient); } + if (xuser == NULL) { sprintf(chatbuf, msg_no_such_id, recipient); @@ -1139,7 +1140,7 @@ chat_private(ChatUser *cu, char *msg) else if (*msg) { userno = cu->userno; - sprintf(chatbuf, "*%s* ", cu->chatid); + sprintf(chatbuf, "*%s (%s)* ", cu->chatid, cu->userid); strncat(chatbuf, msg, 80); send_to_user(xuser, chatbuf, userno, MSG_MESSAGE); -- cgit v1.2.3