Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKissaki <kissaki@gmx.de>2012-06-05 23:00:12 +0400
committerBenjamin Jemlich <pcgod@users.sourceforge.net>2012-06-11 11:53:06 +0400
commit01fc4bf4fcf91ae66892ca846d09648bfc4bf5de (patch)
tree138ed1adec4bbcace23ddbe09d17d22e963ccc5b /plugins/wolfet
parent833c02eb2a12b7f4df059df58d1cdb1fdc3c71bb (diff)
WolfET: set context data in JSON format
Diffstat (limited to 'plugins/wolfet')
-rw-r--r--plugins/wolfet/wolfet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/wolfet/wolfet.cpp b/plugins/wolfet/wolfet.cpp
index be4897a55..b88586f6c 100644
--- a/plugins/wolfet/wolfet.cpp
+++ b/plugins/wolfet/wolfet.cpp
@@ -115,14 +115,15 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
camera_top[i] = avatar_top[i];
}
- // Context - concatenated server-ip mapname and team value
+ // Context - concatenated server-ip, mapname and team value
char hostip[32];
char mapname[40];
ok = peekProc((BYTE *) 0x009FFD30, hostip, sizeof(hostip)) &&
peekProc((BYTE *) 0x010B4908, mapname, sizeof(hostip));
hostip[sizeof(hostip)-1] = '\0';
mapname[sizeof(mapname)-1] = '\0';
- context = std::string(hostip) + mapname + (char)(team + 0x30);
+ // Context in JSON format, {} with fields ipport (server hostname), map, and team (: int)
+ context = "{\"ipport\":\"" + std::string(hostip) + "\",\"map\":\"" + mapname + "\",\"team\":" + (char)(team + 0x30) + "}";
return true;
}