summary refs log tree commit diff stats
path: root/src/common/inbound.c
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-03-22 23:41:56 -0300
committerTingPing <tngpng@gmail.com>2013-03-22 23:41:56 -0300
commitcd1155b83cf6d56f80c2c3862dbded5f6164e3a1 (patch)
treef8dc7f0ba615d90436ad5247c26a992cb5947228 /src/common/inbound.c
parentaff9fb7945b19a90f12173480246c223c44dccbc (diff)
ensure lasttalk gets updated
closes #247
Diffstat (limited to 'src/common/inbound.c')
-rw-r--r--src/common/inbound.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c
index bd882aea..dae919b8 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -155,6 +155,7 @@ void
 inbound_privmsg (server *serv, char *from, char *ip, char *text, int id)
 {
 	session *sess;
+	struct User *user;
 	char idtext[64];
 
 	sess = find_dialog (serv, from);
@@ -197,6 +198,10 @@ inbound_privmsg (server *serv, char *from, char *ip, char *text, int id)
 		EMIT_SIGNAL (XP_TE_PRIVMSG, sess, from, text, idtext, NULL, 0);
 		return;
 	}
+	
+	user = userlist_find (sess, from);
+	if (user)
+		user->lasttalk = time (0);
 
 	if (sess->type == SESS_DIALOG)
 		EMIT_SIGNAL (XP_TE_DPRIVMSG, sess, from, text, idtext, NULL, 0);