Skip to content

Send handler option escaping bug. #7

@warmstarter

Description

@warmstarter

Relating to the fix in #4 and #6

/send handler also has this problem, but would probably need to be rewritten to fix it since it's literally just passing the raw string.

This simpler send can run into that issue:
/def -i ChatHandler=/send -wGame $[substr(%*,5)]

This is the proper way to set that up:
/def -i ChatHandler=/send -wGame -- $[substr(%*,5)]

Since send simply does:
/echo %{*}

Changing it to:
/echo -- %{*}

Would have it come across with the first handler example as:
-- -wGame $[substr(%*,5)]

When really what you want is
-wGame -- $[substr(%*,5)]

My guess is there's probably a wide variety of uses of the send handler, and there's not a particularly easy way to have that echo put in a '--' after the options, but before the text. So probably something best handled through the send handlers people write, but you might have other ideas. Even if not changing code, might be good to make this clear to people.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions