Internal function to add listeners

add_listener(jug, func, event)

Arguments

jug

the jug instance

func

the function to bind

event

the event to bind to