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

Idea: categorize messages (including in-server) with prefix coding #692

Open
wyld-sw opened this issue May 6, 2023 · 3 comments
Open

Idea: categorize messages (including in-server) with prefix coding #692

wyld-sw opened this issue May 6, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@wyld-sw
Copy link
Member

wyld-sw commented May 6, 2023

Some MUCKs use muf words and mpi macros to visually separate messages to help identify success, failure, or unknown. I've seen this called "stoplights" as they're usually accompanied by a red/yellow/green color.

This seems to be used well on HLM, and having it built-in for server messages might be good too, in addition to the following MUF primitives and MPI functions:

  • PREFIX_GOOD or {prefixgood:} could change a string "Your command was successful" into something like "<*> Your command was successful.", with a system-defined prefix that may include color codes.
  • PREFIX_WARN or {prefixwarn:} could change a string "Please review the above messages." into something like "<?> Please review the above messages.", with a system-defined prefix that may include color codes.
  • PREFIX_BAD or {prefixbad:} could change a string "Permission denied." something like "<!> Permission denied.", with a system-defined prefix that may include color codes.

Sysparms that could work with this include:

  • enable_message_categories. if no, none of these new words or macros [or server functionality] change the message.
  • message_category_good_prefix. Prepended to the message if the "good" category is used. Can include color codes.
  • message_category_bad_prefix. Prepended to the message if the "bad" category is used. Can include color codes.
  • message_category_warn_prefix. Prepended to the message if the "warn" category is used. Can include color codes.

If color codes are accepted, we would need to add a reset code in case the prefix doesn't include it.

(names of sysparms, primitives, and functions not set in stone, of course!)

Thoughts?

@wyld-sw wyld-sw added the enhancement New feature or request label May 6, 2023
@wyld-sw wyld-sw changed the title Idea: categorize system messages with color- (and/or prefix-) coding Idea: categorize messages (including in-server) with prefix coding May 6, 2023
@tanabi
Copy link
Collaborator

tanabi commented May 7, 2023

I see the utility here. These could be implemented as 'internal defines' for the MUF ones as really each one of these calls is just some strcat's and swap's.

I don't really see a need to make @tune parameters as that kind of neuters the point. It would be trivial for a MUCK to override the system defaults with their own defines if they wanted, or maybe msgmacs overrides for MPI (not sure if msgmacs can override an MPI macro, I've never tried ...)

Can always add the tunes later if there's a request from an operator for that, as well. Just keep it simple to begin with since this is kind of an experimental feature -- you know, we'd be adding this and seeing if anyone wants to use it rather than something a user has requested.

@wyld-sw
Copy link
Member Author

wyld-sw commented May 7, 2023

Ok, makes sense about starting off with no @tunes.

HLM uses:

  • [%] (green) for "good"
  • [?] (yellow) for "warn"
  • ]![ (red, note reversed brackets) for "bad"

Are these good, or should we come up with our own? If these look good, I may pop into HLM to discuss our intentions.

@tanabi
Copy link
Collaborator

tanabi commented May 7, 2023

Those are fine. The 'good' one is a little weird to me but I don't have a better idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants