refactored IRC bot