From 84696672cd7fc5088d7942ad0af35de807cb1c37 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sat, 21 Sep 2024 01:09:28 +0200 Subject: Add myself as admin For some administrative operations, such as joining channels, it would be useful if I could "imp"ersonate the bot. Signed-off-by: Georg Pfuetzenreuter --- wat/bot.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'wat') diff --git a/wat/bot.go b/wat/bot.go index 370641b..48559d4 100644 --- a/wat/bot.go +++ b/wat/bot.go @@ -45,7 +45,13 @@ func (w *WatBot) HandleIrcMsg(c *irc.Client, m *irc.Message) { } func (w *WatBot) Admin(m *irc.Message) bool { - return m.Prefix.Host == "mph.monster" + admins := [2]string{"mph.monster", "cranberry.juice"} + for _, admin := range admins { + if m.Prefix.Host == admin { + return true + } + } + return false } func (w *WatBot) Allowed(c string, r []string) bool { -- cgit v1.2.3