Class: Teamspeak::Client

Inherits:
Base
  • Object
show all
Defined in:
lib/teamspeak.rb

Instance Attribute Summary

Attributes inherited from Base

#api, #attributes, #parent, #server

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

create, #initialize, #save, #update_attributes

Constructor Details

This class inherits a constructor from Teamspeak::Base

Class Method Details

.find(*args) ⇒ Object


179
180
# File 'lib/teamspeak.rb', line 179

def find(*args)
end

Instance Method Details

#client_is_talkerObject


174
175
176
# File 'lib/teamspeak.rb', line 174

def client_is_talker
	@client_is_talker
end

#client_is_talker=(value) ⇒ Object


168
169
170
171
172
# File 'lib/teamspeak.rb', line 168

def client_is_talker=(value)
	# return false if ![true, false].include?(value)
	cmd(:clientedit, :clid => clid, :client_is_talker => value ? 1 : 0)
	@client_is_talker = value
end

#cmd(command, *args) ⇒ Object


148
149
150
# File 'lib/teamspeak.rb', line 148

def cmd(command, *args)
	server.cmd(command, args[0])
end

#msg(message = '') ⇒ Object


152
153
154
# File 'lib/teamspeak.rb', line 152

def msg(message = '')
	cmd(:sendtextmessage, :targetmode => TEXTMESSAGETARGET_CLIENT, :target => clid, :msg => message)
end

#talkerObject


164
165
166
# File 'lib/teamspeak.rb', line 164

def talker
	client_is_talker
end

#talker=(value) ⇒ Object

custom get/set for values that can be changed on the server as well


160
161
162
# File 'lib/teamspeak.rb', line 160

def talker=(value)
	client_is_talker = value
end