/me should conform to XEP-0245

Bug #501407 reported by buzzdee on 2009-12-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

coccinella has already support for /me, however, it doesn't conform to the recommendations specified in XEP-0245.

Example 4. Some Non-Commands
<body>/meshrugs in disgust</body> <--- OK
<body>/me's disgusted</body> <--- OK
<body> /me shrugs in disgust</body> <--- Wrong
<body>"/me shrugs in disgust"</body> <--- OK
<body>* Atlas shrugs in disgust</body> <--- OK
<body>Why did Atlas say "/me shrugs in disgust"?</body> <--- OK
<body>Why did Atlas say " /me shrugs in disgust"?</body> <--- Wrong

buzzdee (sebastia) wrote :

XEP-0245 also states the string should show up italic.

sander (s-devrieze) wrote :

Currently the procedure ::IRCActions::ParseWordHook (IRCActions.tcl) checks if each word in a string matches "/me". Words are passed to this procedure by ::Text::ParseMsg (Utils.tcl). This function strips leading spaces which is why #3 goes wrong. #7 goes wrong because all words are parsed in a string.

Maybe ::Text::ParseMsg should be rewritten so that it only checks the word defined by the first character in a string until the next space. I don't think there is a need to check every word, do we? Alternatively (maybe better), we can use textPreParseHook which is not yet defined. The second option may also make it easier to set the "-slant italic" font option on the whole string (incread of only the word).

What do you think?

buzzdee (sebastia) wrote :

Yes, checking every word as it seems to be right now, seems to be too much. AFAIK there is no IRC command that starts somewhat in the middle of a text message.
They always begin with
on a new line.

I haven't yet looked at the code, however, if you think the second option is easier to implement, and later to maintain, then we probably should take that route.

buzzdee (sebastia) on 2010-03-28
Changed in coccinella:
milestone: 0.96.18 → 0.96.20
buzzdee (sebastia) on 2010-09-14
Changed in coccinella:
milestone: 0.96.20 → 0.96.22
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers