IRC !list not working

Issue #46 resolved
Michael Nova created an issue

!list will give an incorrect listing of players currently online, ?list works fine though.

[00:38] <TheDarkrai85> !list
[00:38] <McObot> (MCS) 4 in game: DarterSwiftblade, schwoot_schwoo, PassiveFriendly, TEllins
[00:39] <TheDarkrai85> ?list
[00:39] <l4mRbot> # 6 in game: huskyredstone, StrangeOne101, tindwcel, MovesLikeJaggi, TheDarkrai85, MINECRAFTMAN280

Comments (9)

  1. Riot

    This is not really a bug; the player list is cached and updated every 60 seconds. This is to prevent potential abuse by someone in irc spamming the bot, or to limit the threat from any other unknown attack vector. Since players don't log in and out that often, 60 seconds doesn't seem too bad to me.

  2. Evan Markowitz

    Why not update whenever someone joins or leaves the game? We are tracking that anyway for the ircbot

  3. 14mRh4X0r
    • changed status to open

    @SlowRiot That was not the issue. Issue was that the cron job wasn't getting run. It was the first thing I checked, and if you take a look at the IRC output, you'll notice it's entirely different, within just a minute (highly unlikely).

    @techkid6 We're not tracking whether users are ingame or not, we're just emitting a message when a user joins or leaves, based on the server's console output. Currently, we're querying the game itself about players, which, at least in my opinion, is more reliable. Granted, we could query it every time !list is invoked, but that seems like overkill.

    Reopened because cron not doing its job needs to be investigated.

  4. Riot

    Calling anything machine-intensive every time an irc bot command is called is a denial of service opportunity, however mild, and should generally be avoided on principle.

    However, players leaving and joining isn't that frequent an occurrence, so it could be a good idea to refresh the cached player list when a join or a part are detected; either by the IRC bot or more directly with the exec system.

    Further to this issue, i've seen no evidence of cron failing to operate at any point thus far

  5. Log in to comment