From c59e191a395931eee4fe8799417e27d35ef049ea Mon Sep 17 00:00:00 2001
From: Tyler Stewart <hello@tylerstewart.ca>
Date: Tue, 7 Jan 2020 09:39:22 -0700
Subject: [PATCH] fix: correct OPTS error code (#190)

If an unknown option is given, the response should be 501
---
 src/commands/registration/opts.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/commands/registration/opts.js b/src/commands/registration/opts.js
index 19c940e4..b4a86a16 100644
--- a/src/commands/registration/opts.js
+++ b/src/commands/registration/opts.js
@@ -13,7 +13,7 @@ module.exports = {
     const [_option, ...args] = command.arg.split(' ');
     const option = _.toUpper(_option);
 
-    if (!OPTIONS.hasOwnProperty(option)) return this.reply(500);
+    if (!OPTIONS.hasOwnProperty(option)) return this.reply(501, 'Unknown option command');
     return OPTIONS[option].call(this, args);
   },
   syntax: '{{cmd}}',