Read /help on BAN and /help on KICK and you should figure it out, it's almost completely the same, only $banmask and $knick are needed...