示例#1
0
文件: linktitle.go 项目: Nyubis/mibot
// Check whether a domain is blacklisted in a particular channel
func checkblacklist(url string, channel string) bool {
	domain := domainRe.FindStringSubmatch(url)[1]
	if utils.Contains(core.Config.Channelsettings["global"].Blacklist, domain) {
		return true
	}
	settings, has := core.Config.Channelsettings[channel]
	return has && utils.Contains(settings.Blacklist, domain)
}
示例#2
0
文件: admin.go 项目: Nyubis/mibot
func CheckAdmin(nick string) bool {
	if utils.Contains(core.Config.Admins, nick) {
		fmt.Println(nick, "verified as admin")
		return IsAuthenticated(nick)
	}
	return false
}
示例#3
0
文件: channels.go 项目: Nyubis/mibot
func verify_channel(channel string) bool {
	return channel[0] == '#' && !utils.Contains(blacklist, channel)
}