commit 1bfc548
Hubert Hirtz
·
2020-06-13 19:35:11 +0000 UTC
parent 219dd92
Add /msg command
1 files changed,
+9,
-0
+9,
-0
1@@ -222,6 +222,15 @@ func handleInput(s *irc.Session, buffer, content string) {
2
3 line := fmt.Sprintf("\x01ACTION %s\x01", args)
4 s.PrivMsg(buffer, line)
5+ case "MSG":
6+ split := strings.SplitN(args, " ", 2)
7+ if len(split) < 2 {
8+ return
9+ }
10+
11+ target := split[0]
12+ content := split[1]
13+ s.PrivMsg(target, content)
14 }
15 }
16