diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-04-08 11:48:42 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-04-08 11:48:42 +0200 |
commit | 9b44e7bee2ac20e51c785dd36c152365dca9ac5b (patch) | |
tree | a74e9e0ad363873060518d3bf8b791fad5c43a1f | |
parent | c45ac5fe425e187d980b5593d7a4e3aa318e78fe (diff) |
Send error if user already in room on invite
-rw-r--r-- | command.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -202,6 +202,10 @@ static bool cmd_invite(struct conn_data *data,const char *tag,const char **args) send_error(data->fd,tag,"Not in that room"); return false; } + if(db_is_member(roomid,user2)){ + send_error(data->fd,tag,"User already in that room"); + return false; + } db_add_member(roomid,user2); |