Add ONE constraint to several bones?
Alright, I managed to solve it myself now with a Python script, it goes like this:

import bpy

for b in bpy.context.selected_pose_bones[:]:
     rot = b.constraints.new(type='LIMIT_ROTATION')
     rot.use_limit_z = True


You need to have your bones selected (in pose mode).