Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Integration->Main #186

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Merge Integration->Main #186

wants to merge 24 commits into from

Commits on Sep 27, 2024

  1. Add loser picks balance algo

    jauggy committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    c56659a View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. Merge pull request #179 from jauggy/jauggy/add-loser-picks-2

    Add loser picks balance algo
    DeviousNull authored Sep 28, 2024
    Configuration menu
    Copy the full SHA
    51bd1c0 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Fix missing !help entries for several BarManager commands.

    This patch allows the `!help` command to show documentation for
    the following commands:
    - `!setAllAiBonus`
    - `!unboss`
    - `!setratinglevels`
    
    The help entries for the first two of these was missing because the
    permissions configuration was placed in the global `commands.conf`
    file, instead of the plugin-specific `BarManagerCmd.conf` file.
    
    The help entry for the last command was missing because of a
    copy-paste error (`!resetratinglevels` had two help entries, while
    `!setratinglevels` had none).
    DeviousNull committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    75a9c12 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #181 from DeviousNull/fix-missing-help-entries

    Fix missing `!help` entries for several BarManager commands.
    DeviousNull authored Oct 1, 2024
    Configuration menu
    Copy the full SHA
    acdc155 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Make getNumUsersInMyBattle() return 0 if the battle is not open

    Currently, `getNumUsersInMyBattle()` throws an error if it is
    called when the battle is closed. One way this can happen is in the
    `sendTachyonBattle()` timer callback, if the lobby was disconnected
    between when the timer was started and when the callback runs.
    DeviousNull committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    c6ff3b3 View commit details
    Browse the repository at this point in the history
  2. Don't attempt to send battle updates when the battle is closed

    Currently, `sendTachyonBattle()` is called as a timer callback, to
    provide a form of rate-limiting. The timer is only started when a
    battle is open, but it is possible that the lobby will disconnect
    before `sendTachyonBattle()` runs.
    
    This patch makes `sendTachyonBattle()` return early if the lobby
    is no longer connected at the time that it runs.
    DeviousNull committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    9e020aa View commit details
    Browse the repository at this point in the history
  3. Clarify an error message in various lobby command handlers

    Currently, the following lobby command handlers log an error if
    they are called for a user that is not currently known:
    - hLEFT_pre
    - hLEFTBATTLE_pre
    - hREMOVEUSER_pre
    - hCLIENTSTATUS_pre
    - hJOINEDBATTLE_pre
    
    When it is logged, the current error message states "hXXX_pre
    cannot be exectuted <...>". This message does not clearly explain
    what went wrong or what else may be impacted as a result of the
    error.
    
    This patch changes the error message to state "hXXX_pre was called
    for an unknown user, skipping <...>". This makes it much more
    clear what went wrong (missing a user), and what may be impacted
    (anything involving that specific user).
    DeviousNull committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    a34db4b View commit details
    Browse the repository at this point in the history
  4. Add lobby handlers in 'onLobbyLogin', not 'onLobbyConnected'

    Counterintuitively, SPADS calls the `onLobbyConnected` callback
    *after* the `onLobbyLogin` callback.
    
    By registering all lobby command handlers in `onLobbyLogin`, we
    ensure that we don't miss any commands that would have been sent
    before `onLobbyConnected` is run.
    DeviousNull committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    6b6ac41 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #182 from DeviousNull/misc-cleanups-fixes

    Miscellaneous cleanups/fixes
    DeviousNull authored Oct 3, 2024
    Configuration menu
    Copy the full SHA
    7285387 View commit details
    Browse the repository at this point in the history
  6. Add selfFileHash, and print it in !barmanagerprintstate

    Currently, there is not a reliable way to determine whether a host
    is running the latest BarManager code. This is particularly
    annoying when making changes to the Integration server, as for
    subtle changes it is not easy to tell whether the latest code has
    been fetched yet.
    
    This patch adds a new `selfFileHash` variable (set on plugin
    init), which calculates a 6-character hash of the currently-running
    python file. That variable is also added to the output of
    `!barmanagerprintstate`, so that it is easy to look up.
    DeviousNull committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    fc4a0e0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    38aee6a View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2024

  1. Merge pull request #183 from DeviousNull/add-self-hash

    Add `selfFileHash`, and print it in `!barmanagerprintstate`
    DeviousNull authored Oct 5, 2024
    Configuration menu
    Copy the full SHA
    19ca3c6 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Disable !boss command (without parameters).

    Follow-up for #170.
    
    Once the `!unboss` command is deployed, and Chobby has been updated
    to use it, this patch can be used to disable `!boss` (without
    parameters) so that users are not surprised by its behavior.
    DeviousNull committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    40fba52 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Fix !unboss silently failing for usernames containing symbols

    The Perl code which is currently used to implement the `!unboss` command handler is only valid when the name of the target is alphanumeric.
    
    This patch updates that Perl code, so that it also works when the target's name contains whitelisted symbols.
    DeviousNull committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    b91ba79 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d5e2fa0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    200f442 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f917d10 View commit details
    Browse the repository at this point in the history
  5. Add respect_avoids balance algo

    jauggy authored and DeviousNull committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    fa9d61a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ddbdb4b View commit details
    Browse the repository at this point in the history
  7. Make !joinas require approval from its target player.

    Currently, if an arbitrary player runs the command `!joinas USER`,
    a vote is called among all players in the lobby. As a result,
    even if the target player does not want someone to be able to
    control their units, the rest of the lobby can overrule them.
    
    This patch makes the following changes, active during any ongoing
    `!joinas USERNAME` vote:
    - When a non-target submits a vote, the vote state is checked for
     whether USERNAME has voted already. If so, the non-target's vote
     is counted as normal; if not, the non-target's vote is deferred.
    - If USERNAME submits a "no" vote, then the ongoing vote is
     immediately ended (as if by `!endVote`) and all deferred votes are
     discarded.
    - When USERNAME submits a "yes" or "blank" vote, all deferred votes
     are counted.
    
    This has the practical effect of requiring approval from the
    `!joinas` target, in order for the vote to succeed; the vote will
    fail if the target does not explicitly vote "yes" or "blank".
    DeviousNull committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    de31baa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d048755 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Merge pull request #188 from DeviousNull/joinas-requires-target-approval

    Make `!joinas` require approval from its target player.
    DeviousNull authored Oct 21, 2024
    Configuration menu
    Copy the full SHA
    a71d652 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. Configuration menu
    Copy the full SHA
    787085b View commit details
    Browse the repository at this point in the history
  2. Merge pull request #191 from beyond-all-reason/revert-188-joinas-requ…

    …ires-target-approval
    
    Revert "Make `!joinas` require approval from its target player."
    DeviousNull authored Nov 1, 2024
    Configuration menu
    Copy the full SHA
    25ee520 View commit details
    Browse the repository at this point in the history