summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/sendgameserverpacket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Xfire/src/sendgameserverpacket.cpp')
-rw-r--r--protocols/Xfire/src/sendgameserverpacket.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/protocols/Xfire/src/sendgameserverpacket.cpp b/protocols/Xfire/src/sendgameserverpacket.cpp
index 2f65e1578b..ad0f677320 100644
--- a/protocols/Xfire/src/sendgameserverpacket.cpp
+++ b/protocols/Xfire/src/sendgameserverpacket.cpp
@@ -26,25 +26,24 @@
#include "variablevalue.h"
#include <iostream>
-namespace xfirelib {
+namespace xfirelib
+{
+ int SendGameServerPacket::getPacketContent(char *buf)
+ {
+ VariableValue val;
+ val.setName("gip");
+ val.setValue(ip);
+ val.setValueLength(4);
- int SendGameServerPacket::getPacketContent(char *buf) {
- VariableValue val;
- val.setName( "gip" );
- val.setValue(ip);
- val.setValueLength(4);
-
- int index = 0;
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
- val.setName("gport");
- val.setValueFromLong(port,4);
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
- return index;
- }
-
-
-};
+ int index = 0;
+ index += val.writeName(buf, index);
+ buf[index++] = 02;
+ index += val.writeValue(buf, index);
+ val.setName("gport");
+ val.setValueFromLong(port, 4);
+ index += val.writeName(buf, index);
+ buf[index++] = 02;
+ index += val.writeValue(buf, index);
+ return index;
+ }
+}