Skip to content

/kick not working for multiplayer #57

Description

@Alotario

I have no idea why this is not working, but here is the code for the command:

else if ( msg.substr( 0, 5 ) == "/kick" && client.handshake.address.address == ADMIN_IP ) {
var target = msg.substr( 6 );
target = server.findPlayerByName( target );

	if ( target != null ) {
			server.kick( target.socket, "Kicked by literal god" );
			return true;
	} else {
		server.sendMessage( "Couldn't find that player!", client );
		return false;
	}

If someone could help me with this ASAP that would be great.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions