#589 Custom per-server user information

open
nobody
None
5
2012-10-30
2010-01-21
Nicos Gollan
No

In some cases, it may be useful to provide readily-visible user information beyond the nickname. For example, in an MMO, a player may change guilds, play different characters, etc. In that case, a single nickname bound to a certificate may not be enough.

One possible extension to work around that issue may be to give users a way to provide free-form key/value pairs on a per-server basis that other users can then display in their clients.

For example, consider someone playing the game "Farm Online" as a character "Potatohead" in the guild "Produce United". When joining a Mumble server for a large-scale pest eradication raid, that player might provide the following K/V pairs:

  • FO:Character => "Potatohead"
  • FO:Guild => "Produce United"

Other players could then enable display of specific tags, e.g. through the context menu of the channel view.

This raises some issues with the current approach:

  • How would that work with the overlay? Should the overlay just continue to show the user texture or nickname, or should it show the custom information if it's available?
  • How should display in the channel list work? Should such information just be displayed as additional columns, or should users get a way to have freeform formatting? One possibility would be to allow format strings like "${FO:Guild} | ${FO:Character ? Nickname}". That would of course make things complicated, and should be seen as an alternative to a user-friendly solution. (Of course, just displaying the nickname unless a format string is given would not change anything.)
  • How to handle abuse? It must be possible to avoid overly long values, format string attacks, etc. without introducing arbitrary limits like an n-character limit for values. This is a potential server-side setting to avoid clients disturbing service by pushing megabytes of information.

Discussion

  • Nicos Gollan
    Nicos Gollan
    2010-01-28

    After some discussion, let's reduce it from overkill to useful. What I really want is quickly visible meta-information for each user, so maybe an easier solution that's also been proposed on IRC would be good.

    The suggestion was to display some information from the user comment in the channel/user view in a line below the nickname. My suggestion would be to take e.g. the first

    HTML element or the first paragraph or line to the first linebreak from the comment and use a sanitized version without any formatting of the text in there.

     
  • Nicos Gollan
    Nicos Gollan
    2010-06-20

    Added a patch against git master which implements showing the plain text from the first

    element in the comment in the userlist. It's far from perfect, takes a lot of CPU for refreshing list items, and depends on QWebKit (so it requires a rather recent version of Qt).

     
  • Nicos Gollan
    Nicos Gollan
    2010-06-21

    More patches along the same private branch (numbers 2--4).

    The extended list display can now be set through the UI settings (defaults to off). There are also some changes to UserModel and ModelItem which may break things, I just checked it didn't crash withing a minute of logging in to an empty server, but what I've seen looks promising.

    There is still the performance issue, but since it's not using WebKit anymore and only uses a persistent QTextEditor instance, it's better now. The new UserModel should make it a tad easier to implement caching.

     
  • Nicos Gollan
    Nicos Gollan
    2010-06-21

    Removed commit-wise patches, replaced with a big one rebased to current master.

     
  • Nicos Gollan
    Nicos Gollan
    2010-06-21

    New patch 0002-Catering-to-critique.patch fixes some issues kindly brought up by slicer and pcgod.

     
  • Nicos Gollan
    Nicos Gollan
    2010-06-23

    Updated patch: added comment line caching, removed explicit -lsndfile in the client .pro file.