from common import log, queries

def process_event(self, connection, event):
    log.info(event) # Log to console.

    # Get and update resources.
    channel = queries.create_or_get_and_update_last_event(self, 'channel', 'cp', channel_name=event.target, user_name=event.source.nick)
    user = queries.create_or_get_and_update_last_event(self, 'user', 'cp', channel_name=event.target, user_name=event.source.nick)

#   # Update protectees.
#   if event.target == self.homechannel and event.source.nick in self.protectees:    # Protectee parted home channel.
#        del self.protectees[event.source.nick] # Delete from protectees.
