Beispiel #1
0
def send_whisper_result(data):
    nick, msg = sent_whispers.popleft()
    if data.code == 0:
        m = "[-> {}] {}".format(nick, pp(msg))
        debuglog.info(m)
    else:
        debuglog.warning("[error] {} is offline.".format(nick))
Beispiel #2
0
def send_whisper_result(data):
    now = time.time()
    while True:
        try:
            nick, msg, ts = sent_whispers.popleft()
        except IndexError:
            return
        if now - ts < 1.0:
            break

    if data.code == 0:
        m = "[-> {}] {}".format(nick, pp(msg, pp_actions))
        debuglog.info(m)
    else:
        debuglog.warning("[error] {} is offline.".format(nick))
Beispiel #3
0
def got_whisper(data):
    nick, message = data.nick, data.message
    message = pp(message, pp_actions)
    m = "[{} ->] {}".format(nick, message)
    debuglog.info(m)

    if badge.is_afk:
        if nick in chat_bots:
            return
        if message.startswith('!'):
            return
        now = time.time()
        global afk_ts
        if now > afk_ts + 20:
            afk_ts = now
            send_whisper(nick, afk_message)
            badge.is_afk = True
Beispiel #4
0
def party_chat(data):
    nick = mapserv.party_members.get(data.id, str(data.id))
    message = pp(data.message)
    m = "[Party] {} : {}".format(nick, message)
    debuglog.info(m)
Beispiel #5
0
def got_whisper(data):
    nick, message = data.nick, data.message
    message = pp(message)
    m = "[{} ->] {}".format(nick, message)
    debuglog.info(m)
Beispiel #6
0
def player_chat(data):
    message = pp(data.message)
    debuglog.info(message)
Beispiel #7
0
def being_chat(data):
    message = pp(data.message)
    debuglog.info(message)
Beispiel #8
0
def player_chat(data):
    message = pp(data.message, pp_actions)
    debuglog.info(message)
Beispiel #9
0
def being_chat(data):
    message = pp(data.message, pp_actions)
    debuglog.info(message)