Banning players with MP object

0 favourites
  • 7 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • AFAIK wile using the multiplayer object, issuing a ban on a specific peer/IP is impossible? It seems like a pretty important feature that's missing, since this means a cheating player could keep rejoining even if they were kicked.

    I feel like we should be able to get the IP of a specific peer for this reason at the very least.

  • Might that be done at the signaling server?

  • You can create something for that in your game logic.

    i.e.

    The peer receives a ban command from the host.

    The peer then fires off an Ajax call to a dedicated page.

    This page processes the request, catching the IP of the user calling the page.

    This info is then processed and applied to the firewall rules.

    Voila IP blocked on server

    Another approach could be that if the player receives a bann messages, certain values get stored in the local storage preventing him or her to reconnect.

    This could be undone by reinstalling the game or something, but could become tedious after several bans.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lennaert

    For obvious reasons banning players shouldn't rely on info from the person being banned though. Ideally there should be a way for the host to get the IP of a player before they're banned (i assume this info is already known by the host in establishing a connection), store it, and check if a connecting player has an IP in the ban-list.

    really a get peer IP expression is all that's needed, however im uncertain of how feasible this is since I don't know much about using WebRTC.

  • lennaert

    For obvious reasons banning players shouldn't rely on info from the person being banned though. Ideally there should be a way for the host to get the IP of a player before they're banned (i assume this info is already known by the host in establishing a connection), store it, and check if a connecting player has an IP in the ban-list.

    If the signalling server does not allow the connection ..... he or she will not connect.

  • lennaert

    I'm not looking for a way to ban players permanently from a signalling server, just from a specific host's room. The host should be able to find the IP's of the peers considering it's communicating with them, but the multiplayer object offers no expression to retrieve it. Banning a player game-wide isn't the issue, i just want players to be able to permanently kick an annoying/spammy/fake/cheating user in their room.

  • Atm, the mp object does not have such function, but you can build something similar with the method mentioned above.

    Upon connecting An ajax call is made, which relays back the IP address which gets stored in a peer/user's local storage.

    When connecting to a game, the stored IP address gets transmitted and compared by the host to some list it has stored somewhere.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)