about summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/command.c b/command.c
index 44d0d54..6d9ef9b 100644
--- a/command.c
+++ b/command.c
@@ -71,6 +71,13 @@ static void commandMe(size_t id, char *params) {
 	commandPrivmsg(id, buf);
 }
 
+static void commandMsg(size_t id, char *params) {
+	(void)id;
+	char *nick = strsep(&params, " ");
+	if (!params) return;
+	ircFormat("PRIVMSG %s :%s\r\n", nick, params);
+}
+
 static void commandJoin(size_t id, char *params) {
 	size_t count = 1;
 	if (params) {
@@ -186,6 +193,7 @@ static const struct Handler {
 	{ "/help", commandHelp },
 	{ "/join", commandJoin },
 	{ "/me", commandMe },
+	{ "/msg", commandMsg },
 	{ "/names", commandNames },
 	{ "/nick", commandNick },
 	{ "/notice", commandNotice },
itle='2019-07-27 15:06:08 -0400'>2019-07-27Rewrite Makefile once more with more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe 2019-07-27Remove scheme text linkJune McEnroe 2019-07-26Update Dark.terminalJune McEnroe 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe 2019-07-24Remove histedit from bitJune McEnroe