aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 13d8252..4e7180d 100644
--- a/command.c
+++ b/command.c
@@ -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);