Parsov
Member
- May 18, 2016
- 315
- 206
Hello there Devbest community!
A weird thing that I've been having for a long time now. Everytime a user makes a group a user automatically joins that group and has rights... Without even joining?
I did these:
Tried removing groups and then adding them again into the SQL.
Didn't help. I have a feeling it's because of the time of the VDS but I just want to be sure.
Thanks!
Added this into Groups but I don't think this is the thing causing it.
A weird thing that I've been having for a long time now. Everytime a user makes a group a user automatically joins that group and has rights... Without even joining?
I did these:
SQL:
SET@@global.sql_mode='';
Tried removing groups and then adding them again into the SQL.
Didn't help. I have a feeling it's because of the time of the VDS but I just want to be sure.
Thanks!
Post automatically merged:
Added this into Groups but I don't think this is the thing causing it.
C#:
public void CreateGroupChat(Group group)
{
if (group.HasChat == true)
return;
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.SetQuery("UPDATE groups SET `has_chat` = '1' WHERE id = @gid");
dbClient.AddParameter("gid", group.Id);
dbClient.RunQuery();
}
group.HasChat = true;
List<GameClient> GroupMembers = (from Client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList() where Client != null && Client.GetHabbo() != null && this.IsMember(Client.GetHabbo().Id) select Client).ToList();
foreach (GameClient Client in GroupMembers)
{
if (Client == null)
continue;
Client.SendMessage(new FriendListUpdateComposer(group, 1));
}
}
Last edited: