summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-14 21:36:58 -0500
committerJune McEnroe <june@causal.agency>2020-02-14 21:36:58 -0500
commit39a343980b634f41377d72426ced50ca8ae0fb64 (patch)
treeaf29e7daa153c7427bfaffcf42ea71bec5b96241 /command.c
parentAdd /away (diff)
downloadcatgirl-39a343980b634f41377d72426ced50ca8ae0fb64.tar.gz
catgirl-39a343980b634f41377d72426ced50ca8ae0fb64.zip
Add /invite
Diffstat (limited to 'command.c')
-rw-r--r--command.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/command.c b/command.c
index 00c3040..f59176f 100644
--- a/command.c
+++ b/command.c
@@ -135,6 +135,12 @@ static void commandNames(size_t id, char *params) {
 	replies.names++;
 }
 
+static void commandInvite(size_t id, char *params) {
+	if (!params) return;
+	char *nick = strsep(&params, " ");
+	ircFormat("INVITE %s %s\r\n", nick, idNames[id]);
+}
+
 static void commandList(size_t id, char *params) {
 	(void)id;
 	if (params) {
@@ -251,6 +257,7 @@ static const struct Handler {
 	{ "/debug", .fn = commandDebug, .restricted = true },
 	{ "/exec", .fn = commandExec, .restricted = true },
 	{ "/help", .fn = commandHelp },
+	{ "/invite", .fn = commandInvite },
 	{ "/join", .fn = commandJoin, .restricted = true },
 	{ "/list", .fn = commandList },
 	{ "/me", .fn = commandMe },
the hell are people making multipart/alternative with only text/html inside? 2020-04-29Highlight diff/index/---/+++ lines of patches as wellJune McEnroe 2020-04-29Turn URLs into HTML linksJune McEnroe 2020-04-28Clean up html.cJune McEnroe 2020-04-27Style groups in recipientsJune McEnroe Can't actually test this oops. 2020-04-27Clean up export.cJune McEnroe 2020-04-27Clean up decode.cJune McEnroe 2020-04-26Free orderJune McEnroe Oops 2. 2020-04-26Clean up atom.c and fix base URLsJune McEnroe Base URL should not be URL escaped! 2020-04-26Clean up archive.cJune McEnroe 2020-04-26Add -q to exit non-zero on early exitJune McEnroe 2020-04-26Rearrange some of archive.hJune McEnroe 2020-04-26Free part.parts.ptrJune McEnroe Oops. 2020-04-26Rename part->id to part->contentIDJune McEnroe Disambiguate with messageID. 2020-04-26Iterate through nested multiparts to find content for AtomJune McEnroe Also fixes content for multipart/signed. 2020-04-26Include Cc address in reply mailtosJune McEnroe 2020-04-26Use %R for RFC numbers in STANDARDS sectionJune McEnroe 2020-04-26Add mailto spec to STANDARDSJune McEnroe 2020-04-26Increase space between nav itemsJune McEnroe 2020-04-26Add mailto address for the archiveJune McEnroe 2020-04-26Put dates on new lines in indexJune McEnroe 2020-04-26Include <> around Message-Id in mailto: URLsJune McEnroe 2020-04-26Add link to index on thread pagesJune McEnroe 2020-04-26Fall back to Content-Type name parameter for attachmentsJune McEnroe 2020-04-26Remove margins in article.message headerJune McEnroe 2020-04-26Generate index.atomJune McEnroe 2020-04-26Generate XHTML content in Atom entriesJune McEnroe 2020-04-25Style index pageJune McEnroe 2020-04-25Render index.htmlJune McEnroe 2020-04-25Wrap <summary> replies count in <data>June McEnroe 2020-04-25Accumulate thread envelopes before concatenationJune McEnroe 2020-04-24Free envelope in concatDataJune McEnroe 2020-04-24Use replyTo address in mailto:June McEnroe 2020-04-23Wrap quoted lines in <q>June McEnroe