join rooms when invited

This commit is contained in:
Aaron Bieber 2021-04-07 20:20:05 -06:00
parent a57627fa00
commit 27700eb920

4
irc.go
View File

@ -42,6 +42,10 @@ func ircConnect(store *FStore, plugins *plugins.Plugins) error {
log.Printf("IRC: joining %q\n", r) log.Printf("IRC: joining %q\n", r)
c.Write(fmt.Sprintf("JOIN %s", r)) c.Write(fmt.Sprintf("JOIN %s", r))
} }
case "INVITE":
room := m.Trailing()
log.Printf("IRC: joining %q\n", room)
c.Write(fmt.Sprintf("JOIN %s", room))
case "PRIVMSG": case "PRIVMSG":
msg := m.Trailing() msg := m.Trailing()
from := m.Prefix.Name from := m.Prefix.Name