'Create a \'mod\' event for event-collector.
modaction: An r2.models.ModAction object
subreddit: The Subreddit the mod action is being performed in
mod: The Account that is performing the mod action
target: The Thing the mod action was applied to
request, context: Should be pylons.request & pylons.c respectively'

@squelch_exceptions
@sampled('events_collector_mod_sample_rate')
def mod_event(self, modaction, subreddit, mod, target=None, request=None, context=None):

    event = Event(topic='mod_events', event_type=modaction.action, time=modaction.date, uuid=modaction._id, request=request, context=context)
    event.add('details_text', modaction.details_text)
    if (not event.get('user_id')):
        event['user_id'] = mod._id
        event['user_name'] = mod.name
    event.add_subreddit_fields(subreddit)
    event.add_target_fields(target)
    self.save_event(event)
