For anyone who has been having any of these problems with the bots output:
[list=1][*]A large amount of tabs in the middle of a sentence[*]A full stop or question mark being beside more text (although there should be a space)[*]<br>s in the text[/list=1]
Do the following:
Code:
Find:
$ttb_time = time() + rand(1,5);
Code:
After that line add:
// Clean Output
$response = str_replace('<br>' , '', $response );
$response = str_replace('</br>' , '', $response );
$response = str_replace(', .' , '.', $response );
$response = preg_replace("/(\?|\.|!)(\w)/","$1 $2",$response);
$response = preg_replace("/(\w|,)\s+(\w|\?|\.|!)/","$1 $2",$response);
$response = preg_replace("/\n\s+/","\n",$response);
Hope this helps

Thanks to fury for info on removing the <br>s & just to mention, the search to remove </br> was intentional as i have noticed it in the output from time to time.
Edit
I made a mistake in the original coding so please update to the above ASAP if you have used it

Thanks to JBMoney for reporting the problem.