From d8cffb8ae7c949a85b35a15f344fec592d7df060 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 27 Feb 2019 00:17:59 -0500 Subject: Add /move command --- input.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'input.c') diff --git a/input.c b/input.c index 45de9f1..bbbc0d3 100644 --- a/input.c +++ b/input.c @@ -117,6 +117,15 @@ static void inputMan(struct Tag tag, char *params) { eventWait((const char *[]) { "man", "1", "catgirl", NULL }); } +static void inputMove(struct Tag tag, char *params) { + char *num = strsep(¶ms, " "); + if (num) { + uiMoveTag(tag, strtol(num, NULL, 0), num[0] == '+' || num[0] == '-'); + } else { + uiLog(tag, UIHot, L"/move requires a number"); + } +} + static void inputOpen(struct Tag tag, char *params) { if (params && !isdigit(params[0])) { urlOpenMatch(tag, params); @@ -174,6 +183,7 @@ static const struct { { "/join", inputJoin }, { "/man", inputMan }, { "/me", inputMe }, + { "/move", inputMove }, { "/names", inputWho }, { "/nick", inputNick }, { "/open", inputOpen }, -- cgit 1.4.1-2-gfad0