chromecow
Visitor
|
Re:Pm problem with attribute 'b' - 2008/06/13 00:33
I also have the same issue with private messages, slightly more complicated:
I have situations where I send a public message to a room, which then triggers a private message, so that the private message is being originated on the server side.
It sounds like instead of having the option to set back=1, I have to instead send a duplicate set of messages to the sender and the receiver.
It seems much more elegant to me to allow us to set back to 0 or 1 to determine whether it makes sense fo the sender to get a copy of the private message.
In some implementations, it is the desired behavior.
To try to give a more concrete example, I have a module that looks at incoming messages, and looks for commands preceded by a slash like:
/generateData
In this example, the generated data is passed to the whole room, but I also have situations where I might ask a player to generate data for me privately:
/generateData John
In which case the data is generated, and should be sent to the originator, and the client John.
In my case, the data is several lines of dynamically formated text which I return using
| Code: | client.clientHandleMessage(attrs, text, nodeName)
|
So without back=1 for the private message, I have to maintain separate sets of attrs, swap them out and duplicated the the message sending.
-Sean.
Be well,
-Sean
|