Ticket #7192 (closed suggested feature: fixed)

Opened 2 years ago

Last modified 19 months ago

@chatformat

Reported by: walker@… Owned by: walker
Priority: minor Milestone: 1.8.3p4
Keywords: Cc:
Visibility: Public

Description

With @pageformat in, @chatformat is a possibility. What do y'all think
of @chatformat?

Basically:

> +p Hey.
<Public> El Walker says, "Hey"
> @chatformat me=-%0- [if(%2,%2%b)][speak(%#,%1)]
> +p Hey
-Public- El Walker says, "Hey"
> @chatformat me=<%0> [edit(wrap([if(%2,%2%b)][speak(%#,%1)],55,65),%r,%r<%0>[space(5)])]
> @chat public=int main(int argc,char *argv\[\]) \{%r%b%breturn 0;%r\}
<Public> El Walker says, "int main(int argc,char *argv[]) {
<Public>       return 0;
<Public>     }

%0: Channel name
%1: Message
%2: Chantitle of %#
%3: '', connected/reconnected/disconnected/partially disconnected/quits/joins

Thoughts? Comments? Votes?

- Greg

Change History

  Changed 2 years ago by ray73864

sounds interesting, i quite like this idea

Make it so Number 1

  Changed 2 years ago by walker

  • owner changed from devteam to walker
  • summary changed from @chanformat to @chatformat

  Changed 2 years ago by Nathan Baum

Does @chatformat apply to everything you _hear_ on channels, or everything you _say_ on channels?

  Changed 21 months ago by raevnos

  • type changed from incoming to suggested feature
  • milestone set to 1.8.3p2

Go for it for p2.

  Changed 21 months ago by raevnos

  • milestone changed from 1.8.3p2 to 1.8.3p3

Bumping to p3 at Walker's request so it can more time to be tested thoroughly on M*U*S*H.

  Changed 19 months ago by raevnos

  • milestone changed from 1.8.3p3 to 1.8.3p4

follow-up: ↓ 8   Changed 19 months ago by anonymous

I have @chatformat complete on my test mush. @pageformat was also
rewritten to use "messageformat", my new helper function for @*format.

Before I commit, a few issues have come up we need resolving:

* I use %0 == '"', ':', ';', '|' for say, pose, semipose and cemit
  respectively. I also have '@' for the "channel system"
  messages such as "Foo has joined." and "Foo has disconnected." I'm not
  really sure I like this, but I can't think of a more appropriate
  method. Any ideas? 
 
  Also, the fact it uses '"' gets an extra '"' chat_strip_quote is set
  to "no". As I'm a fan of explicitness, chat_strip_quote is always yes
  for me.

* How do we want system messages dealt with? 'system' messages, include
  the names already.  (I don't like it, but that's a _lot_ more
  redundant code digging to change to make "system" messages more
  friendly, even touching bsd.c.) They have a type of '@', for the
  moment, so a person can do:
    @chatformat me=switch(%0,@,<%1> %2,<%1> [speak(%#,%2)])

* My current registers are:

%0: "type" - '"', ':', ';' and '|'. It's %0 because if it's @, it's a
    "system" message.
    Also, the idea was to allow speak(%#,%0%2) and allow
    it to be appropriately speak()'d, so +p |foo wouldn't become an emit
    by accident.

    Also, the fact it uses '"' gets an extra '"' chat_strip_quote is set
    to "no". As I'm a fan of explicitness, chat_strip_quote is always
    yes for me.

%1: Channel name.

%2: The message itself, not including the " : ' or ;.

%3: Speaker's accented name, or "someone" if the channel is notitle
    noname, or noname and the person has no title. This allows us to
    be more in keeping with noname, etc flags.

%4: Speaker's chantitle.

* speak(), while neat and highly desirable in this situation, lacks one
  critical thing to be hugely useful for this: The ability to use an
  arbitary string for the speaker's name.  Namely, chantitle being of
  import. My current "fix" for this on my test mush is to make
  speak(@Blah,...) not try and locate an object, but instead to use
  "Blah" as the name. '@' is invalid in Player names, but not in object
  names, so it may not be desirable, but a similar solution could be
  entertained. With a method such as this:

      <%1> speak(@[if(%4,%4%b)]%3,%0%2)

  will make titles properly used in speak. 

Thoughts, comments, flames?

- Greg

in reply to: ↑ 7   Changed 19 months ago by raevnos

Replying to [comment:7 ]:

I have @chatformat complete on my test mush. @pageformat was also rewritten to use "messageformat", my new helper function for @*format. Before I commit, a few issues have come up we need resolving: * I use %0 == '"', ':', ';', '|' for say, pose, semipose and cemit respectively. I also have '@' for the "channel system" messages such as "Foo has joined." and "Foo has disconnected." I'm not really sure I like this, but I can't think of a more appropriate method. Any ideas?

I like it.

* My current registers are: %0: "type" - '"', ':', ';' and '|'. It's %0 because if it's @, it's a "system" message. Also, the idea was to allow speak(%#,%0%2) and allow it to be appropriately speak()'d, so +p |foo wouldn't become an emit by accident. Also, the fact it uses '"' gets an extra '"' chat_strip_quote is set to "no". As I'm a fan of explicitness, chat_strip_quote is always yes for me. %1: Channel name. %2: The message itself, not including the " : ' or ;. %3: Speaker's accented name, or "someone" if the channel is notitle noname, or noname and the person has no title. This allows us to be more in keeping with noname, etc flags.

%4: Speaker's chantitle.

I don't you need 3 and 4. accname() and ctitle() can be used instead.

* speak(), while neat and highly desirable in this situation, lacks one critical thing to be hugely useful for this: The ability to use an arbitary string for the speaker's name. Namely, chantitle being of import. My current "fix" for this on my test mush is to make speak(@Blah,...) not try and locate an object, but instead to use "Blah" as the name. '@' is invalid in Player names, but not in object names, so it may not be desirable, but a similar solution could be entertained. With a method such as this: <%1> speak(@[if(%4,%4%b)]%3,%0%2) will make titles properly used in speak.

Good idea, but use something that's illegal in object names too. Maybe &?

  Changed 19 months ago by walker

  • status changed from new to closed
  • resolution set to fixed

Implemented.

Note: See TracTickets for help on using tickets.