oh malarkey dude, my bad, I assumed something about %reason that I shouldn't have, so use this:
function Admin::kick(%admin, %client, %ban, %reason)
{
if(%admin != %client && (%admin == -1 || %admin.isAdmin))
{
if(%ban && !%admin.isSuperAdmin)
return;
if(%ban)
{
%word = "banned";
%cmd = "BAN: ";
}
else
{
%word = "kicked";
%cmd = "KICK: ";
}
if(%client.isSuperAdmin)
{
if(%admin == -1)
messageAll(0, "A super admin cannot be " @ %word @ ".");
else
Client::sendMessage(%admin, 0, "A super admin cannot be " @ %word @ ".");
return;
}
%ip = Client::getTransportAddress(%client);
%name = Client::getName(%client);
echo(%cmd @ %admin @ " " @ %client @ " " @ %ip);
if(%ip == "")
return;
if(%ban)
BanList::add(%ip, 1800);
else
BanList::add(%ip, 180);
if(%admin == -1)
{
MessageAll(0, %name @ " was " @ %word @ " from vote.");
if(!%reason || %reason == "")
Net::kick(%client, "You were " @ %word @ " by consensus.");
else
Net::Kick(%client, %reason);
}
else
{
MessageAll(0, %name @ " was " @ %word @ " by " @ Client::getName(%admin) @ ".");
if(!%Reason || %reason == "")
Net::kick(%client, "You were " @ %word @ " by " @ Client::getName(%admin));
else
Net::Kick(%client, %reason);
}
}
}
that should work... dunno, test it and get back to me.