You have to wait a little bit before freeing slot or just use libcod from my repo, has an autofreeslot for bots so you can just normally kick it. Also your isBot definiton seems wrong, just use:
PHP Code:
isBot()
{
return self getAddressType() == 0;
}
if (self isBot())
{
bla bla...
}