Skip to content

/kick not working for multiplayer #57

@Alotario

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.

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