CTF2021/irc_bot
Archived
4
0
Fork 0

Send facts to the user instead of channel

This commit is contained in:
Denis Zheleztsov 2021-02-12 19:22:28 +03:00
parent e8b4a906b0
commit 3e691011d4
Signed by: Difrex
GPG Key ID: D423378A747E202E

View File

@ -306,7 +306,7 @@ func catGif(e *irc.Event) (string, error) {
return "", err
}
log.Println("Send gif")
e.Connection.Privmsg(channel, fmt.Sprintf(gifPrefix, res.Request.URL.String()))
e.Connection.Privmsg(e.Nick, fmt.Sprintf(gifPrefix, res.Request.URL.String()))
return fmt.Sprintf(gifPrefix, res.Request.URL.String()), nil
}
@ -337,7 +337,7 @@ func catFacts(e *irc.Event) (string, error) {
return "", nil
}
e.Connection.Privmsg(channel, fmt.Sprintf(msgPrefix, data.Fact))
e.Connection.Privmsg(e.Nick, fmt.Sprintf(msgPrefix, data.Fact))
return fmt.Sprintf(msgPrefix, data.Fact), nil
}