I think this problem is related with DCC's. Precisely, with DCC's Closing. Do you have any DCC Send/Chat in this script?