Beispiel #1
0
def re(**kw):
    osuid = kw['autoOusInfoKey']['osuid']
    rank_tab.upload_rec(osuid, kw["groupid"])
    b = botHandler.botHandler()
    recinfo = b.getRecInfo(osuid, "1")
    if recinfo:
        res, kv  = b.getRctppRes(recinfo[0])
        smoke = b.rctppSmoke(kw["groupid"], kw["qqid"], kv, iswarn=0)
        if smoke:
            return smoke
    return ""
Beispiel #2
0
def pr(**kw):
    osuid = kw['autoOusInfoKey']['osuid']
    rank_tab.upload_rec(osuid, kw["groupid"])
    b = botHandler.botHandler()
    recinfo = b.getRecInfo(osuid, "50")
    for r in recinfo:
        if r["rank"] == "F":
            continue
        res, kv  = b.getRctppRes(r)
        smoke = b.rctppSmoke(kw["groupid"], kw["qqid"], kv, iswarn=0)
        if smoke:
            return smoke
        break
    return ""
Beispiel #3
0
def rctppnew(**kw):
    b = botHandler.botHandler()
    osuid = kw['autoOusInfoKey']['osuid']
    osuname = kw['autoOusInfoKey']['osuname']
    recinfo = b.getRecInfo(osuid, "1")
    logging.info(recinfo)
    if not recinfo:
        res = "没有最近游戏记录,绑定用户为%s" % osuname
    else:
        res, kv = b.getRctppResNew(recinfo[0])
        # 执行管理逻辑
        b.rctppSmoke(kw["groupid"], kw["qqid"], kv)
    rank_tab.upload_rec(osuid, kw["groupid"])
    return res
Beispiel #4
0
def rctppdraw(**kw):
    b = botHandler.botHandler()
    osuid = kw['autoOusInfoKey']['osuid']
    osuname = kw['autoOusInfoKey']['osuname']
    try:
        p, kv = b.drawRctpp(osuid, osuname)
        # 执行管理逻辑
        smoke_res = b.rctppSmoke(kw["groupid"], kw["qqid"], kv, iswarn=1)
        if smoke_res:
            return f'{osuname}\n由于触发本群限制,请私聊查询,触犯法律:{smoke_res}'
        rank_tab.upload_rec(osuid, kw["groupid"])
        return "[CQ:image,cache=0,file=http://interbot.cn/itbimage/tmp/%s]" % p
    except:
        logging.exception("rctppdraw error")
        return "fail..."
Beispiel #5
0
def rctppnew(**kw):
    b = botHandler.botHandler()
    osuid = kw['autoOusInfoKey']['osuid']
    osuname = kw['autoOusInfoKey']['osuname']
    recinfo = b.getRecInfo(osuid, "1")
    logging.info(recinfo)
    smoke_res = None
    if not recinfo:
        res = "没有最近游戏记录\n绑定用户为%s" % osuname
    else:
        res, kv = b.getRctppResNew(recinfo[0])
        res = f"{osuname}\n{res}"
        # 执行管理逻辑
        smoke_res = b.rctppSmoke(kw["groupid"], kw["qqid"], kv, iswarn=1)
        if smoke_res:
            res += f'\n>>{smoke_res}<<'
    rank_tab.upload_rec(osuid, kw["groupid"])
    if smoke_res:
        return f'{osuname}\n由于触发本群限制,请私聊查询,触犯法律:{smoke_res}'
    return res
Beispiel #6
0
def up2(**kw):
    osuid = kw['autoOusInfoKey']['osuid']
    rank_tab.upload_rec(osuid, kw["groupid"])
    return ""