def checkConnectBanned(cn): checklist=( sbserver.playerName(cn), ipLongToString(sbserver.playerIpLong(cn)) ) matches=bandatabase.search(checklist) if len(matches)>0: timeperiod="indefinatelly" reason=matches[0][2] if reason== "": reason="none" serverNotice("%s is banned %s, reason: %s" % (sbserver.playerName(cn),matches[0][1],reason)) return True return False
def cndetails(cn): return sbserver.playerName(cn)+" (cn"+str(cn)+"/"+ipLongToString(sbserver.playerIpLong(cn))+")"
def noticePlayerConnect(cn): ip = "(%s)" % (ipLongToString(sbserver.playerIpLong(cn))) normal = "Connected: %s(%d)" % (formatCaller(("ingame",cn)), cn) serverNotice(normal + ip)