summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--catgirl.17
-rw-r--r--input.c13
2 files changed, 20 insertions, 0 deletions
diff --git a/catgirl.1 b/catgirl.1
index 5cb9ae8..62f373e 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -171,6 +171,13 @@ The default
 is
 .Dq Goodbye .
 .
+.It Ic /raw Op Ar command
+Toggle the
+.Ql -raw-
+view
+and send the raw IRC
+.Ar command .
+.
 .It Ic /topic Op Ar topic
 Show the topic of the current channel
 or set it to
diff --git a/input.c b/input.c
index 4814841..2cd0ca6 100644
--- a/input.c
+++ b/input.c
@@ -49,6 +49,18 @@ param(struct Tag tag, const char *command, char **params, const char *name) {
 
 typedef void (*Handler)(struct Tag tag, char *params);
 
+static void inputRaw(struct Tag tag, char *params) {
+	(void)tag;
+	if (!params || !self.raw) {
+		self.raw ^= true;
+		uiFmt(
+			TagRaw, UIWarm, "Raw view is %s",
+			self.raw ? "enabled" : "disabled"
+		);
+	}
+	if (params) ircFmt("%s\r\n", params);
+}
+
 static void inputMe(struct Tag tag, char *params) {
 	privmsg(tag, true, params ? params : "");
 }
@@ -168,6 +180,7 @@ static const struct {
 	{ "/part", inputPart },
 	{ "/query", inputQuery },
 	{ "/quit", inputQuit },
+	{ "/raw", inputRaw },
 	{ "/topic", inputTopic },
 	{ "/url", inputURL },
 	{ "/view", inputView },
mp;id=99c8a9fec05e88dca982b2d122925b6b177b9cf8&follow=1'>Send automated messages to TagStatus with UIColdJune McEnroe 2018-12-02Various man page tweaks and editsJune McEnroe 2018-12-02Fix UI resume on /urlJune McEnroe 2018-12-02Add sandman.m to READMEJune McEnroe 2018-12-01Crudely handle reconnecting after suspendJune McEnroe 2018-12-01Fix sandman hangJune McEnroe It was hanging after sending SIGTSTP to its child, then receiving a SIGCHLD to indicate the child had stopped. 2018-12-01Use sigaction in sandmanJune McEnroe 2018-11-30Handle signals consistently in the event loopJune McEnroe 2018-11-30Separate ircConnect and ircDisconnectJune McEnroe 2018-11-30Measure length of log timestamp more consistentlyJune McEnroe 2018-11-30Reformat sandman Objective-C codeJune McEnroe 2018-11-30Ignore sandmanJune McEnroe Oops. 2018-11-30Add sandmanJune McEnroe 2018-11-29Strip timestamps from log replayJune McEnroe Also fix string length. %.*s does not behave as one might expect when writing wchar_t. 2018-11-29Add basic log replayJune McEnroe 2018-11-29Show unread count in term titleJune McEnroe Also render status line with just spaces. Looks much cleaner this way. 2018-11-29Handle no such nick errorJune McEnroe 2018-11-29Add /whoisJune McEnroe 2018-11-29Set LIBRESSL_PREFIX in Darwin.mkJune McEnroe I think this is still the right path for Homebrew, which is the most popular... 2018-11-28Add NetBSD.mkJune McEnroe 2018-11-28Make use of config.mk and add Darwin.mkJune McEnroe