// CheckChanViewPerm returns the full permissions value for CheckChanView. // This is not at present hookable. func CheckChanViewPerm(pkg string, u *core.User, ch *core.Channel) (int, os.Error) { if m := ch.GetMember(u); m != nil { return 100, nil } if ch.Data("hidden") == "" { return 1, nil } return -1, os.NewError("Channel is hidden.") }