minomino / minqlbot-plugins Goto Github PK
View Code? Open in Web Editor NEWA collection of plugins for minqlbot.
License: GNU General Public License v3.0
A collection of plugins for minqlbot.
License: GNU General Public License v3.0
I added 2 lines after comment below in balance.py. If I understand correctly, those may be needed.
if allow_spec:
player = self.player(name)
if not player:
return True
if player.team != "spectator":
self.put(name, "spectator")
# Don't count those pushed to spec as leavers
if (self.game().state == "in_progress" and player in self.players_start):
self.players_start.remove(player)
if rating > max_rating and max_rating != 0:
self.tell("^7Sorry, but you can have at most ^6{}^7 rating to play here and you have ^6{}^7."
.format(max_rating, rating), name)
elif rating < (min_rating+delta) and min_rating != 0:
self.tell("^7Sorry, but you need at least ^6{}^7 rating to play NOW and you have ^6{}^7."
.format(min_rating+delta, rating), name)
It would be nice, if this line of code:
minqlbot-plugins/plugins/balance.py
Line 262 in c3ff9fe
Would also show their real elo in a bracket or something, when their elo has been modified by using the !setelo command.
updating plugin wont remove new perms reqs.
for example, i guess player.put is non-blocking?
[14:36] Mino: I strongly suggest to add nickname completion to !elo command. I have done it here: https://gist.github.com/WalkerY/34d8a3c96d44ddc3f95f
[14:36] Very helpful and improves consistency with !spec !red and others
[14:38] also it might be useful to make it clear in usage for example by using "fullnick" and "nick" to emphasize when full nick is needed.
If I set AllowSpectators to False, the bot lets everyone play without caring of elo restriction. I downloaded the newest version of minobot and since then it's giving me problems.
delay should automatically cancel on unload event when in waiting state by default. that should be disabled if optional parameter is provided.
please change link to my repository in your wiki to: https://github.com/WalkerY/minqlbot-plugins/wiki
instead of directly to rep. ty :)
due to bans.name and bans.issued being not unique
<mitch> Found a bug; if you remove the alias of someone already cached the alias is still in the balance cache so !elo <oldalias> still shows it as an alias
paashaas suggested on IRC I add a ping check. Can be done fairly easily by sending the "score" command regularly and calculating the average of the last X pings and deal with anyone passing the threshold.
For example:
instead of single balance.py there could be:
balance.py (!teams, !balance, !do functionality but no kicking, no elo restrictions, no setrating, no getrating, no fetch player ratings, no cache)
ratings.py (fetch player ratings and cache with nice interface for other plugins, implementation of aliases and !setrating !getrating / !elo)
rating_restriction.py (plugin that restricts elo and kicks etc., why in seperate plugin? for example, I would like to implement extension - multilevel limit - if there are no players limit is lower etc. currently I would have to alter balance.py in many places instead of giving server owner just new rating_restriction or introducing there new options. Also there might be some other algorithms and to avoid multiplying options in config it would be better to for example enable plugin rating_restriction_ALGx.py and delete rating_restriction from config.)
instead of single ban.py there could be:
ban.py (!ban commands but no leavers ban, no new account ban)
ban_accountage.py (new account ban)
ban_leavers.py (leavers ban)
why this would be helpful?
for example I have a quick hack that bans ppl that have x times more quits on their ql profiles than wins (frequent quiters). I would prefer to be able to put it into configurable plugin but its not possible now (no proper extension points). I could call it for example: ban_leavers_qlprofile.py or sth shorter.
How to implement !checkban then? For example, there could be a queue of checks in ban.py that other plugins can subscribe to and provide ban_plugin.checkban (Boolean) command (without sideeffects) and for example callback function ban_plugin.banned. The ban plugin could go through all subscribers and check if any subscried plugin says player is banned with checkban function.
not banned by any plugin - say so. banned by any plugin? execute ban_plugin.banned for every ban. (those can display messages for each ban user has). Also, there could be an abstract class BanAlgorithmPlugin or sth that plugins can inherit instead of plugin class.
With above I think the code would be much cleaner and features would get proper separation and will be easier to extend. This is just a suggestion, there might be better split options. Also I understand that you may decide its an overkill.
Mino, I like your idea about versioning minqlbot-plugins not individual plugins.
But it's ok for the plugins that are included in this package. For other plugins there is a need to provide versioning also. I have doubts if I have put "version" in good scope. Could you check it in my pull requests? Maybe I should put it inside class scope in plugin file not outer most scope?
I banned some players from my server. When they tried to rejoin the bot didn't autokick them, but it still regognised them as banned players. Why is this happening?
probably idea for time after steam release (if applicable then), but generally balance cache should be 24-hour cache and also as plugin stores each player that ever visited bot server in db it could also store last known rating so that when qlranks is down it is still accessible as an estimate.
if they are not thread safe, pls. consider global lock or sth
[18:22] Mino: why not incorporate qualitative description of relative team strength in !teams? - https://gist.github.com/WalkerY/3289d58bbe864d298d0c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.