diff options
-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); |