Ported framework from InfiBot