This snippet allows you to detect +a and -a channel mode events perfectly. It will count the number of times you have been protected/deprotected, and also give a "message" to the channel on that event. This follows the same format as the On Voice/Help/Op/Owner events. This snippet can be easily configured to detect other modes. If you don't know how, just contact me on IRC or Email.