CTF2021/irc_bot
Archived
4
0

Remove [BOT] prefix

This commit is contained in:
Denis Zheleztsov 2021-01-16 11:06:44 +03:00
parent 94fde9eada
commit 16acf9e70b
Signed by: Difrex
GPG Key ID: D423378A747E202E

10
main.go
View File

@ -14,7 +14,7 @@ const channel = "#ctf"
const (
pattern = "(?i)\\b(cat|gato|miau|meow|garfield|lolcat)[s|z]{0,1}\\b"
msgPrefix = "[BOT] I love cats! Here's a fact: %s"
msgPrefix = "I love cats! Here's a fact: %s"
)
type catFact struct {
@ -41,10 +41,10 @@ func main() {
e.Connection.Privmsg("nickserv", "identify "+os.Getenv("CTF2021PASS"))
e.Connection.Join(channel)
e.Connection.Privmsg(channel, `[BOT] I'm a cat facts bot!`)
e.Connection.Privmsg(channel, `[BOT] Inspired from https://github.com/go-chat-bot/plugins/blob/master/catfacts/catfacts.go`)
e.Connection.Privmsg(channel, `[BOT] Try cat /etc/passwd ^_^`)
e.Connection.Privmsg(channel, `[BOT] Source code and issue tracker: https://gitea.difrex.ru/CTF2021/irc_bot`)
e.Connection.Privmsg(channel, `I'm a cat facts bot!`)
e.Connection.Privmsg(channel, `Inspired from https://github.com/go-chat-bot/plugins/blob/master/catfacts/catfacts.go`)
e.Connection.Privmsg(channel, `Try cat /etc/passwd ^_^`)
e.Connection.Privmsg(channel, `Source code and issue tracker: https://gitea.difrex.ru/CTF2021/irc_bot`)
})
irccon.AddCallback("PRIVMSG", func(e *irc.Event) {