Browse Source

disable old greeter

master
dave 3 months ago
parent
commit
a94f1751ff
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      cmd/swarm/main.go

+ 11
- 2
cmd/swarm/main.go View File

@@ -81,7 +81,7 @@ func handleIRCCon(c *irc.Client, m *irc.Message) {
} else if text[len(text)-1] == "invite" {
c.Write("INVITE " + victim + " " + channel)
sent++
} else if strings.Contains(m.Trailing(), "greetings") {
}/* else if strings.Contains(m.Trailing(), "greetings") {
c.WriteMessage(&irc.Message{
Command: "PRIVMSG",
Params: []string{
@@ -89,9 +89,18 @@ func handleIRCCon(c *irc.Client, m *irc.Message) {
victim + ": hi",
},
})
}*/
} else if m.Command == "JOIN" && c.FromChannel(m) {
if m.Prefix.Name != c.CurrentNick() {
c.WriteMessage(&irc.Message{
Command: "PRIVMSG",
Params: []string{
m.Params[0],
"greetings " + m.Prefix.Name,
},
})
}
}

}

func main() {


Loading…
Cancel
Save