Originally Posted by DarthNinja
GetClientName(client, name, sizeof(name));
ServerCommand("sm_ban %s %i Trolled", name, GetConVarInt(BanTime));
ServerCommand("sm_kick %s Trolled", name);
Show me a server running this plugin and I'll show you a server I can run arbitrary commands on.
More specifically, you'd want to use something like this:
ServerCommand("sm_ban #%d %d Trolled", GetClientUserId(client), GetConVarInt(BanTime));
ServerCommand("sm_kick #%d Trolled", GetClientUserId(client));
Although ServerCommand is evil. For kicking, use KickClient. For banning, use BanClient or SBBanPlayer (if using SourceBans).
Also, what does this plugin do
? I wasn't able to discern what it does from reading the original post.