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

Some commands without arguments throws error #44

Closed
MinusGix opened this issue Dec 28, 2018 · 1 comment
Closed

Some commands without arguments throws error #44

MinusGix opened this issue Dec 28, 2018 · 1 comment

Comments

@MinusGix
Copy link
Contributor

MinusGix commented Dec 28, 2018

If you were to type just /whisper into the chat you would get an error back from the server of: Hook failure, 'in', 'chat': TypeError: Cannot read property 'replace' of undefined This also affects /nick but only the version currently running on the server (the one on github doesn't have a /nick version, only a command version which you'd have to manually send which works fine)

This is due to https://github.com/hack-chat/main/blob/master/server/src/commands/core/whisper.js#L88 not checking if that part of the input actually exists (due to it being undefined if you don't put any spaces).
Easy fix, will make PR to fix it in a short time.

@MinusGix MinusGix changed the title Whisper without arguments throws error Some commands without arguments throws error Dec 28, 2018
@marzavec
Copy link
Member

Fixed with 02cec78

I'll get the hooks for the other commands on git this weekend

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

No branches or pull requests

2 participants