Given the dynamic nature of the mission of a wireless sensor network (WSN), and of the environment in which it is usually deployed, network reprogramming is an important activity that enables the WSN to adapt to the mission and/or environment. One important component of a reprogramming protocol is code dissemination and maintenance, during which new code is propagated to relevant WSN nodes. Several dissemination protocols have been proposed, each with a specific objective in mind. Protocols such as Trickle minimise dissemination latency by periodically broadcasting advertisement messages at the expense of energy consumption, while protocols, e.g., Varuna, reduce energy usage by broadcasting advertisement only when needed. In certain type of WSNs, such as event-based WSNs, Varuna has high code dissemination latency, while the energy consumption of Trickle does not improve in such WSNs. In this paper, we propose a new code dissemination protocol, called Triva, for event based WSNs, by leveraging the properties of Trickle and Varuna. Our results show that, for event-based WSNs, Triva outperforms Trickle and Varuna in terms of energy consumption and code dissemination latency respectively. We also show that Triva provides excellent results during bursty traffic in event-based WSNs. Triva is the first information dissemination protocol for event-based WSNs.