Fix race conditions with IRC