your opponent's castle was not through check. you can castle as long as its the king and rooks first move, you arent being checked, and it doesnt put you in check. it didnt put your opponent in check, and they were not in check already.
(apologies if i was confusing, im not the best at explaining.)
On move 15 he plays O-O-O, but his castle goes through b1, which my bishop on F5 is attacking; I thought you cannot castle through an attack?