seishun / node-steam

Interface directly with Steam servers from Node.js
MIT License
1k stars 181 forks source link

SteamFriends.prototype.ban not banning #396

Closed metzg closed 7 years ago

metzg commented 7 years ago

Hi! First of all thanks for the great work.

I've come across an issue that I am not able to fix: I seem to be able to kick a person from a group chat, but not ban/unban, although the only thing that changes is the chatAction code AFAIK.

I made sure that the message is sent by console.logging SteamClient.prototype._send, and the only byte that differs between kick & ban are 02 turned into 03 in the body, but I guess you might already know that: Body of a kick: <Buffer de 04 b2 00 00 00 88 01 c9 71 09 04 01 00 10 01 02 00 00 00> Body of a ban: <Buffer de 04 b2 00 00 00 88 01 c9 71 09 04 01 00 10 01 03 00 00 00>

I have tried tinkering with the value of chatAction, but no luck.

Here's the related code: https://github.com/seishun/node-steam/blob/master/lib/handlers/friends/index.js#L182

SteamFriends.prototype.ban = function(steamIdChat, steamIdMember) {
  this._client.send({
    msg: EMsg.ClientChatAction
  }, new schema.MsgClientChatAction({
    steamIdChat: toChatID(steamIdChat),
    steamIdUserToActOn: steamIdMember,
    chatAction: Steam.EChatAction.Ban
  }).toBuffer());
};

Any idea what could be wrong? Thanks!

seishun commented 7 years ago

Does banning work when you log in using that account yourself? (with Steam.exe)

metzg commented 7 years ago

Sigh, that was a group permission issue indeed, didn't even know that existed... Sorry for the trouble.

image

Cheers