Skip to content
WalkerY edited this page Jun 23, 2015 · 4 revisions

1. How to kick by number of games played or add exception list for my friends

In file plugins/qlprofile/qlprofile.py you need to have sth like:

def is_eligible(self, days):
    td = datetime.timedelta(days=days)
    min = datetime.date.today() - td
    exList = ["walkery", "walkerz", "walkerx" ,"sponiewierany"]
    return ((self.name.lower() in exList) or ((self.get_date() < min) and (int(self.wins.replace(",","")) + int(self.losses.replace(",","")) > 2 * days)))

You may want to replace 2 * days with sth like 100. That would mean that player needs to have at least 100 games. In exList you can add exceptions to account age and games rule.

Clone this wiki locally