- // Whenever the linking module receives metadata from another server and doesnt know what
- // to do with it (of course, hence the 'meta') it calls this method, and it is up to each
- // module in turn to figure out if this metadata key belongs to them, and what they want
- // to do with it.
- // In our case we're only sending a single string around, so we just construct a std::string.
- // Some modules will probably get much more complex and format more detailed structs and classes
- // in a textual way for sending over the link.
- virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata)
- {
- // check if its our metadata key, and its associated with a user
- if ((target_type == TYPE_USER) && (extname == "accountname"))
- {
- User* dest = (User*)target;
-
- /* logging them out? */
- if (extdata.empty())
- {
- std::string* account;
- dest->GetExt("accountname", account);
- if (account)
- {
- dest->Shrink("accountname");
- delete account;
- }
- }
- else