From 6e28381de77265f8b6a24cdd9c583d1d27d8d7b2 Mon Sep 17 00:00:00 2001 From: RblSb Date: Wed, 4 Mar 2020 20:41:43 +0300 Subject: Playlist config limits --- src/VideoList.hx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/VideoList.hx') diff --git a/src/VideoList.hx b/src/VideoList.hx index 2f13b6c..e2d88d5 100644 --- a/src/VideoList.hx +++ b/src/VideoList.hx @@ -64,4 +64,10 @@ abstract VideoList(Array) from Array to Array { return itemPos; } + public function itemsByUser(client:Client):Int { + var i = 0; + for (item in this) if (item.author == client.name) i++; + return i; + } + } -- cgit v1.2.3