fixed case sensitivity, added checks on IRC codes