about summary refs log tree commit diff
path: root/input.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--input.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/input.c b/input.c
index 51fe947..46bbc56 100644
--- a/input.c
+++ b/input.c
@@ -69,6 +69,14 @@ static void inputWho(wchar_t *params) {
 	ircFmt("WHO %s\r\n", chat.chan);
 }
 
+static void inputTopic(wchar_t *params) {
+	if (params) {
+		ircFmt("TOPIC %s :%ls\r\n", chat.chan, params);
+	} else {
+		ircFmt("TOPIC %s\r\n", chat.chan);
+	}
+}
+
 static void inputQuit(wchar_t *params) {
 	if (params) {
 		ircFmt("QUIT :%ls\r\n", params);
@@ -85,6 +93,7 @@ static const struct {
 	{ L"names", inputWho },
 	{ L"nick", inputNick },
 	{ L"quit", inputQuit },
+	{ L"topic", inputTopic },
 	{ L"who", inputWho },
 };
 static const size_t COMMANDS_LEN = sizeof(COMMANDS) / sizeof(COMMANDS[0]);
ass='logheader'>2020-12-30Add postfix $ operator to bitJune McEnroe 2020-12-29Add make lexerJune McEnroe This is kind of a mess and needs to be cleaned up against more careful reading of the make grammar. 2020-12-29Clean up C lexerJune McEnroe This ordering of rules feels much cleaner. 2020-12-29Clean up hilex code somewhatJune McEnroe 2020-12-29Match lex/yacc %% %{ %} lines as MacroJune McEnroe 2020-12-29Match top-level C definitions as IdentifierTagJune McEnroe 2020-12-29Match C type declarations as IdentifierTagJune McEnroe 2020-12-29Match function-like macro definitions as IdentifierTagJune McEnroe 2020-12-29Reconfigure C macro start conditionsJune McEnroe 2020-12-29Document HTML class namesJune McEnroe 2020-12-29Rename Tag class to IdentifierTagJune McEnroe 2020-12-29Change HTML class from hi to hilexJune McEnroe You can tell I was just copying the HTML code huh. 2020-12-29Add hilex HTML outputJune McEnroe