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

Invalid commands should not send as messages #390

Closed
sudocurse opened this issue Aug 4, 2014 · 5 comments
Closed

Invalid commands should not send as messages #390

sudocurse opened this issue Aug 4, 2014 · 5 comments

Comments

@sudocurse
Copy link

Commands with leading slashes should not send to the recipient(s) in the current window, and should instead produce an error message, either on the current window or the status window.

19:42:52 - contact: alright, see you then
19:52:52 - me: /window close
19:53:06 - me: whoops, sorry
@boothj5 boothj5 closed this as completed in e38ebe8 Aug 4, 2014
@boothj5
Copy link
Collaborator

boothj5 commented Aug 4, 2014

A fix for this is in master, with the "Unknown command" message appearing in the console window.

@boothj5 boothj5 added bug and removed bug labels Aug 4, 2014
@boothj5 boothj5 added this to the 0.4.3 milestone Aug 4, 2014
@akarl
Copy link

akarl commented Aug 6, 2014

I use YouTrack at work and the jabber bot takes commands by prefixing the messages with a slash. This does not work as the slash isn't sent to the receiver.

EDIT:
I found out how to do my reading the code. I need to prefix with "/me". This isn't very convenient at all.

EDIT2:
Actually that doesn't work either.

@boothj5
Copy link
Collaborator

boothj5 commented Aug 6, 2014

Perhaps in the long run the command prefix character can be configured for profanity. For now I'll make it an option to disable/enable sending the /.

I guess it would make sense to allow the user to escape the command prefix too, for example if your chat bot has a /who command, then profanity would never send it as it has it's own /who. So an escape would be required such as //who or \/who.

@boothj5 boothj5 reopened this Aug 6, 2014
@akarl
Copy link

akarl commented Aug 6, 2014

Yes I think that an escape character would be the best option because the commands could be the same both inside Profanity and for the receiver. In our case /help is a command for both.

@boothj5
Copy link
Collaborator

boothj5 commented Aug 6, 2014

Now a double slash will escape the command and allow it to be sent e.g.:

//help

Should send /help to your chat room/recipient.

I went for // rather than \/ as it seemed easier to type.

Note that /me is a special case and is always sent, since most clients handle it as a user action/mood etc.

Please reopen the issue if you find any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants