Ejemplo n.º 1
0
// 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)
}
Ejemplo n.º 2
0
func CheckAdmin(nick string) bool {
	if utils.Contains(core.Config.Admins, nick) {
		fmt.Println(nick, "verified as admin")
		return IsAuthenticated(nick)
	}
	return false
}
Ejemplo n.º 3
0
func verify_channel(channel string) bool {
	return channel[0] == '#' && !utils.Contains(blacklist, channel)
}