// KickUserFromGroup kicks a user from a group
543483
func (api *Client) KickUserFromGroup(group, user string) error {
	return api.KickUserFromGroupContext(context.Background(), group, user)
}
631433
func (c *conn) JoinGroup(group uint32) error {
	return os.NewSyscallError("setsockopt", c.s.SetSockoptInt(
		unix.SOL_NETLINK,
		unix.NETLINK_ADD_MEMBERSHIP,
		int(group),
	))
}
870227
func RemoveUserFromGroup(groupID int, userID int) (*ResponseRemoveUser, error) {
	data, err := httpclient.GetData(APIURL + "/method/groups.removeUser?group_id=" + strconv.Itoa(groupID) + "&user_id=" + strconv.Itoa(userID) + "&access_token=" + accessToken + "&v=" + APIVersion)
	if err != nil {
		return nil, err
	}

	var status ResponseRemoveUser
	if err := json.Unmarshal(data, &status); err != nil {
		return nil, err
	}
	return &status, nil
}
3396
func (m *MockNetworkEntity) Kick(ctx context.Context) error {
	ret := m.ctrl.Call(m, "Kick", ctx)
	ret0, _ := ret[0].(error)
	return ret0
}
1021904
func UserGroups(client *gumble.Client, user *gumble.User, channel *gumble.Channel) <-chan []string {
	ch := make(chan []string)

	if !user.IsRegistered() {
		close(ch)
		return ch
	}

	var detacher gumble.Detacher
	listener := Listener{
		Disconnect: func(e *gumble.DisconnectEvent) {
			detacher.Detach()
			close(ch)
		},
		ChannelChange: func(e *gumble.ChannelChangeEvent) {
			if e.Channel == channel && e.Type.Has(gumble.ChannelChangeRemoved) {
				detacher.Detach()
				close(ch)
			}
		},
		PermissionDenied: func(e *gumble.PermissionDeniedEvent) {
			if e.Channel == channel && e.Type == gumble.PermissionDeniedPermission && (e.Permission&gumble.PermissionWrite) != 0 {
				detacher.Detach()
				close(ch)
			}
		},
		ACL: func(e *gumble.ACLEvent) {
			if e.ACL.Channel != channel {
				return
			}
			var names []string
			for _, g := range e.ACL.Groups {
				if (g.UsersAdd[user.UserID] != nil || g.UsersInherited[user.UserID] != nil) && g.UsersRemove[user.UserID] == nil {
					names = append(names, g.Name)
				}
			}
			detacher.Detach()
			ch <- names
			close(ch)
		},
	}
	detacher = client.Config.Attach(&listener)
	channel.RequestACL()

	return ch
}
1072166
func (api *Client) InviteUserToGroupContext(ctx context.Context, group, user string) (*Group, bool, error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
		"user":    {user},
	}

	response, err := api.groupRequest(ctx, "groups.invite", values)
	if err != nil {
		return nil, false, err
	}
	return &response.Group, response.AlreadyInGroup, nil
}
762148
func (conn *Conn) Kick(channel, nick string, message ...string) {
	msg := strings.Join(message, " ")
	if msg != "" {
		msg = " :" + msg
	}
	conn.Raw(KICK + " " + channel + " " + nick + msg)
}
113955
func (api *Client) GetUserGroupMembers(userGroup string) ([]string, error) {
	return api.GetUserGroupMembersContext(context.Background(), userGroup)
}
326446
func (c *Cache) remItemFromGroups(itmKey string, groupIDs []string) {
	for _, grpID := range groupIDs {
		delete(c.groups[grpID], itmKey)
		if len(c.groups[grpID]) == 0 {
			delete(c.groups, grpID)
		}
	}
}
411679
func GroupFromContext(ctx context.Context) *Group {
	c, _ := ctx.Value(groupKey).(*Group)
	return c
}
124083
func (t *Tube) Kick(bound int) (n int, err error) {
	r, err := t.Conn.cmd(t, nil, nil, "kick", bound)
	if err != nil {
		return 0, err
	}
	_, err = t.Conn.readResp(r, false, "KICKED %d", &n)
	if err != nil {
		return 0, err
	}
	return n, nil
}
1176053
func (s *Session) Kick(ctx context.Context) error {
	err := s.entity.Kick(ctx)
	if err != nil {
		return err
	}
	return s.entity.Close()
}
601860
func Convert_v1_Group_To_user_Group(in *v1.Group, out *user.Group, s conversion.Scope) error {
	return autoConvert_v1_Group_To_user_Group(in, out, s)
}
957935
func (cs *StreamManager) UnlockProtectedGroup(g *Group) {
	cs.UnlockProtectedEntries(g.Entries)
	cs.UnlockProtectedGroups(g.Groups)
}
1347997
func (api *Client) CreateUserGroup(userGroup UserGroup) (UserGroup, error) {
	return api.CreateUserGroupContext(context.Background(), userGroup)
}
925422
func ValidateBootstrapGroupName(name string) error {
	if BootstrapGroupRegexp.Match([]byte(name)) {
		return nil
	}
	return fmt.Errorf("bootstrap group %q is invalid (must match %s)", name, api.BootstrapGroupPattern)
}
296689
func (api *Client) EnableUserGroupContext(ctx context.Context, userGroup string) (UserGroup, error) {
	values := url.Values{
		"token":     {api.token},
		"usergroup": {userGroup},
	}

	response, err := api.userGroupRequest(ctx, "usergroups.enable", values)
	if err != nil {
		return UserGroup{}, err
	}
	return response.UserGroup, nil
}