Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement

Set the active voice channel.

success = SetActiveVoiceChannelBySessionID(id)

Arguments[]

id
Number - Channel ID.

Returns[]

success
boolean - Whether the channel changed to to the given ID.

Details[]

  • Triggers VOICE_SESSIONS_UPDATE if the active channel switches.
  • This function is not applicable to "World" channels such as Trade and LookingForGroup.
  • IDs are not constant; they are assigned as the client joins each channel so they will change for users who have joined a variable number of channels. Refer to GetNumVoiceSessions() and GetVoiceSessionInfo().

Example[]

Simple usage:

local success = SetActiveVoiceChannelBySessionID(2)
print(success)		-- true

Finding a channel's ID and then joining it:

function SetChannelIDByName(name)
	for id=1, GetNumVoiceSessions() do
		if name == GetVoiceSessionInfo(id) then
			return SetActiveVoiceChannelBySessionID(id)
		end
	end
end
Advertisement