Giter VIP home page Giter VIP logo

minqlbot-plugins's People

Contributors

minomino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

minqlbot-plugins's Issues

Don't treat those forced to spec as leavers.

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)

nick search on !elo

[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.

AllowSpectators: False not working

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.

self.delay should be interruptible.

delay should automatically cancel on unload event when in waiting state by default. that should be disabled if optional parameter is provided.

!remalias doesn't clean cache properly

<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

Maximum ping

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.

please consider to split balance and ban functionality into separate plugins

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.

plugin versioning - individual

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?

!ban not working properly

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?

balance cache of ratings

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.