diff options
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <errno.h> #include <sys/time.h> #include <sys/socket.h> +#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"); |