At the moment when you use a command such as +test, you only see the message yourself. I would like to make it so that message is seen by all users.
I see
Code: Select all
local function reply(c, msg)
answer = adchpp.AdcCommand(adchpp.CMD_MSG, adchpp.TYPE_INFO, adchpp.HUB_SID)
answer:addParam(msg)
c:send(answer)
end
Code: Select all
if command == "test" then
reply(c, "Test ok")
return adchpp.DONT_SEND
2.3Message types
Message type specifies how messages should be routed, and thus which additional fields can be found in the message header. Clients should use the most limiting type, in terms of recipients, that makes sense for a particular message when sending it to the hub for distribution. Clients should disregard the message type when interpreting the message (after having parsed it). The following message types are defined:
B Broadcast. Hub must send message to all connected clients, including the sender of the message.
C Client message. Clients must use this message type when communicating directly over TCP.
D Direct message. The hub must send the message to the target_sid user.
E Echo message. The hub must send the message to the target_sid user and the my_sid user.
F Feature broadcast. The hub must send message to all clients that support both all required (+) and no excluded (-) features named. The feature name is matched against the corresponding SU field in INF sent by each client.
H Hub message. Clients must use this message type when a message is intended for the hub only.
I Info message. Hubs must use this message type when sending a message to a client that didn't come from another client.
U UDP message. Clients must use this message type when communicating directly over UDP.
so I guess this ties up with.
Code: Select all
-- Temporary fixes for SWIG 1.3.29
adchpp.TYPE_BROADCAST = string.char(adchpp.TYPE_BROADCAST)
adchpp.TYPE_DIRECT = string.char(adchpp.TYPE_DIRECT)
adchpp.TYPE_ECHO = string.char(adchpp.TYPE_ECHO)
adchpp.TYPE_FEATURE = string.char(adchpp.TYPE_FEATURE)
adchpp.TYPE_INFO = string.char(adchpp.TYPE_INFO)
adchpp.TYPE_HUB = string.char(adchpp.TYPE_HUB)
Code: Select all
answer = adchpp.AdcCommand(adchpp.CMD_MSG, adchpp.TYPE_INFO, adchpp.HUB_SID)