Implement configuration file + automatic channel joining #14

Merged
pratyush merged 3 commits from config into master 2024-09-28 19:43:11 +02:00
Showing only changes of commit cc322e87e6 - Show all commits

View File

@ -46,13 +46,7 @@ func (w *WatBot) HandleIrcMsg(c *irc.Client, m *irc.Message) {
} }
func (w *WatBot) Admin(m *irc.Message) bool { func (w *WatBot) Admin(m *irc.Message) bool {
admins := w.c.AdminHosts return w.Allowed(m.Prefix.Host, w.c.AdminHosts)
for _, admin := range admins {
if m.Prefix.Host == admin {
return true
}
}
return false
} }
func (w *WatBot) Allowed(c string, r []string) bool { func (w *WatBot) Allowed(c string, r []string) bool {