From 8e1a1c1f01aef52ba8b2af47503461320a0abc20 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 15 Apr 2017 18:09:48 +0200 Subject: server: Send _push online messages on online change --- command.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index e66eb12..1bbde10 100644 --- a/command.c +++ b/command.c @@ -4,6 +4,7 @@ #include #include #include +#include "broadcast.h" #include "command.h" #include "db.h" #include "net.h" @@ -38,11 +39,13 @@ static bool cmd_login(struct conn_data *data,const char *tag,const char **args){ free(pass); if(data->userid!=-1){ userdata_unregister(data->userid,data->fd); + broadcast_online_change(data->userid); } if(success){ data->userid=userid; userdata_register(userid,data->fd); net_send_ok(data->fd,tag); + broadcast_online_change(userid); } else { data->userid=-1; net_send_error(data->fd,tag,"Incorrect password"); -- cgit v1.2.3-54-g00ecf