Commit Diff
Diff:
5fee25ce6c20ee12d46cc74bea999bf991a68c0c
56842f402accf4705a52d66c041212dced2a3039
Commit:
56842f402accf4705a52d66c041212dced2a3039
Tree:
0268a53005e3bf87e1378407932a124e499e0dba
Author:
Omar Polo <op@omarpolo.com>
Date:
Wed Jun 29 19:33:01 2022 UTC
Message:
teach gemitbot how to pong
commit - 5fee25ce6c20ee12d46cc74bea999bf991a68c0c
commit + 56842f402accf4705a52d66c041212dced2a3039
blob - 1bb656552d1d926a5c57424bba6cf5fe9750375f
blob + 9619cce7060f38cc4a5be670bf55523b678ccb97
--- main.go
+++ main.go
@@ -166,11 +166,22 @@ func gempagetitle(conn *irc.Conn, line *irc.Line) {
}
}
+func pong(conn *irc.Conn, line *irc.Line) {
+ if line.Text() != ",ping" {
+ return
+ }
+ conn.Privmsg(
+ channel,
+ "pong :)",
+ )
+}
+
func dostuff(conn *irc.Conn, line *irc.Line) {
matrix2gemini(conn, line)
messageTooLong(conn, line)
wwwpagetitle(conn, line)
gempagetitle(conn, line)
+ pong(conn, line)
// ...
}
Omar Polo