summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/input.c b/input.c
index 2d9bc46..997c570 100644
--- a/input.c
+++ b/input.c
@@ -155,7 +155,14 @@ static const struct {
 static const size_t COMMANDS_LEN = sizeof(COMMANDS) / sizeof(COMMANDS[0]);
 
 void input(struct Tag tag, char *input) {
-	if (input[0] != '/') {
+	bool slash = (input[0] == '/');
+	if (slash) {
+		char *space = strchr(&input[1], ' ');
+		char *extra = strchr(&input[1], '/');
+		if (extra && (!space || extra < space)) slash = false;
+	}
+
+	if (!slash) {
 		if (tag.id == TAG_VERBOSE.id) {
 			ircFmt("%s\r\n", input);
 		} else if (tag.id != TAG_STATUS.id) {
@@ -163,6 +170,7 @@ void input(struct Tag tag, char *input) {
 		}
 		return;
 	}
+
 	char *command = strsep(&input, " ");
 	if (input && !input[0]) input = NULL;
 	for (size_t i = 0; i < COMMANDS_LEN; ++i) {
/tr> 2020-06-07Call static_assert by _Static_assertJune McEnroe 2020-06-07Add OpenBSD to install.shJune McEnroe 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe