Backported a couple of changes made to the irssi script around notification reliability and tidiness