summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/sendgamestatus2packet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Xfire/src/sendgamestatus2packet.cpp')
-rw-r--r--protocols/Xfire/src/sendgamestatus2packet.cpp61
1 files changed, 30 insertions, 31 deletions
diff --git a/protocols/Xfire/src/sendgamestatus2packet.cpp b/protocols/Xfire/src/sendgamestatus2packet.cpp
index 8859e004cb..682d6bb60d 100644
--- a/protocols/Xfire/src/sendgamestatus2packet.cpp
+++ b/protocols/Xfire/src/sendgamestatus2packet.cpp
@@ -31,44 +31,43 @@
//packet vervollständigt
-namespace xfirelib {
+namespace xfirelib
+{
+ SendGameStatus2Packet::SendGameStatus2Packet()
+ {
+ ip[0] = ip[1] = ip[2] = ip[3] = 0;
+ port = 0;
+ }
- SendGameStatus2Packet::SendGameStatus2Packet() {
- ip[0] = ip[1] = ip[2] = ip[3] = 0;
- port = 0;
- }
+ int SendGameStatus2Packet::getPacketContent(char *buf)
+ {
+ VariableValue val;
- int SendGameStatus2Packet::getPacketContent(char *buf) {
-
- VariableValue val;
+ val.setName(getGameAttributeName());
- val.setName( getGameAttributeName() );
+ val.setValueFromLong(gameid, 4);
- val.setValueFromLong(gameid,4);
-
- int index = 0;
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
+ int index = 0;
+ index += val.writeName(buf, index);
+ buf[index++] = 02;
+ index += val.writeValue(buf, index);
- val.setName( getIPAttributeName() );
+ val.setName(getIPAttributeName());
- //BUG: hab ,4 hinzugefügt, führte und vista zum crash - dufte
- val.setValue(ip,4);
- val.setValueLength(4);
-
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
- val.setName( getPortAttributeName() );
- val.setValueFromLong(port,4);
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
-
- return index;
- }
+ //BUG: hab ,4 hinzugefügt, führte und vista zum crash - dufte
+ val.setValue(ip, 4);
+ val.setValueLength(4);
+ index += val.writeName(buf, index);
+ buf[index++] = 02;
+ index += val.writeValue(buf, index);
+ val.setName(getPortAttributeName());
+ val.setValueFromLong(port, 4);
+ index += val.writeName(buf, index);
+ buf[index++] = 02;
+ index += val.writeValue(buf, index);
+ return index;
+ }
};