Skip to content

Remove line breaks issue#109#111

Merged
devblackops merged 4 commits intoposhbotio:masterfrom
AndrewPla:RemoveLineBreaks-Issue#109
Oct 6, 2018
Merged

Remove line breaks issue#109#111
devblackops merged 4 commits intoposhbotio:masterfrom
AndrewPla:RemoveLineBreaks-Issue#109

Conversation

@AndrewPla
Copy link
Copy Markdown
Contributor

Switched to using the command parser to determine if a message is a bot command or not.

Description

Related Issue

Issue #109

How Has This Been Tested?

It's a small change, but it has fixed my issue. There may be a different way of handling this, but I see that the $parsedCommand is referred to in a few other places so I think it matches with the style.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ x] I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • [ x] All new and existing tests passed.

Switched to using the command parser to determine if a message is a command
…ommand

The $firstword contained whitespace that caused the command to fail isbotcommand. We switched to using the parsed command, which trims the whitespace.
@devblackops devblackops self-requested a review September 14, 2018 03:39
@devblackops devblackops self-assigned this Sep 14, 2018
@devblackops devblackops added this to the v0.11.1 milestone Sep 14, 2018
@AndrewPla
Copy link
Copy Markdown
Contributor Author

AndrewPla commented Sep 14, 2018 via email

The command is contained inside the command property so now the -match will evaluate properly.
@devblackops
Copy link
Copy Markdown
Member

Thanks @AndrewPla!

@devblackops devblackops merged commit a9f852a into poshbotio:master Oct 6, 2018
devblackops added a commit that referenced this pull request Oct 26, 2018
#111 broke the ability to run a command by the fully qualified command
name <plugin>:<commandname>:<version> by only testing the command name
against the possible command prefixes.
This reverts that behavior and tests the first word of the message string
but also ensures CRLF is removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants