Update bot for release

This commit is contained in:
2021-03-08 15:52:05 -05:00
parent 05dcc0a949
commit 23ccc1a819

View File

@ -16,7 +16,7 @@ var (
k = keybase.NewKeybase()
channel keybase.Channel
irc *hbot.Bot
botNick = "keyrcbot" // Set this for IRC Nickname
botNick = "kblink" // Set this for IRC Nickname
serv = flag.String("server", "chat.freenode.net:6667", "hostname and port") // Set this for whatever server you're using
nick = flag.String("nick", botNick, "nickname for the bot")
logOpts = loggy.LogOpts{
@ -81,7 +81,7 @@ func addIrcTrigger(name string) {
return
}
name = strings.Replace(name, "#", "", -1)
log.LogWarn(fmt.Sprintf("Setting up trigger for #%s", name))
// log.LogWarn(fmt.Sprintf("Setting up trigger for #%s", name))
var botLessTrigger = hbot.Trigger{
func(b *hbot.Bot, m *hbot.Message) bool {
log.LogInfo(fmt.Sprintf("i[%s]: %s", m.From, m.Content))
@ -100,10 +100,10 @@ func addIrcTrigger(name string) {
}
irc.Channels = append(irc.Channels, fmt.Sprintf("#%s", name))
irc.Join(fmt.Sprintf("#%s", name))
log.LogCritical(fmt.Sprintf("Adding trigger for #%s to bot", name))
//log.LogCritical(fmt.Sprintf("Adding trigger for #%s to bot", name))
irc.AddTrigger(botLessTrigger)
log.LogDebug(fmt.Sprintf("irc.Channels = %+v", irc.Channels))
sendChat(fmt.Sprintf("# Connected to #%s!", name), name)
//sendChat(fmt.Sprintf("# Connected to #%s!", name), name)
}
func handleMessage(api keybase.ChatAPI) {