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', 'ct', channel_name=event.target, user_name=event.source.nick)
    user = queries.create_or_get_and_update_last_event(self, 'user', 'ct', channel_name=event.target, user_name=event.source.nick)
