Author Topic: How do I Disconnect/kick someone using the console?  (Read 2733 times)

Is there a way to disconnect/kick someone using a console command?

Badspot

  • Administrator
listclients(); to get a list of client ID numbers.

kick(<clientID>); or ban(<clientID>);

Not very convenient, but whatever

Sadly that doesn't work, when I tried it I got the "<imput> <0>:Unable to find the function kick" error. Is this because I can only the the kick(<clientID>); in-game and not through the Dedicated console? Sorry about not being specific.

listclients();
kick(7391);

You can only use those types of commands through the dedicated console, or yours if you run the server.

I tried it though the dedicated console, it is unable to find the function "kick".

%client.delete("You have been kicked");

Confirmed that kick(); and ban(); are not found D=

deleting a client works but the "text inside" isn't shown to them. I would prefer a cleaner method that could list a reason, but for anyone interested, the deletion method at least works.

Badspot

  • Administrator
it's kickID(7391); and banID(7391);


BUMP for question: How would I ban temporarily (say 5 minutes) from the console? Does BanID(); have more parameters or what?

I think that the bantime is measured in seconds, but I don't know the parameter.

BanID(); is actually not working at all. I've tried all sorts of stuff and no one gets banned.

The function isn't coming up not found, but there's no message and the unban list lacks anything new.

Badspot

  • Administrator
Yeah it doesn't work.  Fixed in next version.