diff options
author | Georg Pfuetzenreuter | 2024-09-21 01:09:28 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2024-09-21 01:09:28 +0200 |
commit | 84696672cd7fc5088d7942ad0af35de807cb1c37 (patch) | |
tree | 6054f9409e619a21576dc0522d4d55257d7eb2ad | |
parent | 28efaf9eec032bcdaa26cf9ff4f2ac79bb60f3e3 (diff) | |
download | watbot-84696672cd7fc5088d7942ad0af35de807cb1c37.tar.gz watbot-84696672cd7fc5088d7942ad0af35de807cb1c37.tar.bz2 watbot-84696672cd7fc5088d7942ad0af35de807cb1c37.zip |
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 <mail@georg-pfuetzenreuter.net>
-rw-r--r-- | wat/bot.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 { |