add db.DuckStats.channels(nick) method
This commit is contained in:
parent
35e3df7b27
commit
4bfd8b2dd1
6
db.py
6
db.py
|
@ -78,3 +78,9 @@ class DuckStats:
|
||||||
|
|
||||||
def ratio(self, nick):
|
def ratio(self, nick):
|
||||||
return (self.cought(nick) / self.missed(nick)) * 100
|
return (self.cought(nick) / self.missed(nick)) * 100
|
||||||
|
|
||||||
|
def channels(self, nick):
|
||||||
|
channels = set()
|
||||||
|
for i in self.db.db:
|
||||||
|
if i.nick = nick: channels.append(i.channel)
|
||||||
|
return len(channels)
|
||||||
|
|
Loading…
Reference in New Issue