summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/buddylistonlinepacket.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-11 13:33:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-11 13:33:42 +0000
commit85bd008c039eb1d93894e94fba9d158a42a71a12 (patch)
tree2d72d10759f6928e9e4b960175d2de01b5cf7e12 /protocols/Xfire/src/buddylistonlinepacket.cpp
parent222802c2986dcaf029fdfb828b7679bdabfa7bb2 (diff)
massive code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/buddylistonlinepacket.cpp')
-rw-r--r--protocols/Xfire/src/buddylistonlinepacket.cpp88
1 files changed, 42 insertions, 46 deletions
diff --git a/protocols/Xfire/src/buddylistonlinepacket.cpp b/protocols/Xfire/src/buddylistonlinepacket.cpp
index 3dd726d4e9..c65e3787a0 100644
--- a/protocols/Xfire/src/buddylistonlinepacket.cpp
+++ b/protocols/Xfire/src/buddylistonlinepacket.cpp
@@ -25,61 +25,57 @@
#include "buddylistonlinepacket.h"
#include "xfireparse.h"
#include "variablevalue.h"
-#include <vector>
#include "xdebug.h"
#include <iostream>
-namespace xfirelib {
- using namespace std;
+using namespace std;
- void BuddyListOnlinePacket::parseContent(char *buf, int length, int numberOfAtts) {
- DUMPPACKET("BuddyListOnlinePacket")
- XINFO(( "Got List of buddys that are online\n" ));
- int index = 0;
- // friends
- VariableValue userid;
- userids = new vector<long>;
+namespace xfirelib
+{
+ void BuddyListOnlinePacket::parseContent(char *buf, int, int)
+ {
+ DUMPPACKET("BuddyListOnlinePacket")
+ XINFO(("Got List of buddys that are online\n"));
+ int index = 0;
+ // friends
+ VariableValue userid;
+ userids = new vector<long>;
- /* auskommentiert, wird nicht mehr gesendet 2.3.11
- index += userid.readName(buf,index);
- */
- index ++; // Ignore 01
- index ++; // Ignore 04
- index ++; // Ignore 02
-
+ /* auskommentiert, wird nicht mehr gesendet 2.3.11
+ index += userid.readName(buf,index);
+ */
+ index++; // Ignore 01
+ index++; // Ignore 04
+ index++; // Ignore 02
- int numberOfIds = (unsigned char)buf[index];
- index++;
- index++;//ignore 00
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += userid.readValue(buf,index,4);
- userids->push_back(userid.getValueAsLong());
- XINFO2( "UserID: %ld\n", userid.getValueAsLong() );
- }
- VariableValue sid;
- sids = new vector<char *>;
- /* auskommentiert, wird nicht mehr gesendet 2.3.11
- index += sid.readName(buf,index); */
+ int numberOfIds = (unsigned char)buf[index];
+ index++;
+ index++;//ignore 00
+ for (int i = 0; i < numberOfIds; i++) {
+ index += userid.readValue(buf, index, 4);
+ userids->push_back(userid.getValueAsLong());
+ XINFO2("UserID: %ld\n", userid.getValueAsLong());
+ }
- index ++; // Ignore 03
- index ++; // Ignore 04
- index ++; // Ignore 03
-
+ VariableValue sid;
+ sids = new vector<char *>;
+ /* auskommentiert, wird nicht mehr gesendet 2.3.11
+ index += sid.readName(buf,index); */
- numberOfIds = (unsigned char)buf[index];
- index++;
- index++;//ignore 00
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += userid.readValue(buf,index,16);
- char *sid = new char[16];
- memcpy(sid,userid.getValue(),16);
- sids->push_back(sid);
- //for(int loop = 0; loop < userid.getValueLength();loop++){
- // XINFO(( "SID: %d\n", userid.getValue()[loop] ));
- //}
- }
+ index++; // Ignore 03
+ index++; // Ignore 04
+ index++; // Ignore 03
- }
+ numberOfIds = (unsigned char)buf[index];
+ index++;
+ index++;//ignore 00
+ for (int i = 0; i < numberOfIds; i++) {
+ index += userid.readValue(buf, index, 16);
+ char *sid = new char[16];
+ memcpy(sid, userid.getValue(), 16);
+ sids->push_back(sid);
+ }
+ }
};