Ejemplo n.º 1
0
def m_euid(conn, parv):
    '''User connected.'''

    # :42X EUID dKingston 1 1276815544 +Zahloswz ~logic ov796-372.members.linode.com 97.107.140.237 42XAAAAAC li101-237.members.linode.com * :Michael Rodriguez

    # XXX: Since the regex doesn't get the information in the way we would expect,
    # we have to do this. Somebody please make a charybdis protocol regex? Thanks.
    sparv = parv[1].split(' ')

    if parv >= 11:
        logger.debug('user connected: %s' % parv[0])
Ejemplo n.º 2
0
def m_server(conn, parv):
    '''Handle new servers.'''

    global uses_uid

    # XXX: Since the regex doesn't get the information in the way we would expect,
    # we have to do this. Somebody please make a charybdis protocol regex? Thanks.
    sparv = parv[1].split(' ')

    # SERVER salvation.sephuin.net 1 :(H) Seeking salvation.
    logger.debug('new server: %s' % parv[0])

    server.add(parv[0], sparv[0], None, sparv[2], sparv[3])
Ejemplo n.º 3
0
def m_server(conn, parv):
    '''Handle new servers.'''

    global uses_uid

    # SERVER zeus.jcs.me.uk iliketurtles 0 001 :zeus.jcs.me.uk inspircd
    logger.debug('new server: %s' % parv[0])

    # need to make sure we only do this upon connect, and not upon other servers.
    conn.push(':%s BURST %d' % (numeric, time.time()))
    conn.push(':%s VERSION :nuclix v%s -- A minimalistic IRC service package.' % (numeric, var.version))#time.time())

    conn.push(':%s ENDBURST' % numeric)#time.time())
Ejemplo n.º 4
0
def m_away(conn, origin, parv):
    '''A user went away.'''

    try:
        var.users[origin]
    except KeyError:
        logger.debug('got a user to be marked away/unaway, but doesnt exist: %s' % origin)
        return

    message = ' '.join(parv[0])

    if message:
        u['away_message'] = message
        u['away_ts'] = time.time()
    else:
        u['away_message'] = None
        u['away_ts'] = 0
Ejemplo n.º 5
0
def m_capab(conn, parv):
    '''See our uplink capabilities.'''

    global use_euid
    global rserv_support
    global topic_burst
    global eopmod
    global mlock

    if 'EUID' in parv[0]:
        logger.debug('uplink supports EUID, enabled')
        use_euid = True
    if 'SERVICES' in parv[0]:
        logger.debug('uplink supports RSERV, enabled')
        rserv_support = True
    if 'TB' in parv[0]:
        logger.debug('uplink supports topic bursting, enabled')
        topic_burst = True
    if 'EOPMOD' in parv[0]:
        logger.debug('uplink supports EOPMOD, enabled')
        eopmod = True
    if 'MLOCK' in parv[0]:
        logger.debug('uplink supports MLOCK, enabled')
        mlock = True
Ejemplo n.º 6
0
def m_uid(conn, parv):
    '''User connected.'''

    if parv >= 9:
        logger.debug('user connected: %s' % parv[0])