summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2012-11-05 21:11:48 +0000
committerRobert Pösel <robyer@seznam.cz>2012-11-05 21:11:48 +0000
commit048aaf0c4e77402adf584e3318e5aae6f1cdd749 (patch)
treedef343da80e282ae43164e45e672a1386db66546 /plugins
parent35a9af527f9b7ec35e81455784cd0a795be910c5 (diff)
XFire adoption (crashes on login, no 64bit)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2212 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/!NotAdopted/Xfire/LICENSE.txt340
-rw-r--r--plugins/!NotAdopted/Xfire/README.txt10
-rw-r--r--plugins/!NotAdopted/Xfire/UpgradeLog.XML19
-rw-r--r--plugins/!NotAdopted/Xfire/Xfire.sln20
-rw-r--r--plugins/!NotAdopted/Xfire/icons/copy.icobin326 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/icons/onlineprof.icobin326 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/icons/onlineprof.xcfbin2810 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/icons/xfire.icobin326 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/im_xfire.icobin318 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/resource.rc128
-rw-r--r--plugins/!NotAdopted/Xfire/xfire.icobin2238 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiresmall.icobin318 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Export.def6
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Jamfile152
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Kopie von resource.rc300
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/SHA1.cpp263
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/SHA1.h116
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.cpp86
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.h58
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.cpp567
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.h81
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.cpp487
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.h194
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.cpp312
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.h75
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.cpp216
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.h70
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.cpp96
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.h8
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.cpp380
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.h114
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.cpp867
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.h28
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.cpp395
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.h7
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/authpacket.cpp47
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/authpacket.h54
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h374
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.cpp64
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.h52
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylist.cpp373
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylist.h100
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.cpp39
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.h46
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.cpp144
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.h61
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.cpp104
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.h61
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.cpp85
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.h53
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.cpp112
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.h64
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.cpp138
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.h61
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/client.cpp296
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/client.h96
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.cpp77
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.h55
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.cpp120
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.h71
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.cpp52
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.h54
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/d_xfire.icobin4286 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.cpp49
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.h69
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.cpp111
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.h64
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.cpp85
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.h56
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.cpp56
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.h55
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/icon.icobin766 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/iniupdater.cpp128
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/iniupdater.h10
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.cpp93
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.h66
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.cpp51
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.h60
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.cpp38
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.h47
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.cpp74
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.h51
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/m8.h9
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/main.cpp3797
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.cpp75
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.h61
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/messagepacket.cpp92
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/messagepacket.h63
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.cpp41
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.h49
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/options.cpp1270
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.cpp37
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.h46
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/packetlistener.h41
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/packetreader.cpp163
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/packetreader.h57
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp59
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/passworddialog.h4
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.cpp111
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.h7
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp53
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.h4
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.cpp48
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.h52
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.cpp35
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.h43
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.cpp42
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.h48
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.cpp107
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.h81
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.cpp39
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.h56
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.cpp80
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.h57
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/resource.h173
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/resource.rc300
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.cpp77
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.h55
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/searching4games.cpp741
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.cpp47
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.h51
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.cpp27
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.h43
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.cpp50
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.h49
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.cpp74
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.h56
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.cpp69
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.h56
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.cpp56
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.h48
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.cpp103
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.h77
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.cpp49
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.h51
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.cpp46
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.h46
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.cpp71
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.h58
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.cpp43
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.h52
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.cpp103
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.h79
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/services.cpp81
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/services.h18
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/setnickname.cpp46
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/setnickname.h4
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/socket.cpp272
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/socket.h67
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/socketexception.h45
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/srcheader.txt22
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/stdafx.cpp8
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/stdafx.h36
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/testclient/Jamfile5
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/testclient/test.cpp310
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/testclient/test.h60
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/tools.cpp1077
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/tools.h99
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/true.icobin4286 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/userdetails.cpp449
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/variables.cpp168
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/variables.h11
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/variablevalue.cpp204
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/variablevalue.h65
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/x_fire16x16.icobin1150 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xdebug.h149
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfire away.icobin1150 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfire offline.icobin1150 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfire online.icobin1150 -> 0 bytes
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.cpp79
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.h63
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.cpp92
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.h65
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiregame.cpp27
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiregame.h42
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.cpp27
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.h52
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.cpp145
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.h53
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.cpp30
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.h47
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireparse.cpp49
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireparse.h37
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.cpp50
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.h52
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.cpp26
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.h45
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.cpp27
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.h43
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcproj963
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj282
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj.filters557
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireutils.cpp44
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/xfireutils.h40
194 files changed, 0 insertions, 25021 deletions
diff --git a/plugins/!NotAdopted/Xfire/LICENSE.txt b/plugins/!NotAdopted/Xfire/LICENSE.txt
deleted file mode 100644
index b8602677e0..0000000000
--- a/plugins/!NotAdopted/Xfire/LICENSE.txt
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/plugins/!NotAdopted/Xfire/README.txt b/plugins/!NotAdopted/Xfire/README.txt
deleted file mode 100644
index 2f2ab07512..0000000000
--- a/plugins/!NotAdopted/Xfire/README.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-More informations and help:
-
-English Miranda forum:
-http://forums.miranda-im.org/showthread.php?17607-Xfire-Protocol-Discussion
-
-German Miranda forum:
-http://forum.miranda-im.de/index.php?topic=7055.0
-
-Latest version:
-http://addons.miranda-im.org/details.php?action=viewfile&id=3701 \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/UpgradeLog.XML b/plugins/!NotAdopted/Xfire/UpgradeLog.XML
deleted file mode 100644
index e0dcb46506..0000000000
--- a/plugins/!NotAdopted/Xfire/UpgradeLog.XML
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
-<Properties><Property Name="Solution" Value="xfiretest">
-</Property><Property Name="Projektmappendatei" Value="H:\Projekte\Xfire\xfiretest.sln">
-</Property><Property Name="Date" Value="Montag, 12. März 2012">
-</Property><Property Name="Time" Value="18:34">
-</Property></Properties><Event ErrorLevel="0" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Converting project file 'H:\Projekte\Xfire\xfiretest\xfiretest.vcproj'.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.">
-</Event><Event ErrorLevel="0" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Web deployment to the local IIS server is no longer supported. The Web Deployment build tool has been removed from your project settings.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="VCConvertEngine could not convert attribute UseUnicodeResponseFiles = false under Tool VCCLCompilerTool.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="VCConvertEngine could not convert attribute UseUnicodeResponseFiles = false under Tool VCLinkerTool.">
-</Event><Event ErrorLevel="1" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Attribute 'OptimizeForWindows98' of 'VCLinkerTool' is not supported in this version and has been removed during conversion.">
-</Event><Event ErrorLevel="0" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Done converting to new project file 'H:\Projekte\Xfire\xfiretest\xfiretest.vcxproj'.">
-</Event><Event ErrorLevel="3" Project="xfiretest" Source="xfiretest\xfiretest.vcproj" Description="Converted">
-</Event><Event ErrorLevel="0" Project="" Source="xfiretest.sln" Description="Die Projektmappe wurde erfolgreich konvertiert.">
-</Event><Event ErrorLevel="3" Project="" Source="xfiretest.sln" Description="Converted">
-</Event></UpgradeLog> \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/Xfire.sln b/plugins/!NotAdopted/Xfire/Xfire.sln
deleted file mode 100644
index b00f8777d6..0000000000
--- a/plugins/!NotAdopted/Xfire/Xfire.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xfire", "xfiretest\xfiretest.vcxproj", "{E4CD8BBA-B580-4584-AC3E-B4E9915026AE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E4CD8BBA-B580-4584-AC3E-B4E9915026AE}.Debug|Win32.ActiveCfg = Debug|Win32
- {E4CD8BBA-B580-4584-AC3E-B4E9915026AE}.Debug|Win32.Build.0 = Debug|Win32
- {E4CD8BBA-B580-4584-AC3E-B4E9915026AE}.Release|Win32.ActiveCfg = Release|Win32
- {E4CD8BBA-B580-4584-AC3E-B4E9915026AE}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/plugins/!NotAdopted/Xfire/icons/copy.ico b/plugins/!NotAdopted/Xfire/icons/copy.ico
deleted file mode 100644
index 71d6c98a79..0000000000
--- a/plugins/!NotAdopted/Xfire/icons/copy.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/icons/onlineprof.ico b/plugins/!NotAdopted/Xfire/icons/onlineprof.ico
deleted file mode 100644
index 71d6c98a79..0000000000
--- a/plugins/!NotAdopted/Xfire/icons/onlineprof.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/icons/onlineprof.xcf b/plugins/!NotAdopted/Xfire/icons/onlineprof.xcf
deleted file mode 100644
index 64f5548e1d..0000000000
--- a/plugins/!NotAdopted/Xfire/icons/onlineprof.xcf
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/icons/xfire.ico b/plugins/!NotAdopted/Xfire/icons/xfire.ico
deleted file mode 100644
index 71d6c98a79..0000000000
--- a/plugins/!NotAdopted/Xfire/icons/xfire.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/im_xfire.ico b/plugins/!NotAdopted/Xfire/im_xfire.ico
deleted file mode 100644
index 4329de949c..0000000000
--- a/plugins/!NotAdopted/Xfire/im_xfire.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/resource.rc b/plugins/!NotAdopted/Xfire/resource.rc
deleted file mode 100644
index eb23862dff..0000000000
--- a/plugins/!NotAdopted/Xfire/resource.rc
+++ /dev/null
@@ -1,128 +0,0 @@
-#define IDC_STATIC -1
-#define IDC_STC16 1001
-#define IDC_INSTALLTYPE 1002
-
-#include "resource.h"
-#include "windows.h"
-
-ID_OP ICON DISCARDABLE "x_fire16x16.ico"
-IDI_TM ICON DISCARDABLE "d_xfire.ico"
-IDI_ONLINE ICON DISCARDABLE "xfire online.ico"
-IDI_OFFLINE ICON DISCARDABLE "xfire offline.ico"
-IDI_AWAY ICON DISCARDABLE "xfire away.ico"
-
-IDD_OPT DIALOGEX 0,0,304,218
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_LOGIN,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,58,9,100,13,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PASSWORD,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_PASSWORD,58,24,100,13,WS_EX_CLIENTEDGE
- CONTROL "Password:",IDC_STATIC,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,4,25,52,9
- CONTROL "Loginname:",IDC_STATIC,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,4,11,52,9
- CONTROL "XFire",IDC_GROUPMAIN,"Button",WS_CHILD|WS_VISIBLE|WS_GROUP|BS_GROUPBOX,2,1,160,54
- CONTROL "Nick:",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,4,40,52,9
- CONTROL "",IDC_NICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,58,38,100,13,WS_EX_CLIENTEDGE
- CONTROL "Options",IDC_GRP1,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,57,300,100
- CONTROL "Disable Avatars",IDC_NOAV,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,66,266,9
- CONTROL "No Ip/Port in StatusMsg",IDC_NOIPPORT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,77,266,9
- CONTROL "Switch to Online instead of AFK on non supported Globalstatuses",IDC_ONINAFK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,88,268,9
- CONTROL "Icon Options *",IDC_GRP5,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,158,300,28
- CONTROL "Gameicon:",IDC_STC6,"Static",WS_CHILD|WS_VISIBLE,8,171,36,9
- CONTROL "",IDC_CBGICO,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,46,169,106,9
- CONTROL "Voiceicon:",IDC_STC8,"Static",WS_CHILD|WS_VISIBLE,154,171,36,9
- CONTROL "",IDC_CBVICO,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,192,169,106,9
- CONTROL "* requires Miranda restart",IDC_STC9,"Static",WS_CHILD|WS_VISIBLE,2,208,300,9
- CONTROL "Dont create automatically Clangroups",IDC_NOCLANGROUP,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,99,268,9
- CONTROL "Scan for games on every Miranda start",IDC_SCANALWAYS,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,110,268,9
- CONTROL "Files",IDC_GRP6,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,164,1,138,35
- CONTROL "xfire_games.ini",IDC_CHKG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,170,12,118,9
- CONTROL "icons.dll",IDC_CHKI,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,170,24,128,9
- CONTROL "?",IDC_FINDFILES,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,290,7,10,9
- CONTROL "GameServerQuery support",IDC_GSQP,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,121,268,9
- CONTROL "Display Error and Infomessage:",IDC_STC12,"Static",WS_CHILD|WS_VISIBLE,128,144,170,9
- CONTROL "",IDC_NOMSG,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,230,142,66,9
- CONTROL "Setup your Games...",IDC_SETUPGAMES,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,210,188,94,19
- CONTROL "No custom away message",IDC_NOCUSTOMAWAY,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,132,110,9
-END
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION 0,1,3,11
-PRODUCTVERSION 0,1,3,11
-FILEOS 0x00040004
-FILETYPE 0x00000002
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "FFFF04B0"
- BEGIN
- VALUE "About Miranda", "Miranda IM is a new generation IM client, extensible with numerous plugins. Get Miranda IM at http://www.miranda-im.org\0"
- VALUE "ProductName", "Plugin for Miranda IM\0"
- VALUE "OriginalFilename", "XFire.dll\0"
- VALUE "FileVersion", "0.1.3.11\0"
- VALUE "ProductVersion", "0.1.3.11\0"
- VALUE "FileDescription", "Miranda XFire Protocol plugin\0"
- VALUE "LegalCopyright", "Copyright © 2008 dufte\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0xFFFF, 0x04B0
- END
-END
-
-IDD_UD DIALOGEX 0,0,223,159
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Username:",IDC_STC2,"Static",WS_CHILD|WS_VISIBLE,8,18,36,9
- CONTROL "Nick:",IDC_STC3,"Static",WS_CHILD|WS_VISIBLE,8,9,32,9
- CONTROL "Game",IDC_GRP2,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,44,220,32
- CONTROL "Voicechat",IDC_GRP3,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,77,220,33
- CONTROL "Name:",IDC_STC4,"Static",WS_CHILD|WS_VISIBLE,30,53,36,9
- CONTROL "Unreal Tournament 2004",IDC_GAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,53,134,9
- CONTROL "IP:",IDC_STC5,"Static",WS_CHILD|WS_VISIBLE,30,64,18,9
- CONTROL "255.255.255.255",IDC_GIP,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,64,54,9
- CONTROL "Port:",IDC_STC7,"Static",WS_CHILD|WS_VISIBLE,134,64,16,9
- CONTROL "27770",IDC_GPORT,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,150,64,70,9
- CONTROL "Unreal Tournament 2004",IDC_VNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,88,132,9
- CONTROL "Name:",IDC_STC10,"Static",WS_CHILD|WS_VISIBLE,30,88,22,9
- CONTROL "IP:",IDC_STC11,"Static",WS_CHILD|WS_VISIBLE,30,99,18,9
- CONTROL "255.255.255.255",IDC_VIP,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,99,54,9
- CONTROL "Port:",IDC_STC13,"Static",WS_CHILD|WS_VISIBLE,134,99,16,9
- CONTROL "27770",IDC_VPORT,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,150,99,70,9
- CONTROL "Userdetails",IDC_GRP4,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,0,112,44
- CONTROL "dufte",IDC_DNICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,46,9,64,9
- CONTROL "dufte",IDC_DUSERNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,46,18,66,9
- CONTROL "",IDC_GAMEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,6,53,22,19
- CONTROL "",IDC_VOICEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,6,88,22,19
- CONTROL "Copy",IDC_COPYGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,190,49,30,11
- CONTROL "Copy",IDC_COPYVOICE,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,190,83,30,11
- CONTROL "",IDC_PROFILIMG,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_BITMAP,0,112,222,44
- CONTROL "",IDC_GAMEINFOLIST,"SysListView32",WS_CHILD|WS_VISIBLE|LVS_REPORT,116,1,106,43,WS_EX_CLIENTEDGE
-END
-
-IDD_GAMELIST DIALOGEX 6,5,348,223
-CAPTION "Setup your Games ..."
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU
-EXSTYLE WS_EX_TOPMOST
-BEGIN
- CONTROL "",IDC_LST1,"SysListView32",WS_CHILD|WS_VISIBLE|WS_TABSTOP|LVS_AUTOARRANGE|LVS_SHAREIMAGELISTS|LVS_REPORT,0,0,184,222,WS_EX_CLIENTEDGE
- CONTROL "Game",IDC_GRP7,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,186,0,162,187
- CONTROL "Close",IDC_BTN1,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,304,208,44,13
- CONTROL "Never Detect",IDC_NEVERD,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTORADIOBUTTON,192,24,150,9
- CONTROL "Automatically Detect",IDC_RBN2,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTORADIOBUTTON,192,11,150,9
- CONTROL "Manuel Setup",IDC_MANUAL,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTORADIOBUTTON,192,36,150,9
- CONTROL "",IDC_GAMEPATH,"Edit",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP,194,66,148,11,WS_EX_CLIENTEDGE
- CONTROL "DetectExe:",IDC_STC14,"Static",WS_CHILD|WS_VISIBLE,194,55,148,9
- CONTROL "Browse ...",IDC_BTN2,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP,280,79,62,13
- CONTROL "Apply",IDC_APPLY,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP,238,168,56,13
- CONTROL "Browse ...",IDC_BTN3,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP,280,118,62,13
- CONTROL "",IDC_LAUNCH,"Edit",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP,194,105,148,11,WS_EX_CLIENTEDGE
- CONTROL "LauncherExe:",IDC_STC15,"Static",WS_CHILD|WS_VISIBLE,194,94,148,9
- CONTROL "Installtype:",IDC_STC16,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,188,190,128,9
- CONTROL "",IDC_INSTALLTYPE,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,318,188,30,13
-END
-
diff --git a/plugins/!NotAdopted/Xfire/xfire.ico b/plugins/!NotAdopted/Xfire/xfire.ico
deleted file mode 100644
index 6a35240bf1..0000000000
--- a/plugins/!NotAdopted/Xfire/xfire.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiresmall.ico b/plugins/!NotAdopted/Xfire/xfiresmall.ico
deleted file mode 100644
index 5baa26441b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiresmall.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Export.def b/plugins/!NotAdopted/Xfire/xfiretest/Export.def
deleted file mode 100644
index 4dceee1c2d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Export.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY XFIREDLL
-EXPORTS
- Load @1
- Unload @2
- MirandaPluginInfoEx @3
- MirandaPluginInterfaces @4 \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Jamfile b/plugins/!NotAdopted/Xfire/xfiretest/Jamfile
deleted file mode 100644
index a8bd2d8d8a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Jamfile
+++ /dev/null
@@ -1,152 +0,0 @@
-SubDir TOP src ;
-
-LOCATE_TARGET = bin ;
-Library libxfirelib :
- SHA1.cpp
- socket.cpp
- packetreader.cpp
- client.cpp
- xfirepacket.cpp
- xfirepacketcontent.cpp
- clientinformationpacket.cpp
- xfireutils.cpp
- clientversionpacket.cpp
- authpacket.cpp
- xfireparse.cpp
- variablevalue.cpp
- clientloginpacket.cpp
- loginfailedpacket.cpp
- loginsuccesspacket.cpp
- messagepacket.cpp
- buddylistonlinepacket.cpp
- buddylistnamespacket.cpp
- buddylistgamespacket.cpp
- buddylistgames2packet.cpp
- buddylist.cpp
- otherloginpacket.cpp
- messageackpacket.cpp
- invitebuddypacket.cpp
- inviterequestpacket.cpp
- xfirerecvpacketcontent.cpp
- recvdidpacket.cpp
- recvprefspacket.cpp
- xfiresendpacketcontent.cpp
- recvstatusmessagepacket.cpp
- sendstatusmessagepacket.cpp
- sendmessagepacket.cpp
- sendacceptinvitationpacket.cpp
- sendgamestatuspacket.cpp
- sendgameserverpacket.cpp
- senddenyinvitationpacket.cpp
- recvremovebuddypacket.cpp
- sendremovebuddypacket.cpp
- sendnickchangepacket.cpp
- sendkeepalivepacket.cpp
- xfiregame.cpp
- recvoldversionpacket.cpp
- xfiregameresolver.cpp
- dummyxfiregameresolver.cpp
- monitoredobj.cpp
- sendgamestatus2packet.cpp
- ;
-
-InstallLib $(LIBDIR) : libxfirelib$(SUFLIB) ;
-#InstallFile $(DESTDIR) : sendkeepalivepacket.h ;
-
-
-##########
-## IsElem, DoInstall copied from Crystal Space Installation !
-########
-#============================================================================
-# Helper rules
-# Copyright (C)2003 by Matze Braun <matzebraun@users.sourceforge.net>
-# Copyright (C)2004 by Eric Sunshine <sunshine@sunshineco.com>
-#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This library is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-# License for more details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-#============================================================================
-
-
-## IsElem element : list
-## Returns "true" if the element is in the list. Otherwise nothing is
-## returned.
-rule IsElem
-{
- local i ;
-
- for i in $(>)
- {
- if $(i) = $(<)
- {
- return "true" ;
- }
- }
-
- return ;
-}
-
-rule DoInstall
-{
- InstallFile /usr/local/include/xfirelib : $(1) ;
-}
-
-
-## Recurse [ rule ] : types [ : prefix ]
-## Recursively scan current directory, $(SUBDIR), for files matching 'types'
-## and invoke 'rule' for each file which matches one of the 'types'.
-## 'types' is a list of file extensions (with the leading dot). 'rule' will
-## be invoked with two arguments: (1) the basename of the file including the
-## extension, (2) a list of the path components from the current directory
-## to the file's directory. When 'rule' is invoked, it will see a $(SUBDIR)
-## value of the directory containing the file (as if the rule had been
-## invoked from within the file's directory). 'prefix' is an optional list
-## of path components which will be prepended to rule's second argument.
-## Returns the list of visited files. It is legal to omit 'rule', if you
-## are interested only in obtaining the list of files matching 'types'.
-rule Recurse
-{
- local innerrule = $(1) ;
- local types = $(2) ;
- local prefix = $(3) ;
- local files = [ GLOB $(SUBDIR) : * ] ;
- local visited ;
-
- local i ;
- for i in $(files)
- {
- if [ IsElem $(i:S) : $(types) ]
- {
- visited += [ FDirName $(prefix) $(i:BS) ] ;
- if $(innerrule)
- {
- $(innerrule) $(i:BS) : $(prefix) ;
- }
- }
- else
- {
- if ! [ IsElem $(i:BS) : $(DOT) $(DOTDOT) ]
- {
- local SUBDIR = $(i) ; # Called rules see this new temporary value.
- visited += [ Recurse $(innerrule) : $(types) : $(prefix) $(i:BS) ] ;
- }
- }
- }
- return $(visited) ;
-}
-
-
-
-
-Recurse DoInstall : .h ;
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Kopie von resource.rc b/plugins/!NotAdopted/Xfire/xfiretest/Kopie von resource.rc
deleted file mode 100644
index f94085600b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Kopie von resource.rc
+++ /dev/null
@@ -1,300 +0,0 @@
-#define IDC_STC23 1002
-#define IDC_EDT1 1006
-#define IDC_GRP9 1002
-#define IDC_CHK1 1001
-#define IDC_EDT2 1004
-#define IDC_SCANUPDATE 1003
-#define IDC_STC40 1010
-#define IDC_STC41 1011
-#define IDC_EDT3 1009
-#define IDC_EDT4 1006
-#define IDC_STC22 1001
-#define IDC_GRP12 1009
-#define IDC_GRP13 1004
-#define IDC_GRP14 1003
-#define IDC_STC25 1001
-#define IDC_STC26 1002
-#define IDC_STC33 1004
-#define IDC_STC9 1001
-#define IDC_STC19 1002
-#define IDC_STC20 1003
-#define IDC_STC21 1004
-#define IDC_STC24 1005
-#define IDC_STC28 1002
-#define IDC_STC29 1003
-#define IDC_STC30 1005
-#define IDC_STC31 1001
-#define IDC_STC32 1004
-#define IDC_GRP10 1001
-#define IDC_STC27 1002
-#define IDC_GRP11 1005
-#define IDC_STC15 1003
-#define IDC_STC34 1001
-#define IDC_IMG2 1002
-#define IDC_STC35 1003
-#define IDC_STC14 1001
-#define IDC_STC36 1001
-#define IDC_STC37 1003
-#define IDC_STC38 1005
-#define IDC_STC39 1008
-#define IDC_STC42 1002
-#define IDC_STC43 1004
-#define IDC_STC44 1006
-#define IDC_IMG1 1002
-
-#include "resource.h"
-#include "windows.h"
-
-ID_OP ICON DISCARDABLE "x_fire16x16.ico"
-IDI_TM ICON DISCARDABLE "d_xfire.ico"
-IDI_ONLINE ICON DISCARDABLE "xfire online.ico"
-IDI_OFFLINE ICON DISCARDABLE "xfire offline.ico"
-IDI_AWAY ICON DISCARDABLE "xfire away.ico"
-
-IDD_OPT DIALOGEX 0,0,318,252
-FONT 8,"MS Shell Dlg",0,0,1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_OPTIONSTAB,"SysTabControl32",WS_VISIBLE|WS_TABSTOP,1,1,316,250
-END
-
-IDD_OPTLOGIN DIALOGEX 0,0,304,235
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_LOGIN,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,66,12,100,13,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PASSWORD,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_PASSWORD,66,31,100,13,WS_EX_CLIENTEDGE
- CONTROL "Password:",IDC_STATIC,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,8,33,56,9
- CONTROL "Loginname:",IDC_STATIC,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,16,14,48,9
- CONTROL "XFire",IDC_GROUPMAIN,"Button",WS_CHILD|WS_VISIBLE|WS_GROUP|BS_GROUPBOX,2,1,300,46
- CONTROL "Nick:",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,8,88,58,9
- CONTROL "",IDC_NICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,68,86,100,13,WS_EX_CLIENTEDGE
- CONTROL "Current Protocolversion:",IDC_STC16,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT|0x00000800,178,217,94,11
- CONTROL "",IDC_PVER,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY,274,217,24,11,WS_EX_CLIENTEDGE
- CONTROL "",IDC_LASTGAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL|ES_CENTER,2,51,298,11
- CONTROL "Note: You can only change these settings, if you are connected to Xfire.",IDC_STC22,"Static",WS_CHILD|WS_VISIBLE,6,73,290,11
- CONTROL "Create a new Xfire account on website",IDC_URLNEWACC,"Hyperlink",WS_CHILD|WS_VISIBLE|WS_TABSTOP,170,14,126,9
- CONTROL "Lost Password?",IDC_LOSTPW,"Hyperlink",WS_CHILD|WS_VISIBLE|WS_TABSTOP,170,33,124,9
- CONTROL "Account options",IDC_GRP12,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,62,300,170
- CONTROL "Show my friends",IDC_KONFIG_1,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,114,282,9
- CONTROL "Game Status",IDC_GRP13,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,6,103,292,57
- CONTROL "Show on my profile and miniprofile",IDC_KONFIG_2,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,125,282,9
- CONTROL "Show my game server data",IDC_KONFIG_3,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,136,282,9
- CONTROL "Other Activity",IDC_GRP14,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,6,162,292,35
- CONTROL "Show my voice chat server to my friends",IDC_KONFIG_5,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,173,282,9
- CONTROL "Show people when I type to them",IDC_KONFIG_6,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,184,282,9
- CONTROL "Show nicknames when available",IDC_KONFIG_4,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,170,88,128,9
- CONTROL "Show friends of my friends",IDC_KONFIG_7,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,147,282,9
-END
-
-IDD_OPTFEAT DIALOGEX 0,0,304,235
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Options",IDC_GRP1,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,1,300,133
- CONTROL "More options",IDC_GRP5,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,136,300,98
- CONTROL "Gameicon:",IDC_STC6,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,4,203,144,11
- CONTROL "",IDC_CBGICO,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,203,106,301
- CONTROL "Voiceicon:",IDC_STC8,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,4,217,144,11
- CONTROL "",IDC_CBVICO,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,217,106,301
- CONTROL "Display Error and Infomessage:",IDC_STC12,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,190,144,9
- CONTROL "",IDC_NOMSG,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,188,106,61
- CONTROL "Tree1",IDC_TREE,"SysTreeView32",WS_VISIBLE|WS_BORDER|WS_TABSTOP|TVS_FULLROWSELECT|TVS_SHOWSELALWAYS|TVS_DISABLEDRAGDROP|TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS,6,11,292,120
- CONTROL "Main group for clan groups:",IDC_STC25,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,175,144,9
- CONTROL "",IDC_CLANGROUP,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,173,106,61
- CONTROL "Automatically scan for games:",IDC_STC26,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,145,144,9
- CONTROL "",IDC_SCANUPDATECB,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,144,106,61
- CONTROL "",IDC_FOFGROUP,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,158,106,61
- CONTROL "Main group for Friends of Friends:",IDC_STC33,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,160,144,9
-END
-
-IDD_OPTFEAT2 DIALOGEX 0,0,304,242
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Files",IDC_GRP6,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,94,300,102
- CONTROL "xfire_games.ini",IDC_CHKG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,105,80,9
- CONTROL "icons.dll",IDC_CHKI,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,136,80,9
- CONTROL "Blocked User List",IDC_GRP8,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,1,300,91
- CONTROL "",IDC_BLOCKUSER,"ListBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|LBS_NOINTEGRALHEIGHT|LBS_HASSTRINGS|LBS_NOTIFY,6,11,128,78,WS_EX_CLIENTEDGE
- CONTROL "",IDC_REMUSER,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|0x00000040,138,42,16,15
- CONTROL "This list contains all your blocked Xfire users. You can remove one, if you wanna allow him to send you a friend request.",IDC_STC9,"Static",WS_CHILD|WS_VISIBLE,160,12,136,74
- CONTROL "You can simply block someone, if you right click on his friend request in clist and choose Block User ...",IDC_STC19,"Static",WS_CHILD|WS_VISIBLE,160,48,130,39
- CONTROL "This file is used for the game search, game detection and gameid resolving. It contains all xfire supported games.",IDC_STC20,"Static",WS_CHILD|WS_VISIBLE,92,105,206,28
- CONTROL "This file contains all original game icons. You can also activate the option for icon downloading, if you dont have it.",IDC_STC21,"Static",WS_CHILD|WS_VISIBLE,92,136,206,26
- CONTROL "Be sure you put these files in following folder:",IDC_STC24,"Static",WS_CHILD|WS_VISIBLE,8,168,290,9
- CONTROL "",IDC_FILESSHOULDBE,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY,8,179,290,13,WS_EX_CLIENTEDGE
-END
-
-IDD_OPTFEAT3 DIALOGEX 0,0,304,235
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Status Message",IDC_GRP1,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,1,300,214
- CONTROL "Enable",IDC_ENABLESTSMSG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,10,14,132,9
- CONTROL "With this feature, following status message will be set on your other protocol plugins, if you are ingame. So your other buddy's can also see what you play. It will also change the status to occupied, if this option is enabled.",IDC_STC28,"Static",WS_CHILD|WS_VISIBLE,10,38,286,24
- CONTROL "Following Variables are available: %myxfiregame%, %myxfirevoice%, %myxfireserverip%, %myxfirevoiceip%",IDC_STC29,"Static",WS_CHILD|WS_VISIBLE,10,96,286,19
- CONTROL "",IDC_STATUSMSG,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_MULTILINE,8,131,286,70,WS_EX_CLIENTEDGE
- CONTROL "Status message:",IDC_STC30,"Static",WS_CHILD|WS_VISIBLE,10,118,94,9
- CONTROL "",IDC_STC31,"Static",WS_CHILD|WS_VISIBLE,6,203,134,9
- CONTROL "Change the status to occupied or dnd",IDC_CHGSTATUS,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,14,154,9
- CONTROL "The status message and status will be reset, if you close the game.",IDC_STC32,"Static",WS_CHILD|WS_VISIBLE,10,72,286,20
- CONTROL "Prefer dnd when it is available",IDC_DNDFIRST,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,25,154,9
-END
-
-IDD_OPTFEAT4 DIALOGEX 0,0,304,235
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_LGAMELIST,"ListBox",WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LBS_NOINTEGRALHEIGHT|LBS_HASSTRINGS|LBS_SORT|LBS_NOTIFY,6,11,128,200,WS_EX_CLIENTEDGE
- CONTROL "Games",IDC_GRP10,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,0,300,233
- CONTROL "Game:",IDC_STC27,"Static",WS_CHILD|WS_VISIBLE,162,11,136,9
- CONTROL "",IDC_GAMENAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,162,20,136,11
- CONTROL "Dont detect this game as running",IDC_DONTDETECT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,55,152,9
- CONTROL "",IDC_GAMEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,138,11,22,19
- CONTROL "Options",IDC_GRP11,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,138,40,160,187
- CONTROL "Apply",IDC_APPLY,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,206,72,17
- CONTROL "Dont set status message for other protocols",IDC_NOSTATUSMSG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,68,152,9
- CONTROL "",IDC_TEXTSTATUS,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL|ES_CENTER,142,192,152,11
- CONTROL "Add new game",IDC_ADDGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,6,212,66,15
- CONTROL "Remove",IDC_REMOVE,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,74,212,60,15
- CONTROL "Dont show in start menu",IDC_NOTINSTARTMENU,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,81,152,9
- CONTROL "(manual added)",IDC_MANADDED,"Static",NOT WS_VISIBLE|WS_CHILD,162,31,134,9
- CONTROL "Extra Command Line Parameters:",IDC_STC15,"Static",WS_CHILD|WS_VISIBLE,142,99,150,9
- CONTROL "",IDC_EXTRAPARAMS,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,142,110,152,13,WS_EX_CLIENTEDGE
- CONTROL "Edit ...",IDC_EDITGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,222,206,72,17
-END
-
-IDD_UD DIALOGEX 0,0,223,159
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Username:",IDC_STC2,"Static",WS_CHILD|WS_VISIBLE,8,18,36,9
- CONTROL "Nick:",IDC_STC3,"Static",WS_CHILD|WS_VISIBLE,8,9,32,9
- CONTROL "Game",IDC_GRP2,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,44,220,32
- CONTROL "Voicechat",IDC_GRP3,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,77,220,33
- CONTROL "Name:",IDC_STC4,"Static",WS_CHILD|WS_VISIBLE,30,53,36,9
- CONTROL "Unreal Tournament 2004",IDC_GAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,53,134,9
- CONTROL "IP:",IDC_STC5,"Static",WS_CHILD|WS_VISIBLE,30,64,18,9
- CONTROL "255.255.255.255",IDC_GIP,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,64,54,9
- CONTROL "Port:",IDC_STC7,"Static",WS_CHILD|WS_VISIBLE,134,64,16,9
- CONTROL "27770",IDC_GPORT,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,150,64,70,9
- CONTROL "Unreal Tournament 2004",IDC_VNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,88,132,9
- CONTROL "Name:",IDC_STC10,"Static",WS_CHILD|WS_VISIBLE,30,88,22,9
- CONTROL "IP:",IDC_STC11,"Static",WS_CHILD|WS_VISIBLE,30,99,18,9
- CONTROL "255.255.255.255",IDC_VIP,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,99,54,9
- CONTROL "Port:",IDC_STC13,"Static",WS_CHILD|WS_VISIBLE,134,99,16,9
- CONTROL "27770",IDC_VPORT,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,150,99,70,9
- CONTROL "Userdetails",IDC_GRP4,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,0,112,44
- CONTROL "dufte",IDC_DNICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,46,9,64,9
- CONTROL "dufte",IDC_DUSERNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,46,18,66,9
- CONTROL "",IDC_GAMEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,6,53,22,19
- CONTROL "",IDC_VOICEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,6,88,22,19
- CONTROL "Copy",IDC_COPYGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,190,49,30,11
- CONTROL "Copy",IDC_COPYVOICE,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,190,83,30,11
- CONTROL "",IDC_PROFILIMG,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_BITMAP,0,112,222,44
- CONTROL "",IDC_GAMEINFOLIST,"SysListView32",WS_CHILD|WS_VISIBLE|LVS_REPORT,116,1,106,43,WS_EX_CLIENTEDGE
-END
-
-IDD_PWDLG DIALOGEX 6,5,204,38
-CAPTION "Enter Password"
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-EXSTYLE WS_EX_TOPMOST
-BEGIN
- CONTROL "Password:",IDC_STC17,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,0,12,34,11
- CONTROL "",IDC_PWNICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,38,0,166,11,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PWSTRING,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,38,12,166,11,WS_EX_CLIENTEDGE
- CONTROL "Join",IDC_BTN4,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,144,25,60,11
- CONTROL "Nick:",IDC_STC18,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,0,0,34,11
-END
-
-IDD_SETNICKNAME DIALOGEX 0,0,187,42
-CAPTION "Set Nickname"
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-BEGIN
- CONTROL "",IDC_NICKNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,5,5,177,12,WS_EX_CLIENTEDGE
- CONTROL "OK",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,36,23,50,14
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,102,23,50,14
-END
-
-IDD_UPDATE DIALOGEX 0,0,188,107
-CAPTION "New xfire_games.ini"
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-BEGIN
- CONTROL "There is a new XFire Gamelist online, do you want to update now?",IDC_STC34,"Static",WS_CHILD|WS_VISIBLE,30,5,154,19
- CONTROL 14,IDC_IMG2,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,4,3,22,19
- CONTROL "New supported Games:",IDC_STC35,"Static",WS_CHILD|WS_VISIBLE,6,29,124,9
- CONTROL "Update",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,36,88,50,15
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,102,88,50,15
- CONTROL "",IDC_UPDATEGAMES,"Edit",WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|ES_READONLY|ES_AUTOVSCROLL|ES_MULTILINE,6,40,178,44,WS_EX_CLIENTEDGE
-END
-
-IDD_ADDGAME DIALOGEX 0,0,196,205
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Add Game",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,4,186,50,15
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,186,50,15
- CONTROL "",IDC_GAMELIST,"ListBox",WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LBS_NOINTEGRALHEIGHT|LBS_HASSTRINGS|LBS_SORT|LBS_NOTIFY,4,33,186,148,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_CHILD|WS_VISIBLE,6,96,184,13
- CONTROL "",IDC_SEARCH,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,4,14,186,13,WS_EX_CLIENTEDGE
- CONTROL "Search:",IDC_STC14,"Static",WS_CHILD|WS_VISIBLE,4,3,186,9
- CONTROL "Custom ...",IDC_CUSTOM,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,56,186,50,15
-END
-
-IDD_ADDGAME2 DIALOGEX 0,0,196,205
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Add Game",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,4,186,50,15
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,186,50,15
- CONTROL "Game name:",IDC_STC36,"Static",WS_CHILD|WS_VISIBLE,4,3,188,9
- CONTROL "",IDC_ADD_NAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,4,14,186,13,WS_EX_CLIENTEDGE
- CONTROL "",IDC_ADD_DETECTEXE,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,4,42,136,13,WS_EX_CLIENTEDGE
- CONTROL "Game exe:",IDC_STC37,"Static",WS_CHILD|WS_VISIBLE,4,31,188,9
- CONTROL "Browse ...",IDC_ADD_BROWSEDETECT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,144,42,48,14
- CONTROL "Launcher exe (optional):",IDC_STC38,"Static",WS_CHILD|WS_VISIBLE,4,59,188,9
- CONTROL "",IDC_ADD_LAUNCHEREXE,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,4,70,136,13,WS_EX_CLIENTEDGE
- CONTROL "Browse ...",IDC_ADD_BROWSELAUNCHER,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,144,70,48,14
- CONTROL "Game id:",IDC_STC39,"Static",WS_CHILD|WS_VISIBLE,4,86,52,9
- CONTROL "",IDC_ADD_ID,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,4,97,36,13,WS_EX_CLIENTEDGE
- CONTROL "?",IDC_GAMEIDHELP,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,42,97,14,13
- CONTROL "Send game id:",IDC_STC42,"Static",WS_CHILD|WS_VISIBLE,60,86,50,9
- CONTROL "",IDC_ADD_SENDID,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,60,97,36,13,WS_EX_CLIENTEDGE
- CONTROL "?",IDC_SENDIDHELP,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,98,97,14,13
- CONTROL "Statusmessage for Xfire, if this game will be started:",IDC_STC43,"Static",WS_CHILD|WS_VISIBLE,4,114,188,9
- CONTROL "",IDC_ADD_STATUSMSG,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_MULTILINE,4,125,188,56,WS_EX_CLIENTEDGE
- CONTROL "Parameter:",IDC_STC44,"Static",WS_CHILD|WS_VISIBLE,116,86,74,9
- CONTROL "",IDC_ADD_CUSTOMPARAMS,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,116,97,76,13,WS_EX_CLIENTEDGE
-END
-
-IDD_ADDGAMEMAIN DIALOGEX 0,0,199,219
-CAPTION "Add a new game"
-FONT 8,"MS Shell Dlg",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-BEGIN
- CONTROL "",IDC_OPTIONSTAB,"SysTabControl32",WS_VISIBLE|WS_TABSTOP,1,1,198,218
-END
-
-IDD_SEARCHING DIALOGEX 6,5,198,41
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_POPUP|WS_VISIBLE|WS_BORDER|DS_CENTER
-EXSTYLE WS_EX_TOPMOST
-BEGIN
- CONTROL "Searching games ...",IDC_SEARCHINGLABL,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_CENTER,0,0,196,41
- CONTROL 14,IDC_IMG1,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,2,1,46,37
- CONTROL "",IDC_CURRENTGAME,"Static",WS_CHILD|WS_VISIBLE,44,29,150,9
-END
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/SHA1.cpp b/plugins/!NotAdopted/Xfire/xfiretest/SHA1.cpp
deleted file mode 100644
index f296b563cd..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/SHA1.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- 100% free public domain implementation of the SHA-1 algorithm
- by Dominik Reichl <dominik.reichl@t-online.de>
-
- Version 1.5 - 2005-01-01
- - 64-bit compiler compatibility added
- - Made variable wiping optional (define SHA1_WIPE_VARIABLES)
- - Removed unnecessary variable initializations
- - ROL32 improvement for the Microsoft compiler (using _rotl)
-
- ======== Test Vectors (from FIPS PUB 180-1) ========
-
- SHA1("abc") =
- A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
-
- SHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
- 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
-
- SHA1(A million repetitions of "a") =
- 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
-*/
-
-#include "stdafx.h"
-
-#include "SHA1.h"
-
-#define SHA1_MAX_FILE_BUFFER 8000
-
-// Rotate x bits to the left
-#ifndef ROL32
-#ifdef _MSC_VER
-#define ROL32(_val32, _nBits) _rotl(_val32, _nBits)
-#else
-#define ROL32(_val32, _nBits) (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits))))
-#endif
-#endif
-
-#ifdef SHA1_LITTLE_ENDIAN
-#define SHABLK0(i) (m_block->l[i] = \
- (ROL32(m_block->l[i],24) & 0xFF00FF00) | (ROL32(m_block->l[i],8) & 0x00FF00FF))
-#else
-#define SHABLK0(i) (m_block->l[i])
-#endif
-
-#define SHABLK(i) (m_block->l[i&15] = ROL32(m_block->l[(i+13)&15] ^ m_block->l[(i+8)&15] \
- ^ m_block->l[(i+2)&15] ^ m_block->l[i&15],1))
-
-// SHA-1 rounds
-#define _R0(v,w,x,y,z,i) { z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); }
-#define _R1(v,w,x,y,z,i) { z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); }
-#define _R2(v,w,x,y,z,i) { z+=(w^x^y)+SHABLK(i)+0x6ED9EBA1+ROL32(v,5); w=ROL32(w,30); }
-#define _R3(v,w,x,y,z,i) { z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5); w=ROL32(w,30); }
-#define _R4(v,w,x,y,z,i) { z+=(w^x^y)+SHABLK(i)+0xCA62C1D6+ROL32(v,5); w=ROL32(w,30); }
-
-
-CSHA1::CSHA1()
-{
- m_block = (SHA1_WORKSPACE_BLOCK *)m_workspace;
-
- Reset();
-}
-
-CSHA1::~CSHA1()
-{
- Reset();
-}
-
-void CSHA1::Reset()
-{
- // SHA1 initialization constants
- m_state[0] = 0x67452301;
- m_state[1] = 0xEFCDAB89;
- m_state[2] = 0x98BADCFE;
- m_state[3] = 0x10325476;
- m_state[4] = 0xC3D2E1F0;
-
- m_count[0] = 0;
- m_count[1] = 0;
-}
-
-void CSHA1::Transform(UINT_32 *state, UINT_8 *buffer)
-{
- // Copy state[] to working vars
- UINT_32 a = state[0], b = state[1], c = state[2], d = state[3], e = state[4];
-
- memcpy(m_block, buffer, 64);
-
- // 4 rounds of 20 operations each. Loop unrolled.
- _R0(a,b,c,d,e, 0); _R0(e,a,b,c,d, 1); _R0(d,e,a,b,c, 2); _R0(c,d,e,a,b, 3);
- _R0(b,c,d,e,a, 4); _R0(a,b,c,d,e, 5); _R0(e,a,b,c,d, 6); _R0(d,e,a,b,c, 7);
- _R0(c,d,e,a,b, 8); _R0(b,c,d,e,a, 9); _R0(a,b,c,d,e,10); _R0(e,a,b,c,d,11);
- _R0(d,e,a,b,c,12); _R0(c,d,e,a,b,13); _R0(b,c,d,e,a,14); _R0(a,b,c,d,e,15);
- _R1(e,a,b,c,d,16); _R1(d,e,a,b,c,17); _R1(c,d,e,a,b,18); _R1(b,c,d,e,a,19);
- _R2(a,b,c,d,e,20); _R2(e,a,b,c,d,21); _R2(d,e,a,b,c,22); _R2(c,d,e,a,b,23);
- _R2(b,c,d,e,a,24); _R2(a,b,c,d,e,25); _R2(e,a,b,c,d,26); _R2(d,e,a,b,c,27);
- _R2(c,d,e,a,b,28); _R2(b,c,d,e,a,29); _R2(a,b,c,d,e,30); _R2(e,a,b,c,d,31);
- _R2(d,e,a,b,c,32); _R2(c,d,e,a,b,33); _R2(b,c,d,e,a,34); _R2(a,b,c,d,e,35);
- _R2(e,a,b,c,d,36); _R2(d,e,a,b,c,37); _R2(c,d,e,a,b,38); _R2(b,c,d,e,a,39);
- _R3(a,b,c,d,e,40); _R3(e,a,b,c,d,41); _R3(d,e,a,b,c,42); _R3(c,d,e,a,b,43);
- _R3(b,c,d,e,a,44); _R3(a,b,c,d,e,45); _R3(e,a,b,c,d,46); _R3(d,e,a,b,c,47);
- _R3(c,d,e,a,b,48); _R3(b,c,d,e,a,49); _R3(a,b,c,d,e,50); _R3(e,a,b,c,d,51);
- _R3(d,e,a,b,c,52); _R3(c,d,e,a,b,53); _R3(b,c,d,e,a,54); _R3(a,b,c,d,e,55);
- _R3(e,a,b,c,d,56); _R3(d,e,a,b,c,57); _R3(c,d,e,a,b,58); _R3(b,c,d,e,a,59);
- _R4(a,b,c,d,e,60); _R4(e,a,b,c,d,61); _R4(d,e,a,b,c,62); _R4(c,d,e,a,b,63);
- _R4(b,c,d,e,a,64); _R4(a,b,c,d,e,65); _R4(e,a,b,c,d,66); _R4(d,e,a,b,c,67);
- _R4(c,d,e,a,b,68); _R4(b,c,d,e,a,69); _R4(a,b,c,d,e,70); _R4(e,a,b,c,d,71);
- _R4(d,e,a,b,c,72); _R4(c,d,e,a,b,73); _R4(b,c,d,e,a,74); _R4(a,b,c,d,e,75);
- _R4(e,a,b,c,d,76); _R4(d,e,a,b,c,77); _R4(c,d,e,a,b,78); _R4(b,c,d,e,a,79);
-
- // Add the working vars back into state
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
-
- // Wipe variables
-#ifdef SHA1_WIPE_VARIABLES
- a = b = c = d = e = 0;
-#endif
-}
-
-// Use this function to hash in binary data and strings
-void CSHA1::Update(UINT_8 *data, UINT_32 len)
-{
- UINT_32 i, j;
-
- j = (m_count[0] >> 3) & 63;
-
- if((m_count[0] += len << 3) < (len << 3)) m_count[1]++;
-
- m_count[1] += (len >> 29);
-
- if((j + len) > 63)
- {
- i = 64 - j;
- memcpy(&m_buffer[j], data, i);
- Transform(m_state, m_buffer);
-
- for( ; i + 63 < len; i += 64) Transform(m_state, &data[i]);
-
- j = 0;
- }
- else i = 0;
-
- memcpy(&m_buffer[j], &data[i], len - i);
-}
-
-// Hash in file contents
-bool CSHA1::HashFile(char *szFileName)
-{
- unsigned long ulFileSize, ulRest, ulBlocks;
- unsigned long i;
- UINT_8 uData[SHA1_MAX_FILE_BUFFER];
- FILE *fIn;
-
- if(szFileName == NULL) return false;
-
- fIn = fopen(szFileName, "rb");
- if(fIn == NULL) return false;
-
- fseek(fIn, 0, SEEK_END);
- ulFileSize = (unsigned long)ftell(fIn);
- fseek(fIn, 0, SEEK_SET);
-
- if(ulFileSize != 0)
- {
- ulBlocks = ulFileSize / SHA1_MAX_FILE_BUFFER;
- ulRest = ulFileSize % SHA1_MAX_FILE_BUFFER;
- }
- else
- {
- ulBlocks = 0;
- ulRest = 0;
- }
-
- for(i = 0; i < ulBlocks; i++)
- {
- fread(uData, 1, SHA1_MAX_FILE_BUFFER, fIn);
- Update((UINT_8 *)uData, SHA1_MAX_FILE_BUFFER);
- }
-
- if(ulRest != 0)
- {
- fread(uData, 1, ulRest, fIn);
- Update((UINT_8 *)uData, ulRest);
- }
-
- fclose(fIn); fIn = NULL;
- return true;
-}
-
-void CSHA1::Final()
-{
- UINT_32 i;
- UINT_8 finalcount[8];
-
- for(i = 0; i < 8; i++)
- finalcount[i] = (UINT_8)((m_count[((i >= 4) ? 0 : 1)]
- >> ((3 - (i & 3)) * 8) ) & 255); // Endian independent
-
- Update((UINT_8 *)"\200", 1);
-
- while ((m_count[0] & 504) != 448)
- Update((UINT_8 *)"\0", 1);
-
- Update(finalcount, 8); // Cause a SHA1Transform()
-
- for(i = 0; i < 20; i++)
- {
- m_digest[i] = (UINT_8)((m_state[i >> 2] >> ((3 - (i & 3)) * 8) ) & 255);
- }
-
- // Wipe variables for security reasons
-#ifdef SHA1_WIPE_VARIABLES
- i = 0;
- memset(m_buffer, 0, 64);
- memset(m_state, 0, 20);
- memset(m_count, 0, 8);
- memset(finalcount, 0, 8);
- Transform(m_state, m_buffer);
-#endif
-}
-
-// Get the final hash as a pre-formatted string
-void CSHA1::ReportHash(char *szReport, unsigned char uReportType)
-{
- unsigned char i;
- char szTemp[16];
-
- if(szReport == NULL) return;
-
- if(uReportType == REPORT_HEX)
- {
- sprintf(szTemp, "%02X", m_digest[0]);
- strcat(szReport, szTemp);
-
- for(i = 1; i < 20; i++)
- {
- sprintf(szTemp, " %02X", m_digest[i]);
- strcat(szReport, szTemp);
- }
- }
- else if(uReportType == REPORT_DIGIT)
- {
- sprintf(szTemp, "%u", m_digest[0]);
- strcat(szReport, szTemp);
-
- for(i = 1; i < 20; i++)
- {
- sprintf(szTemp, " %u", m_digest[i]);
- strcat(szReport, szTemp);
- }
- }
- else strcpy(szReport, "Error: Unknown report type!");
-}
-
-// Get the raw message digest
-void CSHA1::GetHash(UINT_8 *puDest)
-{
- memcpy(puDest, m_digest, 20);
-}
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/SHA1.h b/plugins/!NotAdopted/Xfire/xfiretest/SHA1.h
deleted file mode 100644
index b95a00970f..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/SHA1.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- 100% free public domain implementation of the SHA-1 algorithm
- by Dominik Reichl <dominik.reichl@t-online.de>
-
- Version 1.5 - 2005-01-01
- - 64-bit compiler compatibility added
- - Made variable wiping optional (define SHA1_WIPE_VARIABLES)
- - Removed unnecessary variable initializations
- - ROL32 improvement for the Microsoft compiler (using _rotl)
-
- ======== Test Vectors (from FIPS PUB 180-1) ========
-
- SHA1("abc") =
- A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
-
- SHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
- 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
-
- SHA1(A million repetitions of "a") =
- 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
-*/
-
-#ifndef ___SHA1_HDR___
-#define ___SHA1_HDR___
-//#define UINT_8 unsigned char
-//#define UINT_32 unsigned long
-
-#include <stdio.h> // Needed for file access
-#include <memory.h> // Needed for memset and memcpy
-#include <string.h> // Needed for strcat and strcpy
-#include <iostream>
-
-#ifdef _MSC_VER
-#include <stdlib.h>
-#endif
-
-// If you're compiling big endian, just comment out the following line
-#define SHA1_LITTLE_ENDIAN
-
-// #define or #undef this, if you want the CSHA1 class to wipe all
-// temporary variables after processing
-#define SHA1_WIPE_VARIABLES
-
-/////////////////////////////////////////////////////////////////////////////
-// Define 8- and 32-bit variables
-
-#ifndef UINT_32
-
-#ifdef _MSC_VER
-
-#define UINT_8 unsigned __int8
-#define UINT_32 unsigned __int32
-
-#else
-
-#define UINT_8 unsigned char
-
-#if (ULONG_MAX == 0xFFFFFFFF)
-#define UINT_32 unsigned long
-#else
-#define UINT_32 unsigned int
-#endif
-
-#endif
-#endif
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Declare SHA1 workspace
-
-typedef union
-{
- UINT_8 c[64];
- UINT_32 l[16];
-} SHA1_WORKSPACE_BLOCK;
-
-class CSHA1
-{
-public:
- // Two different formats for ReportHash(...)
- enum
- {
- REPORT_HEX = 0,
- REPORT_DIGIT = 1
- };
-
- // Constructor and Destructor
- CSHA1();
- ~CSHA1();
-
- UINT_32 m_state[5];
- UINT_32 m_count[2];
- UINT_8 m_buffer[64];
- UINT_8 m_digest[20];
-
- void Reset();
-
- // Update the hash value
- void Update(UINT_8 *data, UINT_32 len);
- bool HashFile(char *szFileName);
-
- // Finalize hash and report
- void Final();
- void ReportHash(char *szReport, unsigned char uReportType = REPORT_HEX);
- void GetHash(UINT_8 *puDest);
-
-private:
- // Private SHA-1 transformation
- void Transform(UINT_32 *state, UINT_8 *buffer);
-
- // Member variables
- UINT_8 m_workspace[64];
- SHA1_WORKSPACE_BLOCK *m_block; // SHA1 pointer to the byte array above
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.cpp
deleted file mode 100644
index e1fe2fdd01..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "stdafx.h"
-#include "Xfire_avatar_loader.h"
-
-Xfire_avatar_loader::Xfire_avatar_loader(xfirelib::Client* client) {
- threadrunning=FALSE;
- this->client=client;
- InitializeCriticalSection(&this->avatarMutex);
-}
-
-Xfire_avatar_loader::~Xfire_avatar_loader() {
- //liste leeren, damit der laufende thread abgebrochen wird
- list.clear();
- //warten bis der thread geschlossen wurde
- EnterCriticalSection(&this->avatarMutex);
- LeaveCriticalSection(&this->avatarMutex);
- //critical section entfernen
- DeleteCriticalSection(&this->avatarMutex);
-}
-
-void Xfire_avatar_loader::loadThread(LPVOID lparam) {
- Xfire_avatar_loader* loader=(Xfire_avatar_loader*)lparam;
-
- //kein loader, dann abbruch
- if(!lparam)
- return;
-
- if(loader) {
- EnterCriticalSection(&loader->avatarMutex);
- loader->threadrunning=TRUE;
- }
-
- while(1){
- //keinen avatarload auftrag mehr
- if(!loader->list.size())
- break;
-
- //letzten load process holen
- Xfire_avatar_process process=loader->list.back();
-
- //buddyinfo abfragen
- GetBuddyInfo buddyinfo;
- buddyinfo.userid=process.userid;
- if(loader->client)
- if(loader->client->connected)
- {
- loader->client->send(&buddyinfo);
- }
- else //nicht mehr verbunden? dann liste leeren und schleife abbrechen
- {
- loader->list.clear();
- break;
- }
-
- //auftrag entfernen
- loader->list.pop_back();
-
- Sleep(1000);
- }
-
- if(loader)
- {
- loader->threadrunning=FALSE;
- LeaveCriticalSection(&loader->avatarMutex);
- }
-
- return;
-}
-
-BOOL Xfire_avatar_loader::loadAvatar(HANDLE hcontact,char*username,unsigned int userid) {
- Xfire_avatar_process process={0};
-
- //struktur füllen
- process.hcontact = hcontact;
- if(username)
- strcpy_s(process.username,128,username);
- process.userid=userid;
-
- //Avataranfrage an die liste übergeben
- this->list.push_back(process);
-
- if(!threadrunning && client!=NULL) {
- mir_forkthread(Xfire_avatar_loader::loadThread,(LPVOID)this);
- }
-
- return TRUE;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.h
deleted file mode 100644
index a51082629e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_avatar_loader.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2009 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//Klasse behandelt alle Iconsachen unter Xfire
-
-#ifndef _XFIRE_AVATAR_LOADER
-#define _XFIRE_AVATAR_LOADER
-
-#include "client.h"
-#include "Xfire_base.h"
-#include "getbuddyinfo.h"
-#include <vector>
-
-using namespace xfirelib;
-
-struct Xfire_avatar_process {
- HANDLE hcontact;
- char username[128];
- unsigned int userid;
-};
-
-class Xfire_avatar_loader : public Xfire_base {
-private:
- static void loadThread(LPVOID lparam);
- xfirelib::Client *client;
- CRITICAL_SECTION avatarMutex;
-public:
- vector<Xfire_avatar_process> list;
- BOOL threadrunning;
- BOOL loadAvatar(HANDLE hcontact,char*username,unsigned int userid);
- Xfire_avatar_loader(xfirelib::Client* client);
- ~Xfire_avatar_loader();
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.cpp
deleted file mode 100644
index 2e04d9c0a3..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.cpp
+++ /dev/null
@@ -1,567 +0,0 @@
-#include "stdafx.h"
-
-#include "Xfire_base.h"
-
-//rechnet die einzelnen chars des strings zusammen
-BYTE Xfire_base::accStringByte(char* str){
- BYTE temp=0;
-
- //keins tirng? bye bye
- if(str==NULL)
- return 0;
-
- for(unsigned int i=0;i<(int)strlen(str);i++)
- {
- temp+=str[i];
- }
-
- return temp;
-}
-
-//lowercased einen string
-void Xfire_base::strtolower(char*str)
-{
- //keins tirng? bye bye
- if(str==NULL)
- return;
-
- //lowercase it :)
- for(unsigned int i=0;i<(int)strlen(str);i++)
- {
- str[i]=tolower(str[i]);
- }
-}
-
-//uppercased einen string
-void Xfire_base::strtoupper(char*str)
-{
- //keins tirng? bye bye
- if(str==NULL)
- return;
-
- //lowercase it :)
- for(unsigned int i=0;i<(int)strlen(str);i++)
- {
- str[i]=toupper(str[i]);
- }
-}
-
-//setzt einen string
-void Xfire_base::setString(char*from,char**to)
-{
- //keine quelle, kein ziel? dann nix machen
- if(from==NULL||to==NULL)
- return;
-
- //stringgröße auslesen
- int size=strlen(from);
-
- //bestehenden zielpointer leeren
- if(*to!=NULL)
- delete[] *to;
-
- //neuen string anlegen
- *to=new char[size+1];
-
- //string in neues array kopieren
- strcpy_s(*to,size+1,from);
-}
-
-//setzt einen string
-void Xfire_base::appendString(char*from,char**to)
-{
- //keine quelle, kein ziel? dann nix machen
- if(from==NULL||to==NULL||*to==NULL)
- return;
-
- //stringgröße auslesen
- int size=strlen(from);
- int size2=strlen(*to);
-
- //temporären pointer anlegen
- char* append=new char[size+size2+1];
-
- //string in neues array kopieren
- strcpy_s(append,size+size2+1,*to);
- //zusätzlichen stirng anhängen
- strcat_s(append,size+size2+1,from);
- //altes to entfernen
- delete[] *to;
- //appendstring zuordnen
- *to=append;
-}
-
-//liest einen stringval aus der db und setzt einen string für
-void Xfire_base::readStringfromDB(char*name,unsigned int dbid,char**to)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL||to==NULL)
- return;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
- if(!DBGetContactSettingTString(NULL, protocolname, temp,&dbv))
- {
- //string setzen
- setString(dbv.pszVal,to);
- //dbval wieder freigeben
- DBFreeVariant(&dbv);
- }
-}
-
-//liest einen stringval aus der db welches unterid hat und setzt einen string für
-void Xfire_base::readStringfromDB(char*name,unsigned int dbid,int id,char**to)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL||to==NULL)
- return;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i_%i",name,dbid,id);
- if(!DBGetContactSettingTString(NULL, protocolname, temp,&dbv))
- {
- //string setzen
- setString(dbv.pszVal,to);
- //dbval wieder freigeben
- DBFreeVariant(&dbv);
- }
-}
-
-//schreibt einen stringval in die db welche unterid hat
-void Xfire_base::writeStringtoDB(char*name,unsigned int dbid,int id,char*val)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL||val==NULL)
- return;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i_%i",name,dbid,id);
- DBWriteContactSettingTString(NULL, protocolname, temp,val);
-}
-
-//schreibt einen stringval in die db welche unterid hat
-void Xfire_base::writeStringtoDB(char*name,unsigned int dbid,char*val)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL||val==NULL)
- return;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
- DBWriteContactSettingTString(NULL, protocolname, temp,val);
-}
-
-//schreibt einen bytewert in die db
-void Xfire_base::writeBytetoDB(char*name,unsigned int dbid,int val)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL)
- return;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
- DBWriteContactSettingByte(NULL, protocolname, temp, val);
-}
-
-//schreibt einen wordwert in die db
-void Xfire_base::writeWordtoDB(char*name,unsigned int dbid,int val)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL)
- return;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
- DBWriteContactSettingWord(NULL, protocolname, temp, val);
-}
-
-
-//liest einen byteval aus der db und gibt es zurück
-unsigned char Xfire_base::readBytefromDB(char*name,unsigned int dbid,int defaultval)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL)
- return 0;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
- return DBGetContactSettingByte(NULL, protocolname, temp, defaultval);
-}
-
-//liest einen wordval aus der db und gibt es zurück
-unsigned int Xfire_base::readWordfromDB(char*name,unsigned int dbid,int defaultval)
-{
- //keine quelle, kein ziel? dann nix machen
- if(name==NULL)
- return 0;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
- return DBGetContactSettingWord(NULL, protocolname, temp, defaultval);
-}
-
-//entfernt einen dbeintrag
-BOOL Xfire_base::removeDBEntry(char*name,unsigned int dbid)
-{
- //kein name?
- if(name==NULL)
- return 0;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
-
- //eintrag entfernen
- if(!DBGetContactSetting(NULL, protocolname, temp,&dbv))
- {
- DBFreeVariant(&dbv);
- DBDeleteContactSetting(NULL, protocolname, temp);
-
- return TRUE;
- }
- return FALSE;
-}
-
-//entfernt einen dbeintrag welche unterid's hat
-BOOL Xfire_base::removeDBEntry(char*name,unsigned int dbid,int id)
-{
- //kein name?
- if(name==NULL)
- return 0;
-
- //wert aus der dblesen
- sprintf_s(temp,128,"%s_%i_%i",name,dbid,id);
-
- //eintrag entfernen
- if(!DBGetContactSetting(NULL, protocolname, temp,&dbv))
- {
- DBFreeVariant(&dbv);
- DBDeleteContactSetting(NULL, protocolname, temp);
-
- return TRUE;
- }
- return FALSE;
-}
-
-//sucht innerhalb eines strings ein anderen string und liefert true zurück wenn gefunden
-BOOL Xfire_base::inString(char*str,char*search,char**pos) {
- //leere pointer?, dann FALSE zurück
- if(str==NULL||search==NULL)
- {
- //poszeiger, falls übergeben, auf NULL setzen
- if(pos) *pos=NULL;
- return FALSE;
- }
-
- //ist der gesuchte string größer, wie der string wo gesucht werden soll? dann FALSE zurück
- unsigned int sizeofsearch=strlen(search);
- if(sizeofsearch>strlen(str))
- {
- //poszeiger, falls übergeben, auf NULL setzen
- if(pos) *pos=NULL;
- return FALSE;
- }
-
- char* src=str;
- char* s=search;
-
- while(*src!=0)
- {
- if(*src==*s) //gleich, dann zum nächsten buchstaben springen
- s++;
- else if(*s==0) //string ende erreicht? dann true
- {
- //poszeiger mit aktueller pos füllen, da position gefunden
- if(pos) *pos=src-sizeofsearch;
- return TRUE;
- }
- else //anderer biuchstabe? dann wieder zurück zum anfangsbuchstaben
- s=search;
- src++;
- }
- if(*s==0) //string ende erreicht? dann true
- {
- //poszeiger mit aktueller pos füllen, da position gefunden
- if(pos) *pos=src-sizeofsearch;
- return TRUE;
- }
-
- //poszeiger, falls übergeben, auf NULL setzen
- if(pos) *pos=NULL;
- //nix gefunden, FALSE
- return FALSE;
-}
-
-void Xfire_base::strreplace(char*search,char*replace,char**data) {
- //leere pointer?, dann zurück
- if(replace==NULL||search==NULL||data==NULL||*data==NULL)
- {
- return;
- }
-
- char* pos=NULL;
- //gesuchten string suchen
- if(this->inString(*data,search,&pos))
- {
- //gefunden? dann replace
- *pos=0;
- char* newdata=NULL;
- //alles vorm gefunden anhängen
- this->setString(*data,&newdata);
- //ersetzendes anhängen
- this->appendString(replace,&newdata);
- //poszeiger um die größe des zusuchenden strings erhöhen
- pos+=strlen(search);
- //rest anhängen
- this->appendString(pos,&newdata);
- //alten string löschen
- delete[] *data;
- *data=NULL;
- //neuen auf diesen setzen
- this->setString(newdata,data);
- //temporären newdata löschen
- delete[] newdata;
- }
-}
-
-//stringvergleich mit wildcards
-BOOL Xfire_base::wildcmp(const char*search,const char *text) {
- //keine gültigen strings, dann abbruch
- if(search==NULL || text==NULL || *text==0 || *search==0)
- return FALSE;
-
- //wildcardmodus
- int wildc=0;
-
- do {
- //wilcard gefunden?
- if(*search=='*')
- {
- //wildcardmodus an
- wildc=1;
- //nächsten suchzeichen
- search++;
- //wenn searchzeichen 0, dann 1 zurückgeben, da der rest des searchstings egal ist
- if(*search==0)
- return TRUE;
- }
-
- //prüfe searchzeichen mit textzeichen, aber nut wenn kein wildcardmodus aktiv ist
- if(*search!=*text && !wildc)
- return FALSE;
-
- //kein wildcardmodus
- if(!wildc)
- {
- //nächstes suchzeichen
- search++;
- }
- //wenn suchzeichen und textzeichen gleich ist
- else if(*search==*text)
- {
- //den wildcardmodus abschalten
- wildc=0;
- //nächstes suchzeichen
- search++;
- }
- //nächstes textzeichen
- text++;
- //wenn textende erreicht und suchzeichen noch vorhanden, dann 0 zurückgegebn
- if(*text==0 && *search!=0)
- return FALSE;
- }
- //solange weiter bis kein suchzeichen mehr vorhanden is
- while(*search!=0);
-
- //textzeichen übrig 0 zurück
- if(*text!=0)
- return FALSE;
-
- //volle übereinstimmung
- return TRUE;
-}
-
-//wrapper wenn nur gameid angegeben
-BOOL Xfire_base::getIniValue(unsigned int gameid,const char* valname,char*out,int sizeofout) {
- return Xfire_base::getIniValue(gameid,0,valname,out,sizeofout);
-}
-
-
-//läd einen eintrag aus der ini
-BOOL Xfire_base::getIniValue(unsigned int gameid,unsigned int subid,const char* valname,char*out,int sizeofout) {
- //kein ziel oder kein variablenname, dann FALSE zurück
- if(!out || !valname)
- return FALSE;
-
- char idstring[15];
- char path[MAX_PATH];
-
- //pfad einlesen
- if(!getIniPath(path))
- return FALSE; //kein pfad bug?!?!
-
- if(subid==0) {
- sprintf_s(idstring,15,"%d",gameid);
-
- if(xfire_GetPrivateProfileString(idstring, valname, "", out, sizeofout, path))
- return TRUE;
-
- subid++;
- }
-
- sprintf_s(idstring,15,"%d_%d",gameid,subid);
-
- if(xfire_GetPrivateProfileString(idstring, valname, "", out, sizeofout, path))
- return TRUE;
-
- return FALSE;
-}
-
-BOOL Xfire_base::getIniPath(char*path) {
- //kein ziel abbruch
- if(!path)
- return FALSE;
-
- FoldersGetCustomPath( XFireWorkingFolder, path, MAX_PATH, 'W' );
- strcat_s(path,MAX_PATH,"\\");
- strcat_s(path,MAX_PATH,"xfire_games.ini");
-
- return TRUE;
-}
-
-BOOL Xfire_base::getIconPath(char*path) {
- //kein ziel abbruch
- if(!path)
- return FALSE;
-
- FoldersGetCustomPath( XFireIconFolder, path, MAX_PATH, 'I' );
- strcat_s(path,MAX_PATH,"\\");
-
- return TRUE;
-}
-
-BOOL Xfire_base::getGamename(unsigned int gameid,char* out,int outsize){
- //kein ziel
- if(!out)
- return FALSE;
-
- if(!getIniValue(gameid,"LongName",out,outsize))
- {
- //customnamen laden, wenn vorhanden
- DBVARIANT dbv;
- char dbstr[80]="";
- sprintf_s(dbstr,XFIRE_MAXSIZEOFGAMENAME,"customgamename_%d",gameid);
- if(!DBGetContactSetting(NULL,protocolname,dbstr,&dbv)) {
- sprintf_s(out,outsize,"%s",dbv.pszVal);
- DBFreeVariant(&dbv);
- return TRUE;
- }
- else
- return FALSE;
- }
- return TRUE;
-}
-
-//wandelt einen buffer mit größe in ein hicon mit hilfe von gdi+ um
-HICON Xfire_base::createHICONfromdata(LPVOID data,unsigned int size) {
- //zielspeichern anlegen
- HGLOBAL buffer=GlobalAlloc(GMEM_MOVEABLE, size);
- if(buffer) {
- LPVOID data2=GlobalLock(buffer);
- if(data2) {
- CopyMemory(data2, data, size);
-
- IStream* stream=NULL;
- if(CreateStreamOnHGlobal(data2,FALSE,&stream)== S_OK)
- {
- HICON hicon=NULL;
- Gdiplus::Bitmap image(stream);
-
- image.GetHICON(&hicon);
- stream->Release();
-
- GlobalUnlock(buffer);
- GlobalFree(buffer);
-
- return hicon;
- }
- GlobalUnlock(buffer);
- }
- GlobalFree(buffer);
- }
- return NULL;
-}
-
-//wandelt einen buffer mit größe in ein hicon mit hilfe von gdi+ um
-HBITMAP Xfire_base::createHBITMAPfromdata(LPVOID data,unsigned int size) {
- //zielspeichern anlegen
- HGLOBAL buffer=GlobalAlloc(GMEM_MOVEABLE, size);
- if(buffer) {
- LPVOID data2=GlobalLock(buffer);
- if(data2) {
- CopyMemory(data2, data, size);
-
- IStream* stream=NULL;
- if(CreateStreamOnHGlobal(data2,FALSE,&stream)== S_OK)
- {
- HBITMAP hbitmap=NULL;
- Gdiplus::Bitmap image(stream);
-
- image.GetHBITMAP(0,&hbitmap);
- stream->Release();
-
- GlobalUnlock(buffer);
- GlobalFree(buffer);
-
- return hbitmap;
- }
- GlobalUnlock(buffer);
- }
- GlobalFree(buffer);
- }
- return NULL;
-}
-
-//prüft ob processid noch gültig is
-BOOL Xfire_base::isValidPid(DWORD pid) {
- DWORD aProcesses[1024],cbNeeded,cProcesses;
-
- if(pid==NULL)
- return FALSE;
-
- if(!EnumProcesses(aProcesses,sizeof(aProcesses),&cbNeeded))
- return FALSE;
-
- cProcesses = cbNeeded / sizeof(DWORD);
-
- for ( unsigned int i = 0; i < cProcesses; i++ )
- if(aProcesses[i]==pid)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-//sucht nach einen process und liefert die pid
-BOOL Xfire_base::getPidByProcessName(char*name,DWORD*pid) {
- if(pid==NULL||name==NULL)
- return FALSE;
-
- HANDLE hSnapShot = CreateToolhelp32Snapshot ( TH32CS_SNAPALL, 0);
- PROCESSENTRY32* processInfo = new PROCESSENTRY32;
- processInfo->dwSize = sizeof ( PROCESSENTRY32);
-
- while ( Process32Next ( hSnapShot,processInfo ) != FALSE)
- {
- if(processInfo->th32ProcessID!=0) {
- if(_stricmp(processInfo->szExeFile,name)==0)
- {
- *pid=processInfo->th32ProcessID;
- CloseHandle ( hSnapShot);
- return TRUE;
- }
- }
- }
- CloseHandle ( hSnapShot);
- return FALSE;
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.h
deleted file mode 100644
index 5753e631c4..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_base.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-/*
- Beinhaltet Basisfunktionen
-*/
-
-#ifndef _XFIRE_BASE
-#define _XFIRE_BASE
-
-#include "baseProtocol.h"
-
-extern HANDLE XFireWorkingFolder;
-extern HANDLE XFireIconFolder;
-
-#define XFIRE_MAXSIZEOFGAMENAME 80
-
-class Xfire_base {
-private:
- //vars
- DBVARIANT dbv;
-public:
- char temp[128];
- //funktionen/tools
- void setString(char*from,char**to);
- void appendString(char*from,char**to);
- void readStringfromDB(char*name,unsigned int dbid,char**to);
- void readStringfromDB(char*name,unsigned int dbid,int id,char**to);
- unsigned char readBytefromDB(char*name,unsigned int dbid,int defaultval=0);
- unsigned int readWordfromDB(char*name,unsigned int dbid,int defaultval=0);
- BOOL removeDBEntry(char*name,unsigned int dbid);
- BOOL removeDBEntry(char*name,unsigned int dbid,int id2);
- void writeStringtoDB(char*name,unsigned int dbid,int id,char*val);
- void writeStringtoDB(char*name,unsigned int dbid,char*val);
- void writeBytetoDB(char*name,unsigned int dbid,int val);
- void writeWordtoDB(char*name,unsigned int dbid,int val);
- void strtolower(char*);
- void strtoupper(char*);
- void strreplace(char*search,char*replace,char**data);
- BYTE accStringByte(char*);
- BOOL inString(char*str,char*search,char**pos=NULL);
- BOOL wildcmp(const char*search,const char *text);
- // ini funktionen
- BOOL getIniValue(unsigned int gameid,const char* valname,char*out,int sizeofout=255);
- BOOL getIniValue(unsigned int gameid,unsigned int subid,const char* valname,char*out,int sizeofout=255);
- BOOL getIniPath(char*path);
- BOOL getIconPath(char*path);
- // gamename
- BOOL getGamename(unsigned int gameid,char* out,int outsize=255);
- //gdi+
- HICON createHICONfromdata(LPVOID data,unsigned int size);
- HBITMAP createHBITMAPfromdata(LPVOID data,unsigned int size);
- //processzeugs
- BOOL isValidPid(DWORD pid);
- BOOL getPidByProcessName(char*name,DWORD*pid);
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.cpp
deleted file mode 100644
index a0250de65c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.cpp
+++ /dev/null
@@ -1,487 +0,0 @@
-#include "stdafx.h"
-
-#include "Xfire_game.h"
-#include "pwd_dlg.h" //passwort eingabe dlg
-
-//prüft nach, ob das game das nötige extragameargs im launcherstring hat
-BOOL Xfire_game::haveExtraGameArgs() {
- //kein launcher stirng, dann abbruch
- if(!this->launchparams)
- return FALSE;
-
- //wenn platzhalter vorhanden, dann TRUE zurück
- if(this->inString(this->launchparams,"%UA_LAUNCHER_EXTRA_ARGS%"))
- return TRUE;
-
- return FALSE;
-}
-
-//startes das spiel
-BOOL Xfire_game::start_game(char*ip,unsigned int port,char*pw) {
- //launchparam prüfen ob gefüllt?
- if(this->launchparams==NULL)
- return FALSE;
-
- //ist launchparam großgenug für eibne urlprüfung?
- if(strlen(this->launchparams)>5)
- {
- //launchparams ne url? dann openurl funktion von miranda verwenden
- if(this->launchparams[0]=='h'&&
- this->launchparams[1]=='t'&&
- this->launchparams[2]=='t'&&
- this->launchparams[3]=='p'&&
- this->launchparams[4]==':')
- {
- return CallService( MS_UTILS_OPENURL, 1, (LPARAM)this->launchparams );
- }
- }
-
- //spiel hat netwerkparameter?
- int networksize=0;
- char* mynetworkparams=NULL;
-
- if(this->networkparams)
- {
- if(ip)
- {
- char portstr[6]="";
- int pwsize=255;
-
- //größe des netzwerparams berechnen
- if(this->pwparams)
- pwsize+=strlen(this->pwparams);
-
- mynetworkparams=new char[strlen(this->networkparams)+pwsize];
- strcpy_s(mynetworkparams,strlen(this->networkparams)+pwsize,this->networkparams);
-
- //port begrenzen
- port=port%65535;
- //port in string wandeln
- sprintf_s(portstr,6,"%d",port);
-
- str_replace(mynetworkparams,"%UA_GAME_HOST_NAME%",ip);
- str_replace(mynetworkparams,"%UA_GAME_HOST_PORT%",portstr);
-
- //passwort dialog, nur wenn SHIFT gehalten wird beim join, da sonst immer gefragt wird
- if(GetAsyncKeyState(VK_LSHIFT) && this->pwparams){
- char password[256]=""; //passwort maximal 255 zeichen
-
- if(ShowPwdDlg(password)) {
- char* mypwargs=new char[pwsize];
-
- //speicher frei?
- if(mypwargs!=NULL) {
- strcpy_s(mypwargs,pwsize,this->pwparams);
- str_replace(mypwargs, "%UA_GAME_HOST_PASSWORD%", password);
- str_replace(mynetworkparams,"%UA_LAUNCHER_PASSWORD_ARGS%",mypwargs);
- delete[] mypwargs;
- }
- else
- str_replace(mynetworkparams,"%UA_LAUNCHER_PASSWORD_ARGS%","");
- }
- else
- {
- str_replace(mynetworkparams,"%UA_LAUNCHER_PASSWORD_ARGS%","");
- }
- }
- else
- str_replace(mynetworkparams,"%UA_LAUNCHER_PASSWORD_ARGS%","");
-
- //bestimmte felder erstmal leer ersetzen
- str_replace(mynetworkparams,"%UA_LAUNCHER_RCON_ARGS%","");
- }
-
- if(mynetworkparams)
- networksize=strlen(mynetworkparams)+strlen(this->networkparams);
- }
-
- //extra parameter
- int extraparamssize=0;
- if(this->extraparams)
- {
- extraparamssize=strlen(this->extraparams);
- }
-
- //temporäres array anlegen
- char*temp=NULL;
- temp=new char[strlen(this->launchparams)+networksize+extraparamssize+1];
-
- if(temp==NULL)
- {
- //wenn nwparams gesetzt, leeren
- if(mynetworkparams)
- delete[] mynetworkparams;
-
- return FALSE;
- }
-
- //launcherstring ins temporäre array
- strcpy_s(temp,strlen(this->launchparams)+1,this->launchparams);
-
- //netzwerkparameter ?
- if(mynetworkparams)
- {
- str_replace(temp,"%UA_LAUNCHER_NETWORK_ARGS%",mynetworkparams);
- delete[] mynetworkparams;
- }
- else
- str_replace(temp,"%UA_LAUNCHER_NETWORK_ARGS%","");
-
- if(this->extraparams)
- str_replace(temp,"%UA_LAUNCHER_EXTRA_ARGS%",this->extraparams);
- else
- str_replace(temp,"%UA_LAUNCHER_EXTRA_ARGS%","");
-
- //auf createprocess umgebaut
- STARTUPINFO si = { sizeof(si) };
- PROCESS_INFORMATION pi;
-
- // MessageBox(NULL,temp,temp,0);
-
- //starten
- if(CreateProcess(0, temp, 0, 0, FALSE, 0, 0, GetLaunchPath(temp) , &si, &pi)==0)
- {
- //schlug fehl, dann runas methode verwenden
- char*exe=strrchr(temp,'\\');
- if(exe==0)
- {
- delete[] temp;
- return FALSE;
- }
- *exe=0;
- exe++;
- char*params=strchr(exe,'.');
- if(params!=0)
- {
- params=strchr(params,' ');
- if(params!=0)
- {
- *params=0;
- params++;
- }
- }
-
-
- SHELLEXECUTEINFO sei = {0};
- sei.cbSize = sizeof(sei);
- sei.hwnd = NULL;
- sei.lpVerb = "runas";
- sei.lpFile = exe;
- sei.lpParameters = params;
- sei.lpDirectory = temp;
- sei.nShow = SW_SHOWNORMAL;
- ShellExecuteEx(&sei);
- }
- delete[] temp;
- return TRUE;
-}
-
-//prüft den übergebenen pfad, ob es dem spiel vergleichbar
-BOOL Xfire_game::checkpath(PROCESSENTRY32* processInfo)
-{
- //gibts net, weg mit dir
- if(this->path==NULL)
- return FALSE;
-
- //versuche ein processhandle des speils zubekommen
- HANDLE op=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ, FALSE, processInfo->th32ProcessID);
-
- if(op)
- {
- //varaibele wohin der pfad eingelesen wird
- char fpath[MAX_PATH]="";
-
- //lese den pfad des spiels aus
- GetModuleFileNameEx(op,NULL,fpath,sizeof(fpath));
-
- //8.3 pfade umwandeln, nur wenn sich eine tilde im string befindet
- if(strchr(fpath,'~'))
- GetLongPathNameA(fpath,fpath,sizeof(fpath));
-
- //alles in kelinbuchstaben umwandeln
- this->strtolower(fpath);
-
- if(this->wildcmp(this->path,fpath))
- //if(strcmp(this->path,fpath)==0)
- {
- //pfad stimmt überein, commandline prüfen
- if(checkCommandLine(op,this->mustcontain,this->notcontain))
- {
- //handle zuamachen
- CloseHandle(op);
- //positive antwort an die gamedetection
- return TRUE;
- }
- }
- else //prüfe den multipfad
- {
- int size=mpath.size();
- for(int j=0;j<size;j++)
- {
- if(strcmp(mpath.at(j),fpath)==0)
- {
- //pfad stimmt überein, commandline prüfen
- if(checkCommandLine(op,this->mustcontain,this->notcontain))
- {
- //handle zumachen
- CloseHandle(op);
- //positive antwort an die gamedetection
- return TRUE;
- }
- }
- }
- }
- //is nich das game, handle zumachen
- CloseHandle(op);
- }
- else //if(this->mustcontain==NULL&&this->notcontain==NULL) //spiele die was bestimmtes im pfad benötigen skippen
- {
- char* exename=strrchr(this->path,'\\')+1;
-
- //kleiner fix bei fehlerhaften pfaden kann keine exe ermittelt werden also SKIP
- if((unsigned int)exename==0x1)
- return FALSE;
-
- //exenamen des process kleinschreiben
- this->strtolower(processInfo->szExeFile);
-
- //vergleich die exenamen
- if(strcmp(exename,processInfo->szExeFile)==0)
- {
- return TRUE;
- }
- else //anderen pfade des games noch durchprüfen
- {
- int size=mpath.size();
- for(int j=0;j<size;j++)
- {
- //exenamen rausfischen
- char* exename=strrchr(mpath.at(j),'\\')+1;
-
- //mhn keien exe, nächsten pfad prüfen
- if((unsigned int)exename==0x1)
- continue;
-
- //exe vergleichen
- if(strcmp(exename,processInfo->szExeFile)==0)
- {
- //positive antwort an die gamedetection
- return TRUE;
- }
- }
- }
- }
-
- //keine übereinstimmung
- return FALSE;
-}
-
-//icondaten setzen
-void Xfire_game::setIcon(HICON hicon,HANDLE handle) {
- this->hicon=hicon;
- this->iconhandl=handle;
-}
-
-//liest gamewerte aus der db
-void Xfire_game::readFromDB(unsigned dbid)
-{
- //lese alle string werte aus der db und befülle die passenden variablen damit
- this->readStringfromDB("gamepath",dbid,&this->path);
-
- //8.3 fix, prüfe auf ~ pfad, wenn ja pfad var umwalnd in longname
- if(this->path)
- {
- BOOL found=FALSE;
- for(unsigned int i=0;i<strlen(this->path);i++)
- {
- if(this->path[i] == '~')
- {
- found=TRUE;
- break;
- }
- }
- //gefunden? dann stirng wandeln und in pfad speichern
- if(found) {
- char ctemp[MAX_PATH]="";
- strcpy_s(ctemp,MAX_PATH,this->path);
- GetLongPathNameA(ctemp,ctemp,sizeof(ctemp));
- this->strtolower(ctemp);
- this->setString(ctemp,&this->path);
- }
- }
-
- this->readStringfromDB("gamelaunch",dbid,&this->launchparams);
- this->readStringfromDB("gamenetargs",dbid,&this->networkparams);
- this->readStringfromDB("gamepwargs",dbid,&this->pwparams);
- this->readStringfromDB("gameuserargs",dbid,&this->userparams);
- this->readStringfromDB("gamecmdline",dbid,&this->mustcontain);
- this->readStringfromDB("gamencmdline",dbid,&this->notcontain);
-
- //alle sonstigen werte
- this->id=this->readWordfromDB("gameid",dbid);
- this->send_gameid=this->readWordfromDB("gamesendid",dbid);
- if(this->send_gameid==0)
- this->send_gameid=this->id;
- this->setstatusmsg=this->readWordfromDB("gamesetsmsg",dbid,0);
- this->custom=this->readBytefromDB("gamecustom",dbid,0);
- this->skip=this->readBytefromDB("gameskip",this->id,0);
- this->notinstartmenu=this->readBytefromDB("notinstartmenu",this->id,0);
- this->noicqstatus=this->readBytefromDB("gamenostatus",this->id,0);
- this->readStringfromDB("gameextraparams",this->id,&this->extraparams);
- this->readStringfromDB("customgamename",this->id,&this->customgamename);
- this->readStringfromDB("statusmsg",this->id,&this->statusmsg);
-
- //mehrere pfade
- int size=this->readWordfromDB("gamemulti",dbid,0);
- for(int j=0;j<size;j++)
- {
- char* tpath=NULL;
- this->readStringfromDB("gamepath",dbid,j,&tpath);
-
- if(tpath)
- {
- mpath.push_back(tpath);
- }
- }
-
- //spielname auslesen, wird später für die sortierung gebraucht
- setNameandIcon();
-}
-
-//läd spielnamen aus, sowie icon
-void Xfire_game::setNameandIcon()
-{
- if(this->customgamename)
- {
- this->setString(this->customgamename,&this->name);
- }
- else
- {
- //std::string game=GetGame(this->id,0,&this->iconhandl,&this->hicon,TRUE);
- //zielbuffer für den namen
- char buf[XFIRE_MAXSIZEOFGAMENAME]="Unknown Game";
- //name des spiels auslesen
- this->getGamename(this->id,buf,XFIRE_MAXSIZEOFGAMENAME);
- //namen setzen
- this->setString(buf,&this->name);
- }
-}
-
-//liest gamewerte aus der db
-void Xfire_game::writeToDB(unsigned dbid)
-{
- //alle stringwerte schreiben
- this->writeStringtoDB("gamepath",dbid,this->path);
- this->writeStringtoDB("gamelaunch",dbid,this->launchparams);
- this->writeStringtoDB("gamenetargs",dbid,this->networkparams);
- this->writeStringtoDB("gamepwargs",dbid,this->pwparams);
- this->writeStringtoDB("gameuserargs",dbid,this->userparams);
- this->writeStringtoDB("gamecmdline",dbid,this->mustcontain);
- this->writeStringtoDB("gamencmdline",dbid,this->notcontain);
-
- //alle sonstigen werte
- this->writeWordtoDB("gameid",dbid,this->id);
- if(this->send_gameid!=0&&this->send_gameid!=this->id) this->writeWordtoDB("gamesendid",dbid,this->send_gameid);
- if(this->setstatusmsg!=0) this->writeWordtoDB("gamesetsmsg",dbid,this->setstatusmsg);
- if(this->custom!=0) this->writeBytetoDB("gamecustom",dbid,this->custom);
- //wenn gesetzt, dann eintrag machen
- if(this->skip!=0)
- this->writeBytetoDB("gameskip",this->id,this->skip);
- else //wenn nicht eintrag aus db löschen
- this->removeDBEntry("gameskip",this->id);
- if(this->notinstartmenu!=0)
- this->writeBytetoDB("notinstartmenu",this->id,this->notinstartmenu);
- else //wenn nicht eintrag aus db löschen
- this->removeDBEntry("notinstartmenu",this->id);
- if(this->noicqstatus!=0)
- this->writeBytetoDB("gamenostatus",this->id,this->noicqstatus);
- else //wenn nicht eintrag aus db löschen
- this->removeDBEntry("gamenostatus",this->id);
- if(this->extraparams!=0)
- this->writeStringtoDB("gameextraparams",this->id,this->extraparams);
- else //wenn nicht eintrag aus db löschen
- this->removeDBEntry("gameextraparams",this->id);
- if(this->customgamename!=0)
- this->writeStringtoDB("customgamename",this->id,this->customgamename);
- else //wenn nicht eintrag aus db löschen
- this->removeDBEntry("customgamename",this->id);
- if(this->statusmsg!=0)
- this->writeStringtoDB("statusmsg",this->id,this->statusmsg);
- else //wenn nicht eintrag aus db löschen
- this->removeDBEntry("statusmsg",this->id);
-
-
-
- //mehrere pfade
- int size=mpath.size();
- if(size>0)
- {
- this->writeWordtoDB("gamemulti",dbid,mpath.size());
- for(int j=0;j<size;j++)
- {
- this->writeStringtoDB("gamepath",dbid,j,mpath.at(j));
- }
- }
-
- //sendid 0 dann standard id reinladen
- if(this->send_gameid==0)
- this->send_gameid=this->id;
-}
-
-//erzeugt ein menüpunkt
-void Xfire_game::createMenuitem(unsigned int pos,int dbid)
-{
- CLISTMENUITEM mi = { 0 };
- char servicefunction[100];
-
- if(dbid<0)
- dbid=pos;
-
- memset(&mi,0,sizeof(CLISTMENUITEM));
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartGame%d");
- mi.popupPosition = 500084000;
- mi.pszPopupName = Translate("Start game");
- mi.pszContactOwner=protocolname;
- mi.cbSize = sizeof( mi );
-
- sprintf(temp,servicefunction,this->id);
- //wenn die servicefunktion schon exisitert vernichten, hehe
- if(ServiceExists(temp))
- DestroyServiceFunction(temp);
- CreateServiceFunctionParam(temp,StartGame,this->id);
- mi.pszService = temp;
- mi.position = 500090002+pos;
- mi.hIcon = this->hicon?this->hicon:LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszName = menuitemtext(this->name);
- this->menuhandle=(HANDLE)CallService( MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi );
-
- //menu aktualisieren ob hidden
- this->refreshMenuitem();
-}
-
-//entfernt menüpunkt
-void Xfire_game::remoteMenuitem()
-{
- if(menuhandle!=NULL)
- {
- CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )menuhandle, 0 );
- menuhandle=NULL;
- }
-}
-
-//aktualisiert menüpunkt ob hidden
-void Xfire_game::refreshMenuitem()
-{
- if(menuhandle!=NULL)
- {
- CLISTMENUITEM clmi = { 0 };
- clmi.cbSize = sizeof( clmi );
- clmi.flags = CMIM_FLAGS;
-
- if(this->notinstartmenu)
- clmi.flags|= CMIF_HIDDEN;
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )menuhandle, ( LPARAM )&clmi );
- }
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.h
deleted file mode 100644
index 0d502d121b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_game.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-/*
- Beinhaltet alle Funktionen und Informationen des Spiels
-*/
-
-#ifndef _XFIRE_GAME
-#define _XFIRE_GAME
-
-#include "Xfire_base.h"
-#include <vector>
-
-using namespace std;
-
-//externe funktion die das spielstarten steuern
-extern int StartGame(WPARAM wParam,LPARAM lParam,LPARAM fParam);
-
-class Xfire_game : public Xfire_base {
-public:
- //id des spiels
- unsigned int id;
- //handle des menuitems
- HANDLE menuhandle;
- //spiel soll bei der detection übersprungen werden
- BOOL skip;
- //voicehat?
- BOOL voicechat;
- //es soll kein icq und co status gesetzt werden
- BOOL noicqstatus;
- //handelt es sich um ein "custom" spiel
- BOOL custom;
- //soll ein spez. status gesetzt werden
- BOOL setstatusmsg;
- //iconhandle von miranda
- HANDLE iconhandl;
- //hicon vom icon des spiels
- HICON hicon;
- //dont show in startmenü
- BOOL notinstartmenu;
-
- //pfad des spiels wenn es laufen sollte
- char* path;
- //startparameter des spiels
- char* launchparams;
- //netzwerkparameter
- char* networkparams;
- //username parameter
- char* userparams;
- //passwort paramter
- char* pwparams;
- //mustcontain parameter
- char* mustcontain;
- //notcontain parameter
- char* notcontain;
- //spielname
- char* name;
- //extraparameter
- char* extraparams;
- //custom gamename
- char* customgamename;
- //custom statusmsg for xfire
- char* statusmsg;
-
- //mehrere pfade
- vector<char*> mpath;
-
- //zu sende gameid
- signed short send_gameid;
-
- //konstruktor
- Xfire_game() {
- //vars leer setzen
- path=NULL;
- launchparams=NULL;
- networkparams=NULL;
- userparams=NULL;
- pwparams=NULL;
- mustcontain=NULL;
- notcontain=NULL;
- name=NULL;
- menuhandle=NULL;
- iconhandl=NULL;
- hicon=NULL;
- extraparams=NULL;
- customgamename=NULL;
- statusmsg=NULL;
- id=skip=noicqstatus=custom=setstatusmsg=send_gameid=notinstartmenu=voicechat=0;
- }
- //dekonstruktor
- ~Xfire_game() {
- //entferne dyn arrays
- if(path)
- {
- delete[] path;
- path=NULL;
- }
- if(launchparams)
- {
- delete[] launchparams;
- launchparams=NULL;
- }
- if(networkparams)
- {
- delete[] networkparams;
- networkparams=NULL;
- }
- if(userparams)
- {
- delete[] userparams;
- userparams=NULL;
- }
- if(pwparams)
- {
- delete[] pwparams;
- pwparams=NULL;
- }
- if(mustcontain)
- {
- delete[] mustcontain;
- mustcontain=NULL;
- }
- if(notcontain)
- {
- delete[] notcontain;
- notcontain=NULL;
- }
- if(name)
- {
- delete[] name;
- name=NULL;
- }
- if(extraparams)
- {
- delete[] extraparams;
- extraparams=NULL;
- }
- if(customgamename)
- {
- delete[] customgamename;
- customgamename=NULL;
- }
- if(statusmsg)
- {
- delete[] statusmsg;
- statusmsg=NULL;
- }
-
- for(unsigned int i = 0 ; i < mpath.size() ; i ++) {
- if(mpath.at(i)!=NULL)
- delete mpath.at(i);
- }
- mpath.clear();
-
- remoteMenuitem();
- }
-
- //funktionen
- void readFromDB(unsigned dbid);
- void writeToDB(unsigned dbid);
- void createMenuitem(unsigned int pos,int dbid=-1);
- void refreshMenuitem();
- void remoteMenuitem();
- void setNameandIcon();
- void setIcon(HICON hicon,HANDLE handle);
- BOOL checkpath(PROCESSENTRY32* processInfo);
- BOOL start_game(char*ip=NULL,unsigned int port=0,char*pw=NULL);
- BOOL haveExtraGameArgs();
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.cpp
deleted file mode 100644
index a50d90747d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-#include "stdafx.h"
-
-#include "Xfire_gamelist.h"
-
-//liefert bestimmtes game zurück
-Xfire_game* Xfire_gamelist::getGame(unsigned int dbid)
-{
- if(dbid<gamelist.size())
- {
- return gamelist.at(dbid);
- }
- return NULL;
-}
-
-//liefert bestimmtes game zurück
-Xfire_game* Xfire_gamelist::getGamebyGameid(unsigned int gameid)
-{
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(i);
- if(game->id==gameid)
- return game;
- }
- return NULL;
-}
-
-void Xfire_gamelist::readGamelist(int anz) {
- //spiele einzeln einlesen
- for(int i=0;i<anz;i++)
- {
- //erzeuge gameobject
- Xfire_game* game=new Xfire_game();
-
- if(game) {
- //lese das spiel ein
- game->readFromDB(i);
- //icons laden
- Xfire_icon_cache icon=this->iconmngr.getGameIconEntry(game->id);
- game->setIcon(icon.hicon,icon.handle);
- //in die liste einfügen
- gamelist.push_back(game);
- }
- }
-}
-
-//setzt den ingamestatus
-void Xfire_gamelist::SetGameStatus(BOOL status)
-{
- ingame=status;
-}
-
-Xfire_gamelist::Xfire_gamelist()
-{
- nextgameid=0;
- ingame=FALSE;
- InitializeCriticalSection(&gamlistMutex);
-}
-
-//dekonstruktor
-Xfire_gamelist::~Xfire_gamelist() {
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(i);
- if(game) delete game;
- }
- gamelist.clear();
- DeleteCriticalSection(&gamlistMutex);
-}
-
-//hole das nächste game
-BOOL Xfire_gamelist::getnextGame(Xfire_game**currentgame)
-{
- //kein pointer dann false zurückliefern
- if(currentgame==NULL)
- return FALSE;
-
- //is die derzeitige id kleiner wie die anzahl an games, dann passendes game zurückliefern
- if(nextgameid<gamelist.size())
- {
- *currentgame=gamelist.at(nextgameid);
- nextgameid++;
-
- //muss das spiel geskippt werden, dann nochmal funktion aufrufen um das nächste game zubekommen
- if((*currentgame)->skip||(*currentgame)->id==32||(*currentgame)->id==33||(*currentgame)->id==34||(*currentgame)->id==35)
- {
- return getnextGame(currentgame);
- }
-
- return TRUE;
- }
- else
- {
- //liste durchgearbeitet, nextid wieder auf 0 setzen
- nextgameid=0;
- return FALSE;
- }
-}
-
-void Xfire_gamelist::Block(BOOL block)
-{
- if(block)
- EnterCriticalSection(&gamlistMutex);
- else
- LeaveCriticalSection(&gamlistMutex);
-}
-
-//fügt simple ein gameobject in den vector ein
-void Xfire_gamelist::Addgame(Xfire_game* newgame)
-{
- //spielicon auslesen
- Xfire_icon_cache icon=this->iconmngr.getGameIconEntry(newgame->id);
- newgame->setIcon(icon.hicon,icon.handle);
-
- gamelist.push_back(newgame);
-}
-
-//entfernt ein game aus der liste
-BOOL Xfire_gamelist::Removegame(int id)
-{
- std::vector<Xfire_game *>::iterator i = gamelist.begin();
- while( i != gamelist.end() ) {
- if((*i)->id == id) {
- (*i)->remoteMenuitem();
- gamelist.erase(i);
- return TRUE;
- }
- ++i;
- }
- return FALSE;
-}
-
-//setzt die aktuelle id als currentgame
-int Xfire_gamelist::CurrentGame()
-{
- this->SetGameStatus(TRUE);
- return nextgameid-1;
-}
-
-//erzeugt das menu der gameliste
-void Xfire_gamelist::createStartmenu()
-{
- //keine games in der internen liste? abbruch
- if(gamelist.size()==0)
- return;
-
- //sortierarray
- int* sorttemp=new int[gamelist.size()];
-
- //zuordnungen setzen
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++)
- sorttemp[i]=i;
-
- //sortiert mit bubblesortalgo
- BOOL changed=FALSE;
- do
- {
- changed=FALSE;
- for(unsigned int i = 1 ; i < gamelist.size() ; i ++)
- {
- Xfire_game* game=(Xfire_game*)gamelist.at(sorttemp[i-1]);
- Xfire_game* game2=(Xfire_game*)gamelist.at(sorttemp[i]);
- //sortieren
- if(strcmp(game->name,game2->name)>0)
- {
- int tempi=sorttemp[i-1];
- sorttemp[i-1]=sorttemp[i];
- sorttemp[i]=tempi;
- changed=TRUE;
- }
- }
- }
- while(changed);
-
- //menüpunkte anlegen
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(sorttemp[i]);
- game->createMenuitem(i,sorttemp[i]);
- }
-
- //entferne sortarray
- delete[] sorttemp;
-
- //dummymenu entfernen
- removeDummyMenuItem();
-}
-
-//schreibt derzeitige gameliste in die db
-void Xfire_gamelist::writeDatabase()
-{
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(i);
- if(game) game->writeToDB(i);
- }
-
- //anzahl aktualisieren
- DBWriteContactSettingWord(NULL, protocolname, "foundgames", gamelist.size());
-}
-
-//prüft ob ein game schon in der liste is
-BOOL Xfire_gamelist::Gameinlist(int id,int*dbid)
-{
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(i);
- if(game)
- {
- if(game->id==id)
- {
- //soll eine dbid zurückgeliefert werden? dann setzen
- if(dbid)
- *dbid=i;
-
- return TRUE;
- }
- }
- }
- return FALSE;
-}
-
-//gibt die anzahl der spiele zurück
-int Xfire_gamelist::countGames()
-{
- return gamelist.size();
-}
-
-//leert das startmenu
-void Xfire_gamelist::clearStartmenu()
-{
- //erstelle dummyeintrag, für workaround
- createDummyMenuItem();
-
- //einzelene menüpunkte entfernen
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(i);
- if(game) game->remoteMenuitem();
- }
-}
-
-//dekonstruktor
-void Xfire_gamelist::clearGamelist() {
- createDummyMenuItem();
- for(unsigned int i = 0 ; i < gamelist.size() ; i ++) {
- Xfire_game* game=(Xfire_game*)gamelist.at(i);
- if(game) delete game;
- }
- gamelist.clear();
-}
-
-//erstellt ein dummyeintrag
-void Xfire_gamelist::createDummyMenuItem()
-{
- CLISTMENUITEM midummy = { 0 };
- midummy.cbSize = sizeof( midummy );
- midummy.position = 500090001;
- midummy.pszName = Translate("Please wait ...");
- //midummy.flags = CMIF_GRAYED; geht nicht bei 0.8.1
- midummy.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- midummy.popupPosition = 500084000;
- midummy.pszPopupName = Translate("Start game");
- midummy.pszContactOwner=protocolname;
- dummymenuitem=(HANDLE)CallService( MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&midummy );
-}
-
-//entfernt dummymenueintrag
-void Xfire_gamelist::removeDummyMenuItem()
-{
- CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )dummymenuitem, 0 );
-}
-
-//säubert die datenbank spiel einträge udn trägt custom spiele vorher nach
-void Xfire_gamelist::clearDatabase(BOOL dontaddcustom)
-{
- BOOL somethingfound=TRUE;
- int i3=0;
-
- //db durchsuchen
- while(somethingfound) {
- somethingfound=FALSE;
- //customeintrag? dann ab in die gameliste damit
- if(this->readBytefromDB("gamecustom",i3)==1)
- {
- //customgame nur in die liste adden wenn es gewollt is
- if(!dontaddcustom)
- {
- //erzeuge gameobject
- Xfire_game* game=new Xfire_game();
- //lese das spiel ein
- game->readFromDB(i3);
- //spielicon auslesen
- /*Xfire_icon_cache icon=this->iconmngr.getGameIconEntry(game->id);
- game->setIcon(icon.hicon,icon.handle);
- //in die liste einfügen
- gamelist.push_back(game);*/
- this->Addgame(game);
- }
- }
-
- if(this->removeDBEntry("gamecustom",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gameid",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamepath",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamepwargs",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gameuserargs",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamecmdline",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamencmdline",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamelaunch",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamenetargs",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamemulti",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamesendid",i3)) somethingfound=TRUE;
- if(this->removeDBEntry("gamesetsmsg",i3)) somethingfound=TRUE;
-
- for(int i2=0;i2<10;i2++)
- if(this->removeDBEntry("gamepath",i3,i2)) somethingfound=TRUE;
- i3++;
- }
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.h
deleted file mode 100644
index 0f6c341a45..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_gamelist.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-/*
- Klasse soll die Gameliste verwalten. Dazu gehört das dynamische Einfügen/Löschen/Verändern von Games.
- Erstellen/Sortieren der Menüpunkte ...
-*/
-
-#ifndef _XFIRE_GAMELIST
-#define _XFIRE_GAMELIST
-
-#include "Xfire_game.h"
-#include "Xfire_icon_mng.h"
-#include <vector>
-
-using namespace std;
-
-class Xfire_gamelist : public Xfire_base {
-private:
- vector<Xfire_game*> gamelist;
- HANDLE dummymenuitem;
- unsigned int nextgameid;
- BOOL ingame;
- CRITICAL_SECTION gamlistMutex;
-
- void removeDummyMenuItem();
- void createDummyMenuItem();
-public:
- Xfire_icon_mng iconmngr;
-
- void readGamelist(int anz);
- void clearGamelist();
- void createStartmenu();
- void clearStartmenu();
- void clearDatabase(BOOL dontaddcustom=FALSE);
- void writeDatabase();
- BOOL Gameinlist(int id,int*dbid=NULL);
- void Addgame(Xfire_game* newgame);
- BOOL Xfire_gamelist::Removegame(int id);
- int countGames();
- ~Xfire_gamelist();
- Xfire_gamelist();
- BOOL getnextGame(Xfire_game**currentgame);
- BOOL Ingame(){return ingame;}
- void SetGameStatus(BOOL ingame);
- int CurrentGame();
- Xfire_game* getGame(unsigned int dbid);
- Xfire_game* getGamebyGameid(unsigned int gameid);
- void Block(BOOL block);
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.cpp
deleted file mode 100644
index f5612e8e56..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-#include "stdafx.h"
-#include "Xfire_icon_mng.h"
-
-//liefert den handle eines icons zurück
-HANDLE Xfire_icon_mng::getGameIconHandle(unsigned int gameid) {
- Xfire_icon_cache entry={0};
-
- //icon im cache dann zurückliefern
- if(getIconfromCache(gameid,&entry))
- return entry.handle;
-
- //ansonsten gameicon laden
- return this->LoadGameIcon(gameid).handle;
-}
-
-//liefert den index des icons zurück
-unsigned int Xfire_icon_mng::getGameIconId(unsigned int gameid) {
- for(unsigned int i=0;i<iconcache.size();i++)
- {
- if(iconcache.at(i).gameid==gameid)
- {
- return i;
- }
- }
- return -1;
-}
-
-//gameicon mit hilfe von id zurückliefern
-HICON Xfire_icon_mng::getGameIconFromId(unsigned int id) {
- //id nur im bereich zurückliefern
- if(id<0 || id>iconcache.size()-1)
- return NULL;
-
- return iconcache.at(id).hicon;
-}
-
-//liefert das hicon zurück
-HICON Xfire_icon_mng::getGameIcon(unsigned int gameid) {
- Xfire_icon_cache entry={0};
-
- //icon im cache dann zurückliefern
- if(getIconfromCache(gameid,&entry))
- return entry.hicon;
-
- return this->LoadGameIcon(gameid).hicon;
-}
-
-//liefert den icon eintrag zurück
-Xfire_icon_cache Xfire_icon_mng::getGameIconEntry(unsigned int gameid) {
- Xfire_icon_cache entry={0};
-
- //icon im cache dann zurückliefern
- if(getIconfromCache(gameid,&entry))
- return entry;
-
- return this->LoadGameIcon(gameid);
-}
-
-//sucht nach dem spielicon im cache
-BOOL Xfire_icon_mng::getIconfromCache(unsigned int gameid,Xfire_icon_cache* out) {
- //kein ziel, keine prüfung
- if(out==NULL)
- return FALSE;
-
- for(unsigned int i=0;i<iconcache.size();i++)
- {
- if(iconcache.at(i).gameid==gameid)
- {
- *out=iconcache.at(i);
- return TRUE;
- }
- }
-
- //nicht gefunden
- return FALSE;
-}
-
-//dekonstruktor
-Xfire_icon_mng::~Xfire_icon_mng() {
- //geladene icons wieder freigeben
- for(unsigned int i=0;i<iconcache.size();i++)
- {
- if(iconcache.at(i).hicon)
- {
- DestroyIcon(iconcache.at(i).hicon);
- iconcache.at(i).hicon=NULL;
- }
- }
- iconcache.clear();
-
- //Icons.dll wieder freigeben
- if(hIconDll) {
- FreeLibrary(hIconDll);
- hIconDll=NULL;
- }
-}
-
-//konstruktor
-Xfire_icon_mng::Xfire_icon_mng() {
- hIconDll=NULL;
-}
-
-//erzeugt aus HICON ein Handle, welches in Miranda in der Clist angewendet werden kann
-HANDLE Xfire_icon_mng::createIconHandle(HICON hicon) {
- if(!hicon)
- return NULL;
-
- return (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)hicon, 0);
-}
-
-//eigentliche laderoutine
-Xfire_icon_cache Xfire_icon_mng::LoadGameIcon(unsigned int gameid) {
- Xfire_icon_cache entry={0};
-
- //shortname
- char shortname[255]="";
-
- if(!getIniValue(gameid,"ShortName",shortname))
- return entry;
-
- //spielid zuweisen
- entry.gameid=gameid;
-
- //Icons.dll noch nicht geladen?!?
- if(!hIconDll)
- {
- //versuch die Icons.dll zuladen
- char path[MAX_PATH]="";
- if(!getIconPath(path))
- return entry;
- strcat_s(path,MAX_PATH,IconsdllName);
-
- hIconDll = LoadLibrary(path);
- }
-
- //dll konnte geladen werden
- if(hIconDll) {
- char resourcename[255]="";
- //kurznamen des spiels uppercasen und .ICO anhängen
- sprintf_s(resourcename,255,"XF_%s.ICO",shortname);
- Xfire_base::strtoupper(resourcename);
-
- //versuche die resource zufinden
- HRSRC hrsrc = FindResource(hIconDll,resourcename,"ICONS");
- if(hrsrc) {
- //aus der resource ein HICON erstellen
- int size=SizeofResource(hIconDll,hrsrc);
- //iconresource laden
- HGLOBAL hglobal=LoadResource(hIconDll,hrsrc);
- if(hglobal) {
- //lock
- LPVOID data=LockResource(hglobal);
- if(data) {
- //erzeuge ein handle für das icon und ab in den cache damit
- entry.hicon=this->createHICONfromdata(data,size);
- UnlockResource(hglobal);
- }
- FreeResource(hglobal);
- }
- }
- }
-
- //kein icon in der dll, dann aus dem internet laden
- if(!entry.hicon)
- entry.hicon=downloadIcon(shortname);
-
- //wenn ein hicon erzeugt wurde, dann handle erstellen und in den cache laden
- if(entry.hicon)
- entry.handle=this->createIconHandle(entry.hicon);
-
- //eintrag in den cache, selbst wenn kein icon geladen werden konnte
- this->iconcache.push_back(entry);
-
- return entry;
-}
-
-//icon vom xfire server laden
-HICON Xfire_icon_mng::downloadIcon(char* shortname) {
- //nur vom internetladen, wenn die option aktiv ist
- if(!DBGetContactSettingByte(NULL,protocolname,"xfiresitegameico",0))
- return NULL;
-
- //keinen namen angegeben?
- if(!shortname)
- return NULL;
-
- //buffer
- char*buf=NULL;
- unsigned int size=0;
-
- char url[255]="http://media.xfire.com/xfire/xf/images/icons/";
- strcat_s(url,255,shortname);
- strcat_s(url,255,".gif");
-
- //verscuhe das icon aus dem inet zulasen
- if(GetWWWContent2(url,NULL,FALSE,&buf,&size))
- {
- //aus dem buffer ein hicon erzeugen
- HICON hicon=this->createHICONfromdata(buf,size);
- //speicher freigeben
- delete[] buf;
-
- return hicon;
- }
-
- return NULL;
-}
-
-//setzt alle handles der icons neu
-int Xfire_icon_mng::resetIconHandles() {
- for(unsigned int i=0;i<iconcache.size();i++)
- {
- iconcache.at(i).handle=this->createIconHandle(iconcache.at(i).hicon);
- }
- return 0;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.h
deleted file mode 100644
index 895d18ba91..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_icon_mng.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2009 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//Klasse behandelt alle Iconsachen unter Xfire
-
-#ifndef _XFIRE_ICON_MNG
-#define _XFIRE_ICON_MNG
-
-#include "Xfire_base.h"
-#include <vector>
-
-const char IconsdllName[]="Icons.dll";
-
-#pragma comment(lib,"ole32.lib")
-
-using namespace std;
-
-//eintrag eines icons
-struct Xfire_icon_cache {
- unsigned int gameid;
- HANDLE handle;
- HICON hicon;
-};
-
-//icon loader, cache manager
-class Xfire_icon_mng : public Xfire_base {
-private:
- vector<Xfire_icon_cache> iconcache;
- BOOL getIconfromCache(unsigned int gameid,Xfire_icon_cache* out);
- Xfire_icon_cache LoadGameIcon(unsigned int gameid);
- HANDLE createIconHandle(HICON hicon);
- HICON downloadIcon(char* shortname);
-
- HINSTANCE hIconDll;
-public:
- HANDLE getGameIconHandle(unsigned int gameid);
- HICON getGameIcon(unsigned int gameid);
- unsigned int getGameIconId(unsigned int gameid);
- HICON getGameIconFromId(unsigned int gameid);
- Xfire_icon_cache getGameIconEntry(unsigned int gameid);
- int resetIconHandles();
-
- Xfire_icon_mng();
- ~Xfire_icon_mng();
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.cpp
deleted file mode 100644
index 641c481097..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#include "stdafx.h"
-
-#include "Xfire_proxy.h"
-
-extern HANDLE hNetlib;
-HANDLE hBindPort=NULL;
-HANDLE netlibcon=NULL;
-
-
-void FromServerToClient(LPVOID lParam) {
- char buf[1024]={0};
-
- HANDLE hConnection=(HANDLE)lParam;
- do {
- if(!hBindPort) return;
-
- int cbRead = Netlib_Recv(netlibcon, buf, sizeof(buf), 0);
- if( cbRead == SOCKET_ERROR)
- break;
-
- if(cbRead) {
- Netlib_Send(hConnection, buf, cbRead, 0);
- }
- }
- while(1);
-}
-
-//xfireclient baut verbindung auf
-void XfireclientConnecting(HANDLE hConnection, DWORD, void* extra )
-{
- char buf[1024]={0};
-
- //verbindung zum richtigen xfire server aufbauen
- NETLIBOPENCONNECTION ncon = { 0 };
- ncon.cbSize = sizeof(ncon);
- ncon.szHost = "206.220.42.147";
- ncon.wPort = (WORD)atol("25999");
- ncon.timeout=5;
- netlibcon = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) hNetlib, (LPARAM) & ncon);
-
- if(!netlibcon) {
- Netlib_CloseHandle(hConnection);
- }
-
- mir_forkthread(FromServerToClient,(LPVOID)hConnection);
-
- //schleife behandelt empfangende daten
- do {
- int cbRead = Netlib_Recv(hConnection, buf, sizeof(buf), 0);
- if( cbRead == SOCKET_ERROR)
- {
- Netlib_CloseHandle(hConnection);
- Netlib_CloseHandle(netlibcon);
- break;
- }
-
- if(cbRead) {
- if(!Netlib_Send(netlibcon, buf, cbRead, 0))
- {
- Netlib_CloseHandle(hConnection);
- Netlib_CloseHandle(netlibcon);
- break;
- }
- }
- }
- while(1);
-}
-
-//inits nachdem alle module geladen wurden
-int AfterSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
-{
- //init netlib handle
- NETLIBUSER nlu = {0};
- nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_INCOMING;
- nlu.szSettingsModule = protocolname;
- nlu.szDescriptiveName = "XFire server connection";
- hNetlib = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) & nlu);
-
- //init socet server
- NETLIBBIND nb = {0};
- nb.cbSize = NETLIBBIND_SIZEOF_V2;
- nb.pfnNewConnectionV2 = XfireclientConnecting;
- nb.pExtra = NULL;
- nb.wPort = 25999;
- hBindPort = (HANDLE)CallService( MS_NETLIB_BINDPORT, (WPARAM)hNetlib,(LPARAM) &nb);
-
-
- return 0;
-}
-
-int initXfireProxy() {
- //inits nach dem alle module geladen wurden
- HookEvent(ME_SYSTEM_MODULESLOADED, AfterSystemModulesLoaded);
- return 0;
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.h
deleted file mode 100644
index 3623d969dc..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_proxy.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _XFIRE_PROXY
-#define _XFIRE_PROXY
-
-#include "baseProtocol.h"
-
-int initXfireProxy();
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.cpp b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.cpp
deleted file mode 100644
index ccca22b1a8..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.cpp
+++ /dev/null
@@ -1,380 +0,0 @@
-#include "stdafx.h"
-#include "Xfire_voicechat.h"
-
-//konstruktor
-Xfire_voicechat::Xfire_voicechat() {
- this->resetCurrentvoicestatus();
- ipport=NULL;
- tsrDLL=NULL;
- IpHlpApiDLL=NULL;
- tsrGetServerInfo=NULL;
- GetExtendedTcpTable=NULL;
- pid=0;
-}
-
-//dekonstruktor
-Xfire_voicechat::~Xfire_voicechat() {
- //geladene tsr remote dll freigeben
- if(tsrDLL) {
- FreeLibrary(tsrDLL);
- tsrDLL=NULL;
- }
- //geladene iphlper freigeben
- if(IpHlpApiDLL) {
- FreeLibrary(IpHlpApiDLL);
- IpHlpApiDLL=NULL;
- }
-}
-
-//init
-void Xfire_voicechat::initVoicechat() {
- //tsremotedll laden
- tsrDLL=this->loadTSR();
- //weitere dll's laden
- IpHlpApiDLL=LoadLibraryA("IpHlpApi.dll");
- if(IpHlpApiDLL) {
- GetExtendedTcpTable=(pGetExtendedTcpTable)GetProcAddress(IpHlpApiDLL,"GetExtendedTcpTable");
- }
- else
- {
- XFireLog("IpHlpApi.dll load failed!");
- }
-}
-
-//prüft ob das paket schonmal versendet wurde, soll unnötigen nwtraffic reduzieren, *ÜBERLEGUNG* ob wirklich notwendig
-BOOL Xfire_voicechat::alreadySend(SendGameStatus2Packet* packet) {
- if(packet==NULL)
- return FALSE;
-
- if(packet->ip[3] != lastpacket.ip[3] ||
- packet->ip[2] != lastpacket.ip[2] ||
- packet->ip[1] != lastpacket.ip[1] ||
- packet->ip[0] != lastpacket.ip[0] ||
- packet->port != lastpacket.port) {
- lastpacket=*packet;
- return TRUE;
- }
-
- return FALSE;
-}
-
-//prüft nach laufenden voicechat anwendungen
-BOOL Xfire_voicechat::checkVoicechat(SendGameStatus2Packet* packet) {
- //kein gültiger verweis?
- if(packet==NULL)
- return FALSE;
- //jeh nach letzten status handeln
- switch(currentvoice) {
- case XFIREVOICECHAT_TS2:
- if(checkforTS2(packet)) {
- return alreadySend(packet);
- }
- else
- {
- //kein ts2 mehr? dann paket restten
- resetSendGameStatus2Packet(packet);
- resetCurrentvoicestatus();
- //in db schreiben
- writeToDatabase(packet);
- return TRUE;
- }
- break;
- case XFIREVOICECHAT_TS3:
- if(checkforTS3(packet)) {
- return alreadySend(packet);
- }
- else
- {
- //kein ts3 mehr? dann paket restten
- resetSendGameStatus2Packet(packet);
- resetCurrentvoicestatus();
- //in db schreiben
- writeToDatabase(packet);
- return TRUE;
- }
- break;
- case XFIREVOICECHAT_MUMBLE:
- if(checkforMumble(packet)) {
- return alreadySend(packet);
- }
- else
- {
- //kein mumble mehr? dann paket restten
- resetSendGameStatus2Packet(packet);
- resetCurrentvoicestatus();
- //in db schreiben
- writeToDatabase(packet);
- return TRUE;
- }
- break;
- default:
- //prüfe nach ts3
- if(checkforTS3(packet)) {
- return alreadySend(packet);
- }
- //prüfe nach ts2
- else if(checkforTS2(packet)) {
- return alreadySend(packet);
- }
- //prüfe nach mumble
- else if(checkforMumble(packet)) {
- return alreadySend(packet);
- }
- break;
- };
-
- return FALSE;
-}
-
-//setzte currentvoice auf 0 zurück, falls es einen disconnect gab
-void Xfire_voicechat::resetCurrentvoicestatus() {
- currentvoice=XFIREVOICECHAT_NOVOICE;
- lastpacket.ip[3]=0;
- lastpacket.ip[2]=0;
- lastpacket.ip[1]=0;
- lastpacket.ip[0]=0;
- lastpacket.port=0;
- pid=0;
-}
-
-//resettet das packet auf 0
-void Xfire_voicechat::resetSendGameStatus2Packet(SendGameStatus2Packet* packet) {
- if(packet==NULL)
- return;
- //voiceid
- packet->gameid=XFIREVOICECHAT_NOVOICE;
- //ip zuweisen
- packet->ip[3]=0;
- packet->ip[2]=0;
- packet->ip[1]=0;
- packet->ip[0]=0;
- //port zuweisen
- packet->port=0;
-}
-
-//schreibt derzetigen status in die mirandadb für variables usw
-void Xfire_voicechat::writeToDatabase(SendGameStatus2Packet* packet) {
- //für sprintf
- char temp[32]="";
-
- if(packet==NULL || packet->gameid==XFIREVOICECHAT_NOVOICE) {
- //einträge aus der db entfernen
- DBDeleteContactSetting(NULL,protocolname, "VServerIP");
- DBDeleteContactSetting(NULL,protocolname, "currentvoicename");
- //zurück
- return;
- }
- //ip speichern
- sprintf_s(temp,32,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
- DBWriteContactSettingTString(NULL, protocolname, "VServerIP", temp);
- //namen jeh nach id schreiben
- switch(packet->gameid) {
- case XFIREVOICECHAT_TS3:
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Teamspeak 3");
- break;
- case XFIREVOICECHAT_TS2:
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Teamspeak 2");
- break;
- case XFIREVOICECHAT_MUMBLE:
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Mumble");
- break;
- case XFIREVOICECHAT_VENTRILO:
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Ventrilo");
- break;
- };
-}
-
-//versucht die TSR zuladen
-HMODULE Xfire_voicechat::loadTSR(char* path,BOOL nolocaltest) {
- char pathtotsr[MAX_PATH]="";
-
- /*if(path)
- ; was tun*/
- strcat_s(pathtotsr,MAX_PATH,"TSRemote.dll");
-
- //versuche dll zuladen
- HMODULE tsrDLL = LoadLibrary(pathtotsr);
- //konnte nicht geladen werden
- if(!tsrDLL)
- {
- XFireLog("TSRemote.dll load failed!");
-
- //bei keinem lokalen test abbruch
- if(nolocaltest) return NULL;
-
- //nochmal engl. lokal versuchen
- tsrDLL = LoadLibrary("C:\\Program Files\\Teamspeak2_RC2\\client_sdk\\TSRemote.dll");
-
- if(!tsrDLL) {
- XFireLog("TSRemote.dll load faild (using standard installationpath)!");
-
- //deutsches sys?
- tsrDLL = LoadLibrary("C:\\Programme\\Teamspeak2_RC2\\client_sdk\\TSRemote.dll");
-
- if(!tsrDLL)
- XFireLog("TSRemote.dll load failed (using standard installationpath2)!");
-
- //aufgeben
- return NULL;
- }
- }
-
- XFireLog("TSRemote.dll successfully loaded!");
-
- //getserverinfo funktion holen
- tsrGetServerInfo = (LPtsrGetServerInfo)GetProcAddress(tsrDLL,"tsrGetServerInfo");
-
- return tsrDLL;
-}
-
-
-//teamspeak 3 detection, benötigt ts3plugin
-BOOL Xfire_voicechat::checkforTS3(SendGameStatus2Packet* packet) {
- ts3IPPORT* ipport=NULL;
- //kein gültiger verweis?
- if(packet==NULL)
- return FALSE;
- //existiert ein filemap?
- HANDLE hMapObject = OpenFileMappingA(FILE_MAP_READ, FALSE, "$ts3info4xfire$");
- //nicht gefunden, dann kein ts3
- if (hMapObject == NULL)
- return FALSE;
- //versuch ipport zubesorgen
- ipport = (ts3IPPORT *) MapViewOfFile(hMapObject, FILE_MAP_READ, 0, 0, sizeof(ts3IPPORT));
- //fehler beim zugriff auf filemap?
- if(ipport==NULL)
- {
- CloseHandle(hMapObject);
- return FALSE;
- }
-
- //wenn kein port, dann stimmt was mit der ip nicht, paket resetten
- if(ipport->port==0) {
- //packet resetten
- resetSendGameStatus2Packet(packet);
- //in db schreiben
- writeToDatabase(packet);
- return TRUE;
- }
-
- //voiceid zuweisen
- this->currentvoice=XFIREVOICECHAT_TS3;
- packet->gameid=XFIREVOICECHAT_TS3;
- //ip zuweisen
- packet->ip[3]=ipport->ip[3];
- packet->ip[2]=ipport->ip[2];
- packet->ip[1]=ipport->ip[1];
- packet->ip[0]=ipport->ip[0];
- //port zuweisen
- packet->port=ipport->port;
- //unmap, handle schließem
- UnmapViewOfFile(ipport);
- CloseHandle(hMapObject);
- //in db schreiben
- writeToDatabase(packet);
- //ts3 gefunden
- return TRUE;
-}
-
-//teamspeak 2 detection mit hilfe der tsr
-BOOL Xfire_voicechat::checkforTS2(SendGameStatus2Packet* packet) {
- TtsrServerInfo serverinfo={0};
-
- //get funktion ist nicht initialisiert
- if(this->tsrGetServerInfo==NULL || packet==NULL)
- {
- return FALSE;
- }
-
- //infos holen
- this->tsrGetServerInfo(&serverinfo);
-
- //auswerten wenn serverip gesetzt
- if(serverinfo.ServerIp[0]!=0)
- {
- char * pos=strrchr(serverinfo.ServerIp,':');
- if(pos==0)
- {
- return FALSE;
- }
-
- *pos=0;
- unsigned int ip=inet_addr(serverinfo.ServerIp);
- pos++;
- int port=atoi(pos);
-
- //port zuweisen
- packet->port=port;
- //ip zuweisen
- packet->ip[3]=LOBYTE(LOWORD(ip));
- packet->ip[2]=HIBYTE(LOWORD(ip));
- packet->ip[1]=LOBYTE(HIWORD(ip));
- packet->ip[0]=HIBYTE(HIWORD(ip));
- //gameid/voice zuweisen
- packet->gameid=XFIREVOICECHAT_TS2;
- this->currentvoice=XFIREVOICECHAT_TS2;
- //ab in die db
- writeToDatabase(packet);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-//detection für mumble
-BOOL Xfire_voicechat::checkforMumble(SendGameStatus2Packet* packet) {
- //kein gültiger verweis?
- if(packet==NULL)
- return FALSE;
-
- //gültige pid
- if(this->pid!=0 && !this->isValidPid(this->pid))
- {
- this->pid=0;
- return FALSE;
- }
- else {
- if(!this->getPidByProcessName("mumble.exe",&this->pid)) {
- return FALSE;
- }
- }
-
- DWORD size=0;
- MIB_TCPTABLE_OWNER_PID* ptab=NULL;
- //tcptabelle holen
- this->GetExtendedTcpTable(NULL,&size,FALSE, AF_INET, TCP_TABLE_OWNER_PID_CONNECTIONS, 0);
- //überhaupt was drin?
- if(size) {
- ptab=(MIB_TCPTABLE_OWNER_PID*)malloc(size);
- //liste auslesen
- if(GetExtendedTcpTable(ptab,&size,FALSE, AF_INET, TCP_TABLE_OWNER_PID_CONNECTIONS, 0)==NO_ERROR)
- {
- for(unsigned int i=0;i<ptab->dwNumEntries;i++)
- {
- if(ptab->table[i].dwOwningPid==this->pid && ptab->table[i].dwLocalAddr!=ptab->table[i].dwRemoteAddr) //verbindung gefunden, hoffentlich
- {
- unsigned char*rip=(unsigned char*)&ptab->table[i].dwRemoteAddr;
- XFireLog("IP %x,%x",ptab->table[i].dwRemoteAddr,ptab->table[i].dwRemotePort);
- //ipzuweisen
- packet->ip[3]=rip[0];
- packet->ip[2]=rip[1];
- packet->ip[1]=rip[2];
- packet->ip[0]=rip[3];
- //portzuweisen
- packet->port=r(ptab->table[i].dwRemotePort);
- //mumble
- packet->gameid=XFIREVOICECHAT_MUMBLE;
- this->currentvoice=XFIREVOICECHAT_MUMBLE;
- //table wieder freigeben
- delete ptab;
- //mumble läuft + ip gefunden also TRUE
- return TRUE;
- }
- }
- }
- delete ptab;
- }
-
- return FALSE;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.h b/plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.h
deleted file mode 100644
index 1b70f3f456..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/Xfire_voicechat.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2009 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//Klasse behandelt alle Iconsachen unter Xfire
-
-#include "stdafx.h"
-
-#ifndef _XFIRE_VOICECHAT
-#define _XFIRE_VOICECHAT
-
-#include "client.h"
-#include "sendgamestatus2packet.h"
-#include "Xfire_base.h"
-
-#include <vector>
-
-/* tsr definitionen für teamspeak 2 */
-struct TtsrServerInfo
-{
- char ServerName[30];
- char WelcomeMessage[256];
- int ServerVMajor;
- int ServerVMinor;
- int ServerVRelease;
- int ServerVBuild;
- char ServerPlatform[28]; //geändert in 28 - dufte
- char ServerIp[30];
- char ServerHost[102];
- int ServerType;
- int ServerMaxUsers;
- int SupportedCodecs;
- int ChannelCount;
- int PlayerCount;
-};
-
-typedef int (__stdcall *LPtsrGetServerInfo)(TtsrServerInfo *tsrServerInfo);
-
-/* klassen definitionen */
-struct ts3IPPORT {
- unsigned char ip[4];
- unsigned short port;
-};
-
-enum XFIREVOICECHATTYPE {
- XFIREVOICECHAT_NOVOICE,
- XFIREVOICECHAT_TS3=35,
- XFIREVOICECHAT_TS2=32,
- XFIREVOICECHAT_MUMBLE=34,
- XFIREVOICECHAT_VENTRILO=33,
- XFIREVOICECHAT_IPDETECT=999
-};
-
-using namespace xfirelib;
-
-class Xfire_voicechat : public Xfire_base {
-private:
- //interner status, des aktiven voicechats
- XFIREVOICECHATTYPE currentvoice;
- //ipportport structur für ts3
- ts3IPPORT* ipport;
- //statuspacket caching
- SendGameStatus2Packet lastpacket;
- //tsremotedll
- HMODULE tsrDLL;
- //tsrGetServerInfo funktion vom tsremotedll
- LPtsrGetServerInfo tsrGetServerInfo;
- //GetExtendedTcpTable für mumble
- pGetExtendedTcpTable GetExtendedTcpTable;
- //pid für mumble
- DWORD pid;
- //IpHlperApi Module
- HMODULE IpHlpApiDLL;
-public:
- Xfire_voicechat();
- ~Xfire_voicechat();
-
- void initVoicechat();
- void resetSendGameStatus2Packet(SendGameStatus2Packet* packet);
- void resetCurrentvoicestatus();
- void writeToDatabase(SendGameStatus2Packet* packet);
- HMODULE loadTSR(char* path=NULL,BOOL nolocaltest=FALSE);
- BOOL checkVoicechat(SendGameStatus2Packet* packet);
- BOOL alreadySend(SendGameStatus2Packet* packet);
-
- //prüf routinen
- BOOL checkforTS3(SendGameStatus2Packet* packet);
- BOOL checkforTS2(SendGameStatus2Packet* packet);
- BOOL checkforMumble(SendGameStatus2Packet* packet);
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.cpp b/plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.cpp
deleted file mode 100644
index 4576157250..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.cpp
+++ /dev/null
@@ -1,867 +0,0 @@
-#include "stdafx.h"
-
-#include "addgamedialog.h"
-
-extern HANDLE XFireWorkingFolder;
-extern Xfire_gamelist xgamelist;
-
-char inipath[MAX_PATH];
-char* buffer=NULL;
-BOOL dontClose=FALSE;
-
-vector<lbInicache> Inicache;
-Xfire_game* editgame=NULL;
-
-HWND hwndTab,hPage;
-
-void AddGameDialog(HWND hwndDlg,Xfire_game* game) {
- //übergebendes game, dem editgame zuordnen, damit wechselt es in den editmodus
- editgame=game;
- if(DialogBox(hinstance,MAKEINTRESOURCE(IDD_ADDGAMEMAIN),hwndDlg,DlgAddGameProcMain)) {
- }
- //wieder auf NULL setzen
- editgame=NULL;
-}
-
-static void FillGameList( LPVOID hwndDlg ) {
- //liste.,suche und suchlabel unsichtbar machen
- ShowWindow(GetDlgItem((HWND)hwndDlg,IDC_GAMELIST),SW_HIDE);
- ShowWindow(GetDlgItem((HWND)hwndDlg,IDC_SEARCH),SW_HIDE);
- ShowWindow(GetDlgItem((HWND)hwndDlg,IDC_STC14),SW_HIDE);
-
- //handle von progressbar holen
- HWND hwndPB=GetDlgItem((HWND)hwndDlg,IDC_PROGRESS);
-
- //das schließen des dialogs verhindern
- dontClose=TRUE;
-
- if(Inicache.size()==0)
- {
- //temp xfirebaseob für strlower
- Xfire_base tempxfire;
- //vector für doppelfilter
- vector<DWORD> dublBuffer;
- //Cache ist leer, Cache füllen
- FoldersGetCustomPath( XFireWorkingFolder, inipath, 1024, 'W' );
- strcat_s(inipath,MAX_PATH,"\\");
- strcat_s(inipath,MAX_PATH,"xfire_games.ini");
-
- //ini soll in den RAM geladen werden, fürs schnellere ausparsen
- FILE* f=fopen(inipath,"rb");
- //wenn ini nicht aufrufbar, abbrechen
- if(f==NULL)
- return;
- //ans ende der datei springen
- fseek(f,0,SEEK_END);
- //aktuelle position im filepoitner als größe zwischenspeichern
- int size=ftell(f);
- //buffer anelgen
- buffer=new char[size+1];
- //wenn nicht genug ram, abbruch
- if(buffer==NULL)
- return;
- //buffer nullen
- memset(buffer,0,size+1);
- //zum anfang springen
- fseek(f,0,SEEK_SET);
- //ini komplett in den ram lesen
- fread(buffer,size,1,f);
- //datei schließen
- fclose(f);
-
- //parse einzelne sections aus
-
- //pointer vom buffer
- char*p=buffer;
- //zahlenbufer1 und pointer
- char zahlbuffer[10]="";
- char*z=zahlbuffer;
- //zahlenbuffer2 uznd pointer
- char zahlbuffer2[10]="";
- char*z2=zahlbuffer2;
-
- //progressbar auf bytegröße anpassen
- SendMessage(hwndPB, PBM_SETRANGE32, 0,size);
-
- //solange bis wir bei 0 angekommen sind
- if(*p!=0)
- p++;
- while(*p!=0)
- {
- if(*p=='['&&*(p-1)=='\n')
- {
- z=zahlbuffer;
- z2=zahlbuffer2;
- p++;
- while(*p>='0'&&*p<='9'&&p!=0)
- {
- *z=*p;
- p++;
- z++;
- }
- *z=0;
- if(*p=='_') {
- p++;
- while(*p>='0'&&*p<='9'&&p!=0)
- {
- *z2=*p;
- p++;
- z2++;
- }
- *z2=0;
- }
-
- //erste zahl gefunden
- if(z!=zahlbuffer)
- {
- int gameid=atoi(zahlbuffer);
- //prüfe ob das game schon in der gameliste ist
- if(!xgamelist.Gameinlist(gameid))
- {
- char*name=p;
- lbInicache listentry;
- char gameidtemp[10]="";
- char ret[512];
- DWORD uniqid=0;
- BYTE accLaunch=0;
- BYTE accDetect=0;
-
- //bis zum nächsten isgleich springen
- while(*name!='=')
- name++;
- name++;
-
- //jetzt den umbruch suchen
- p=name;
- while(*p!='\n'&&*p!='\r') p++;
- *p=0;
- p++;
-
- //spielnamen in den listentry einfügen
- strcpy_s(listentry.name,255,name);
-
- if(z2!=zahlbuffer2)
- {
- listentry.gameid=MAKELONG(gameid,atoi(zahlbuffer2));
- sprintf_s(gameidtemp,10,"%d_%d",gameid,atoi(zahlbuffer2));
- }
- else
- {
- listentry.gameid=gameid;
- sprintf_s(gameidtemp,10,"%d",gameid);
- }
-
-
- if(xfire_GetPrivateProfileString(gameidtemp, "LauncherExe", "", ret, 512, inipath)) {
- //lower launchstring
- tempxfire.strtolower(ret);
- //einzelnen ziechen zusammenrechnen
- if(z2!=zahlbuffer2)
- {
- //wenn pfad, dann exe vorher rausziehen
- if(strrchr(ret,'\\'))
- accLaunch=tempxfire.accStringByte(strrchr(ret,'\\'));
- else
- accLaunch=tempxfire.accStringByte(ret);
- }
- //Steam.exe als launcher?
- if((ret[0]=='s')&&
- ret[1]=='t'&&
- ret[2]=='e'&&
- ret[3]=='a'&&
- ret[4]=='m'&&
- ret[5]=='.'&&
- ret[6]=='e'&&
- ret[7]=='x'&&
- ret[8]=='e')
- {
- strcat_s(listentry.name,255," (Steam)");
- }
- }
-
- if(z2!=zahlbuffer2) {
- if(xfire_GetPrivateProfileString(gameidtemp, "DetectExe", "", ret, 512, inipath)) {
- //lower launchstring
- tempxfire.strtolower(ret);
- //einzelnen ziechen zusammenrechnen
- //wenn pfad, dann exe vorher rausziehen
- if(strrchr(ret,'\\'))
- accDetect=tempxfire.accStringByte(strrchr(ret,'\\'));
- else
- accDetect=tempxfire.accStringByte(ret);
- }
- }
-
- //standardmäßig TRUE
- BOOL addtolist=TRUE;
-
- //schon ein eintrag vorhanden?
- if(z2!=zahlbuffer2) {
- //uniq id zusammen bauen aus spielid sowie zusammengerechneten launchstring und detectstring
- uniqid=MAKELONG(gameid,MAKEWORD(accLaunch,accDetect));
- for(uint i = 0 ; i < dublBuffer.size() ; i ++) {
- if(dublBuffer.at(i)==uniqid)
- {
- addtolist=FALSE;
- break;
- }
- }
- }
-
- //nur eintragen, wenn kein doppelter gefunden wurde
- if(addtolist) {
- //eintrag einfügen
- int idx=SendDlgItemMessage( (HWND)hwndDlg, IDC_GAMELIST, LB_ADDSTRING, 0, (LPARAM)listentry.name);
- SendDlgItemMessage( (HWND)hwndDlg, IDC_GAMELIST, LB_SETITEMDATA, idx, listentry.gameid);
- //eintrag in den buffer für die dublikateprüfung
- dublBuffer.push_back(uniqid);
- //und eintrag in den cache
- Inicache.push_back(listentry);
- SendMessage(hwndPB, PBM_SETPOS, (WPARAM)(p-buffer), 0);
- }
- }
- }
- }
- else
- p++;
- }
- }
- else
- {
- //liste mit dem cache aufbauen
- for(uint i = 0 ; i < Inicache.size() ; i ++) {
- //spielid in der liste spielliste?
- if(!xgamelist.Gameinlist(LOWORD(Inicache.at(i).gameid)))
- {
- //eintrag in die listeeinfügen
- int idx=SendDlgItemMessage( (HWND)hwndDlg, IDC_GAMELIST, LB_ADDSTRING, 0, (LPARAM)Inicache.at(i).name);
- //gameid zuweisen
- SendDlgItemMessage( (HWND)hwndDlg, IDC_GAMELIST, LB_SETITEMDATA, idx, Inicache.at(i).gameid);
- }
- }
- }
-
- //progressbar unsichtbar
- ShowWindow(hwndPB,SW_HIDE);
- //liste sichtbar machen
- ShowWindow(GetDlgItem((HWND)hwndDlg,IDC_GAMELIST),SW_SHOW);
- //suche und suchlabel sichtbar machen
- ShowWindow(GetDlgItem((HWND)hwndDlg,IDC_SEARCH),SW_SHOW);
- ShowWindow(GetDlgItem((HWND)hwndDlg,IDC_STC14),SW_SHOW);
-
- dontClose=FALSE;
-}
-
-BOOL OpenFileDialog(HWND hwndDlg,OPENFILENAME*ofn,char*exe) {
- //pointer zum exenamen
- char* exename=NULL;
- //buffer vom pfad
- static char szFile[260]=""; //static damit noch nach dem aufruf lesbar bleibt
- //buffer vom filter
- char szFilter[260]="";
- //backslash suchen
- exename=strrchr(exe,'\\')+1;
- //kein backslash dann normal ret als exenamen verwenden
- if((int)exename==1) exename=exe;
- //filterstring aufbauen
- sprintf(szFilter,"%s|%s|%s|*.*|",exename,exename,Translate("All Files"));
- //umbruch in 0 wandeln
- unsigned int sizeFilter=strlen(szFilter);
- for(unsigned int i=0;i<sizeFilter;i++)
- if(szFilter[i]=='|') szFilter[i]=0;
- //openfiledia vorbereiten
- ZeroMemory(ofn, sizeof(OPENFILENAME));
- ofn->lStructSize = sizeof(OPENFILENAME);
- ofn->hwndOwner = hwndDlg;
- ofn->lpstrFile = szFile;
- ofn->nMaxFile = sizeof(szFile);
- ofn->lpstrFilter = szFilter;
- ofn->nFilterIndex = 1;
- ofn->lpstrFileTitle = exe;
- ofn->nMaxFileTitle = 0;
- ofn->lpstrInitialDir = NULL;
- ofn->Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
-
- return GetOpenFileName(ofn);
-}
-
-INT_PTR CALLBACK DlgAddGameProc (HWND hwndDlg,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam
-)
-{
- switch (uMsg) {
- case WM_INITDIALOG:
- {
- //übersetzen lassen
- TranslateDialogDefault(hwndDlg);
-
-
- //per thread liste füllen
- mir_forkthread(FillGameList,hwndDlg);
- }
- break;
- case WM_COMMAND:
- if(LOWORD(wParam) == IDC_SEARCH && HIWORD(wParam)==EN_CHANGE)
- {
- char temp[256];
- //eingabe bei der suche auslesen
- GetDlgItemText(hwndDlg,IDC_SEARCH,temp,256);
- //eingabe in der liste suchen
- int idx=SendDlgItemMessage(hwndDlg, IDC_GAMELIST, LB_FINDSTRING, 0, (LPARAM)temp);
- //gefunden?
- if(idx!=LB_ERR)
- {
- //als aktiv setzen
- SendDlgItemMessage(hwndDlg, IDC_GAMELIST,LB_SETCURSEL,idx,0);
- }
- }
- else if(LOWORD(wParam) == IDCANCEL)
- {
- //nicht schließen, wenn noch der thread läuft
- if(dontClose) {
- MessageBoxA(hwndDlg, Translate("Please wait, gameini will be currently parsed ..."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- return FALSE;
- }
- return SendMessage(GetParent(hwndDlg),WM_CLOSE,0,0);
- }
- else if(LOWORD(wParam) == IDC_CUSTOM)
- {
- int idx=SendDlgItemMessage(hwndDlg, IDC_GAMELIST, LB_GETCURSEL, 0, 0);
- //es wurde was ausgewählt?
- if(idx==LB_ERR) {
- MessageBoxA(hwndDlg,Translate("Please choose one game in the list!"),Translate("XFire Options"),MB_OK|MB_ICONEXCLAMATION);
- }
- else
- {
- char ret[512]="";
- char gameidtemp[10]="";
-
- int gameids=SendDlgItemMessage( (HWND)hwndDlg, IDC_GAMELIST, LB_GETITEMDATA, idx, 0);
- //gameid splitten
- int gameid1=LOWORD(gameids);
- int gameid2=HIWORD(gameids);
-
- if(gameid2!=0)
- sprintf_s(gameidtemp,10,"%d_%d",gameid1,gameid2);
- else
- sprintf_s(gameidtemp,10,"%d",gameid1);
-
- //spielnamen holen
- if(xfire_GetPrivateProfileString(gameidtemp, "LongName", "", ret, 512, inipath)) {
- sprintf_s(gameidtemp,10,"%d",gameid1);
-
- //einige felder vorbelegen
- SetDlgItemText(hPage,IDC_ADD_NAME,ret);
- SetDlgItemText(hPage,IDC_ADD_DETECTEXE,"");
- SetDlgItemText(hPage,IDC_ADD_LAUNCHEREXE,"");
- SetDlgItemText(hPage,IDC_ADD_ID,gameidtemp);
- SetDlgItemText(hPage,IDC_ADD_STATUSMSG,"");
- SetDlgItemText(hPage,IDC_ADD_CUSTOMPARAMS,"");
- SetDlgItemText(hPage,IDC_ADD_SENDID,gameidtemp);
-
- //auf customeintrag edit tab wechseln
- TabCtrl_SetCurSel(hwndTab, 1);
- ShowWindow(hwndDlg,SW_HIDE);
- ShowWindow(hPage,SW_SHOW);
- }
- }
- }
- else if(LOWORD(wParam) == IDOK)
- {
- int idx=SendDlgItemMessage(hwndDlg, IDC_GAMELIST, LB_GETCURSEL, 0, 0);
- //es wurde was ausgewählt?
- if(idx==LB_ERR) {
- MessageBoxA(hwndDlg,Translate("Please choose one game in the list!"),Translate("XFire Options"),MB_OK|MB_ICONEXCLAMATION);
- }
- else
- {
- //datei öffnen dialog
- OPENFILENAME ofn;
- //listdata auslesen, wo die gameid gespeihcert ist
- int gameids=SendDlgItemMessage( (HWND)hwndDlg, IDC_GAMELIST, LB_GETITEMDATA, idx, 0);
- //gameid splitten
- int gameid1=LOWORD(gameids);
- int gameid2=HIWORD(gameids);
- char gameidtemp[10]="";
- char ret[512];
-
- if(gameid2!=0)
- sprintf_s(gameidtemp,10,"%d_%d",gameid1,gameid2);
- else
- sprintf_s(gameidtemp,10,"%d",gameid1);
-
- //neuen gameeintrag anlegen
- Xfire_game* newgame=new Xfire_game();
- //gameid und sendid setzen
- newgame->id=gameid1;
- newgame->send_gameid=gameid1;
- //es handelt sich um einen customeintrag, man staune xD
- newgame->custom=1;
-
- //launcherexe abfragen
- if(xfire_GetPrivateProfileString(gameidtemp, "LauncherExe", "", ret, 512, inipath)) {
- //datei vom user öffnen lassen
- if(OpenFileDialog(hwndDlg,&ofn,ret))
- {
- //lowercase pfad
- newgame->strtolower(ofn.lpstrFile);
- //pfad dem spiel zuordnen
- newgame->setString(ofn.lpstrFile,&newgame->launchparams);
- }
- else
- {
- //speicher freigeben
- delete newgame;
- return FALSE;
- }
- }
-
- //detectexe abfragen
- if(xfire_GetPrivateProfileString(gameidtemp, "DetectExe", "", ret, 512, inipath)) {
- //datei vom user öffnen lassen
- if(OpenFileDialog(hwndDlg,&ofn,ret))
- {
- //lowercase pfad
- newgame->strtolower(ofn.lpstrFile);
- //pfad dem spiel zuordnen
- newgame->setString(ofn.lpstrFile,&newgame->path);
- }
- else
- {
- //speicher freigeben
- delete newgame;
- return FALSE;
- }
- } //MatchExe abfragen
- else if(xfire_GetPrivateProfileString(gameidtemp, "MatchExe", "", ret, 512, inipath)) {
- //datei vom user öffnen lassen
- if(OpenFileDialog(hwndDlg,&ofn,ret))
- {
- //lowercase pfad
- newgame->strtolower(ofn.lpstrFile);
- //pfad dem spiel zuordnen
- newgame->setString(ofn.lpstrFile,&newgame->path);
- }
- else
- {
- //speicher freigeben
- delete newgame;
- return FALSE;
- }
- }
-
-
- //prüfe ob schon ein launchstring festgelegt wurde, wenn nicht die detectexe nehmen
- if(!newgame->launchparams&&newgame->path) {
- newgame->setString(newgame->path,&newgame->launchparams);
- }
-
- //prüfe ob schon ein detectexe festgelegt wurde, wenn nicht die launchstring nehmen
- if(newgame->launchparams&&!newgame->path) {
- newgame->setString(newgame->launchparams,&newgame->path);
- }
-
- //LauncherUrl wird der launcherstring überschrieben
- if(xfire_GetPrivateProfileString(gameidtemp, "LauncherUrl", "", ret, 512, inipath)) {
- newgame->setString(ret,&newgame->launchparams);
- }
- else if(xfire_GetPrivateProfileString(gameidtemp, "Launch", "", ret, 512, inipath)) {
- str_replace(ret,"%UA_LAUNCHER_EXE_PATH%",""); //erstmal unwichtige sachen entfernen
- //str_replace(ret,"%UA_LAUNCHER_EXTRA_ARGS%",""); // - auch entfernen
- str_replace(ret,"%UA_LAUNCHER_LOGIN_ARGS%",""); // - auch entfernen
-
- //ein leerzeichen anfügen
- newgame->appendString(" ",&newgame->launchparams);
- //nun commandline des launchstringes dranhängen
- newgame->appendString(ret,&newgame->launchparams);
- }
-
- //restliche wichtige felder einfügen
- if(xfire_GetPrivateProfileString(gameidtemp, "LauncherPasswordArgs", "", ret, 512, inipath))
- newgame->setString(ret,&newgame->pwparams);
- if(xfire_GetPrivateProfileString(gameidtemp, "LauncherNetworkArgs", "", ret, 512, inipath))
- newgame->setString(ret,&newgame->networkparams);
- if(xfire_GetPrivateProfileString(gameidtemp, "CommandLineMustContain[0]", "", ret, 512, inipath))
- newgame->setString(ret,&newgame->mustcontain);
- if(xfire_GetPrivateProfileString(gameidtemp, "XUSERSendId", "", ret, 512, inipath))
- newgame->send_gameid=atoi(ret);
- if(xfire_GetPrivateProfileString(gameidtemp, "XUSERSetStatusMsg", "", ret, 512, inipath))
- newgame->setstatusmsg=atoi(ret);
-
- //namen setzen und icon laden
- newgame->setNameandIcon();
- //spiel in die gameliste einfügen
- xgamelist.Addgame(newgame);
- //derzeitige gameliste in die datenbank eintragen
- xgamelist.writeDatabase();
- //startmenu leeren
- xgamelist.clearStartmenu();
- //startmenu neuerzeugen
- xgamelist.createStartmenu();
-
- return SendMessage(GetParent(hwndDlg),WM_CLOSE,0,0);
- }
- }
- break;
- case WM_CLOSE:
- //nicht schließen, wenn noch der thread läuft
- if(dontClose) {
- MessageBoxA(hwndDlg, Translate("Please wait, gameini will be currently parsed ..."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- return FALSE;
- }
- //hauptfenster schließen
- SendMessage(GetParent(hwndDlg),WM_CLOSE,0,0);
- break;
- }
- return FALSE;
-}
-
-
-INT_PTR CALLBACK DlgAddGameProc2 (HWND hwndDlg,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam
-)
-{
- switch (uMsg)
- {
- case WM_INITDIALOG:
- //ein spiel wurde zum editieren geöffnet, felder alle vorbelegen
- if(editgame) {
- //add augf übernehmen umstellen
- SetDlgItemTextA(hwndDlg,IDOK,Translate("Apply"));
-
- //namen vorbelegen
- if(editgame->customgamename)
- SetDlgItemTextA(hwndDlg,IDC_ADD_NAME,editgame->customgamename);
- else if(editgame->name)
- SetDlgItemTextA(hwndDlg,IDC_ADD_NAME,editgame->name);
-
- //gameid setzen und feld schreibschützen
- char gameid[10]="";
- _itoa_s(editgame->id,gameid,10,10);
- SetDlgItemTextA(hwndDlg,IDC_ADD_ID,gameid);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ADD_ID),FALSE);
-
- //sendgameid setzen, bei -1 leer lassen
- if(editgame->send_gameid!=-1)
- {
- _itoa_s(editgame->send_gameid,gameid,10,10);
- SetDlgItemTextA(hwndDlg,IDC_ADD_SENDID,gameid);
- }
-
- //launcherstring
- if(editgame->launchparams) {
- SetDlgItemTextA(hwndDlg,IDC_ADD_LAUNCHEREXE,editgame->launchparams);
- }
-
- //detectstring
- if(editgame->path) {
- SetDlgItemTextA(hwndDlg,IDC_ADD_DETECTEXE,editgame->path);
- }
-
- //statusmsg
- if(editgame->statusmsg) {
- SetDlgItemTextA(hwndDlg,IDC_ADD_STATUSMSG,editgame->statusmsg);
- }
-
- //mustcontain parameter
- if(editgame->mustcontain) {
- SetDlgItemTextA(hwndDlg,IDC_ADD_CUSTOMPARAMS,editgame->mustcontain);
- }
- }
- //dialog übersetzen
- TranslateDialogDefault(hwndDlg);
-
- return TRUE;
-
- case WM_COMMAND:
- {
- if(LOWORD(wParam) == IDC_SENDIDHELP)
- {
- MessageBoxA(hwndDlg, Translate("If you add a mod of a Xfire supported game, then you can specify what gameid will be sent to Xfire. So if you add a Half-Life mod, you can set the Half-Life game id and if you start the game, your Xfire buddies will see the Half-Life game icon next to your name and the game time will be tracked."), Translate("XFire Options"), MB_OK|MB_ICONASTERISK);
- }
- else if(LOWORD(wParam) == IDC_GAMEIDHELP)
- {
- MessageBoxA(hwndDlg, Translate("Every game in Xfire needs an id. Use a number above the last used id to avoid problems with used ids. Every number above 10000 should be save. This id will not be sent to Xfire, when you start a game."), Translate("XFire Options"), MB_OK|MB_ICONASTERISK);
- }
- else if(LOWORD(wParam) == IDC_ADD_BROWSEDETECT)
- {
- OPENFILENAME ofn;
- if(OpenFileDialog(hwndDlg,&ofn,"*.exe"))
- {
- SetDlgItemText(hwndDlg,IDC_ADD_DETECTEXE,ofn.lpstrFile);
- }
- }
- else if(LOWORD(wParam) == IDC_ADD_BROWSELAUNCHER)
- {
- OPENFILENAME ofn;
- if(OpenFileDialog(hwndDlg,&ofn,"*.exe"))
- {
- SetDlgItemText(hwndDlg,IDC_ADD_LAUNCHEREXE,ofn.lpstrFile);
- }
- }
- else if(LOWORD(wParam) == IDCANCEL)
- {
- //nicht schließen, wenn noch der thread läuft
- if(dontClose) {
- MessageBoxA(hwndDlg, Translate("Please wait, gameini will be currently parsed ..."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- return FALSE;
- }
- return SendMessage(GetParent(hwndDlg),WM_CLOSE,0,0);
- }
- else if(LOWORD(wParam) == IDOK)
- {
- char temp[256];
-
- //fillgames sucht noch
- if(dontClose) {
- MessageBoxA(hwndDlg, Translate("Please wait, gameini will be currently parsed ..."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- return FALSE;
- }
-
- //neuen gameeintrag anlegen
- Xfire_game* newgame=NULL;
-
- if(editgame)
- newgame=editgame;
- else
- newgame=new Xfire_game();
-
- //Spielname
- GetDlgItemText(hwndDlg,IDC_ADD_NAME,temp,256);
- if(!strlen(temp))
- {
- if(!editgame) delete newgame;
- return MessageBoxA(hwndDlg, Translate("Please enter a game name."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- }
- else
- {
- //spielname zuordnen
- newgame->setString(temp,&newgame->customgamename);
- //spielnamen fürs menü
- newgame->setString(temp,&newgame->name);
- }
- //spielid nur setzen/prüfen, wenn kein editgame
- if(!editgame) {
- GetDlgItemText(hwndDlg,IDC_ADD_ID,temp,256);
- if(!strlen(temp))
- {
- if(!editgame) delete newgame;
- return MessageBoxA(hwndDlg, Translate("Please enter a game id."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- }
- else
- {
- int gameid=atoi(temp);
- //negative gameid blocken
- if(gameid<1)
- {
- if(!editgame) delete newgame;
- return MessageBoxA(hwndDlg, Translate("Please enter a game id above 1."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- }
- //gameid auf uniq prüfen
- else if(xgamelist.getGamebyGameid(gameid))
- {
- if(!editgame) delete newgame;
- return MessageBoxA(hwndDlg, Translate("This game id is already in use."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- }
- //gameid zuordnen
- newgame->id=gameid;
- //standardmäßig wird bei einem customeintrag keine id versendet
- newgame->send_gameid=-1;
- }
- }
- //zu sendene spielid
- GetDlgItemText(hwndDlg,IDC_ADD_SENDID,temp,256);
- if(strlen(temp))
- {
- //standardmäßig wird bei einem customeintrag keine id versendet
- int sendid=atoi(temp);
- if(sendid>0)
- newgame->send_gameid=sendid;
- }
-
- //launcher exe
- GetDlgItemText(hwndDlg,IDC_ADD_LAUNCHEREXE,temp,256);
- if(strlen(temp))
- {
- //lowercase pfad
- newgame->strtolower(temp);
- //detect exe
- newgame->setString(temp,&newgame->launchparams);
- }
- //detectexe
- GetDlgItemText(hwndDlg,IDC_ADD_DETECTEXE,temp,256);
- if(!strlen(temp))
- {
- if(!editgame) delete newgame;
- return MessageBoxA(hwndDlg, Translate("Please select a game exe. Note: If you dont select a launcher exe, the game exe will be used in the game start menu."), Translate("XFire Options"), MB_OK|MB_ICONEXCLAMATION);
- }
- else
- {
- //lowercase pfad
- newgame->strtolower(temp);
- //detect exe
- newgame->setString(temp,&newgame->path);
- //wenn kein launcher exe/pfad angeben wurde, dann den gamepath nehmen
- if(!newgame->launchparams)
- newgame->setString(temp,&newgame->launchparams);
-
- }
- //mustcontain parameter
- GetDlgItemText(hwndDlg,IDC_ADD_CUSTOMPARAMS,temp,256);
- if(strlen(temp))
- {
- newgame->setString(temp,&newgame->mustcontain);
- }
- //statusmsg speichern
- GetDlgItemText(hwndDlg,IDC_ADD_STATUSMSG,temp,256);
- if(strlen(temp))
- {
- newgame->setString(temp,&newgame->statusmsg);
- newgame->setstatusmsg=1;
- }
- //custom eintrag aktivieren
- newgame->custom=1;
- //spiel in die gameliste einfügen, aber nur im nicht editmodus
- if(!editgame)
- xgamelist.Addgame(newgame);
- //derzeitige gameliste in die datenbank eintragen
- xgamelist.writeDatabase();
- //startmenu leeren
- xgamelist.clearStartmenu();
- //startmenu neuerzeugen
- xgamelist.createStartmenu();
-
- return SendMessage(GetParent(hwndDlg),WM_CLOSE,0,0);
- }
- break;
- }
- }
- return FALSE;
-}
-
-
-INT_PTR CALLBACK DlgAddGameProcMain (HWND hwndDlg,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam
-)
-{
- switch (uMsg)
- {
- case WM_INITDIALOG:
- {
- TCITEMA tci = {0};
- int iTotal;
- RECT rcClient;
-
- //icon des dialogs setzen
- SendMessage(hwndDlg,WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
-
- hwndTab = GetDlgItem(hwndDlg, IDC_OPTIONSTAB);
- TabCtrl_DeleteAllItems(hwndTab);
- GetClientRect(GetParent(hwndTab), &rcClient);
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_ADDGAME), hwndDlg, DlgAddGameProc);
-
- //bei editgame keine spiellisteauswahl
- if(!editgame)
- {
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("Supported Games");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 10, rcClient.bottom - 28, 1);
- iTotal++;
- }
- else
- ShowWindow(hPage,FALSE);
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_ADDGAME2), hwndDlg, DlgAddGameProc2);
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("Custom game");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 10, rcClient.bottom - 28, 1);
- iTotal++;
-
- //bei editgame 2. registerkarte aktiv schalten
- if(!editgame) {
- ShowWindow(hPage,FALSE);
- TabCtrl_SetCurSel(hwndTab, 0);
- }
-
- return TRUE;
- }
- case WM_CLOSE:
- //nicht schließen, wenn noch der thread läuft
- if(dontClose) return FALSE;
- //buffer leeren
- if(buffer)
- {
- delete[] buffer;
- buffer=NULL;
- }
- EndDialog(hwndDlg,0);
- break;
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->idFrom)
- {
- case 0:
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- TCITEM tci;
- int i,count;
-
- tci.mask = TCIF_PARAM;
- count = TabCtrl_GetItemCount(GetDlgItem(hwndDlg,IDC_OPTIONSTAB));
- for (i=0; i<count; i++)
- {
- TabCtrl_GetItem(GetDlgItem(hwndDlg,IDC_OPTIONSTAB),i,&tci);
- SendMessage((HWND)tci.lParam,WM_NOTIFY,0,lParam);
- }
- break;
- }
- }
- break;
-
- case IDC_OPTIONSTAB:
- {
- HWND hTabCtrl = GetDlgItem(hwndDlg, IDC_OPTIONSTAB);
-
- switch (((LPNMHDR)lParam)->code)
- {
- case TCN_SELCHANGING:
- {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(hTabCtrl, TabCtrl_GetCurSel(hTabCtrl), &tci);
- ShowWindow((HWND)tci.lParam, SW_HIDE);
- }
- break;
-
- case TCN_SELCHANGE:
- {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(hTabCtrl, TabCtrl_GetCurSel(hTabCtrl), &tci);
- ShowWindow((HWND)tci.lParam,SW_SHOW);
- }
- break;
- }
- break;
- }
- }
- break;
- }
- return FALSE;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.h b/plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.h
deleted file mode 100644
index 3795df1ed5..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/addgamedialog.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _ADDGAME_H
-#define _ADDGAME_H
-
-#include "baseProtocol.h"
-#include "Xfire_gamelist.h"
-
-//dialog funktion
-INT_PTR CALLBACK DlgAddGameProc (HWND hwndDlg,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam
-);
-
-INT_PTR CALLBACK DlgAddGameProcMain (HWND hwndDlg,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam
-);
-
-//struct für den cache
-struct lbInicache {
- char name[255];
- unsigned int gameid;
-};
-
-void AddGameDialog(HWND hwndDlg,Xfire_game* game=NULL);
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.cpp b/plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.cpp
deleted file mode 100644
index fd3dbcf6ea..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-//beinhaltet funktionen zum setzen des status wenn man ingame ist
-
-#include "stdafx.h"
-#include "baseProtocol.h"
-#include "m_variables.h"
-#include "Xfire_gamelist.h"
-
-extern Xfire_gamelist xgamelist;
-
-
-#include <vector>
-
-using namespace std;
-
-#include "xdebug.h"
-
-//vector beinhaltet statusmessages
-vector<string> *olstatusmsg=NULL;
-vector<string> *protoname=NULL;
-vector<unsigned int> *olstatus=NULL;
-vector<unsigned int> *oltostatus=NULL;
-PROTOCOLDESCRIPTOR **temp;
-int anz,statusid;
-int statustype;
-
-BOOL BackupStatusMsg() {
- DBVARIANT dbv;
-
- statustype=DBGetContactSettingByte(NULL,protocolname,"statuschgtype",0);
-
- XFireLog("Backup Status Message ...");
-
- //alten vector löschen
- if(olstatusmsg!=NULL)
- {
- delete olstatusmsg;
- olstatusmsg=NULL;
- }
- if(protoname!=NULL)
- {
- delete protoname;
- protoname=NULL;
- }
- if(olstatus!=NULL)
- {
- delete olstatus;
- olstatus=NULL;
- }
- if(oltostatus!=NULL)
- {
- delete oltostatus;
- oltostatus=NULL;
- }
- olstatusmsg=new vector<string>;
- protoname=new vector<string>;
- olstatus=new vector<unsigned int>;
- oltostatus=new vector<unsigned int>;
-
- //alle protokolle durchgehen und den status in den vector sichern
- CallService(MS_PROTO_ENUMPROTOCOLS,(WPARAM)&anz,(LPARAM)&temp);
- for(int i=0;i<anz;i++)
- {
- statusid=CallProtoService(temp[i]->szName,PS_GETSTATUS,0,0);
- XFireLog("Get Status of %s ...",temp[i]->szName);
-
- char ttemp[128]="";
- sprintf_s(ttemp,128,"%s%s",temp[i]->szName,PS_SETAWAYMSG);
-
- //xfire wird geskipped, offline prots und invs prots auch, und locked status prots auch
- if(statusid==ID_STATUS_INVISIBLE||statusid==ID_STATUS_OFFLINE||!lstrcmpiA( temp[i]->szName, protocolname )||!ServiceExists(ttemp)||DBGetContactSettingByte(NULL,temp[i]->szName,"LockMainStatus",0)==1)
- {
- XFireLog("-> Skip %s.",temp[i]->szName);
-
- olstatus->push_back(-1);
- olstatusmsg->push_back("");
- if(statustype) oltostatus->push_back(-1);
- protoname->push_back("");
- continue;
- }
-
- int dummystatusid=statusid;
-
- if(statustype)
- {
- if(statusid!=0)
- {
- int caps=CallProtoService(temp[i]->szName,PS_GETCAPS,PFLAGNUM_2,0);
-
- //normale statusreihenfolge
- if(DBGetContactSettingByte(NULL,protocolname,"dndfirst",0)==0)
- {
- if(caps&PF2_LIGHTDND)
- {
- oltostatus->push_back(ID_STATUS_OCCUPIED);
- dummystatusid=ID_STATUS_OCCUPIED;
- XFireLog("%s supports OCCUPIED.",temp[i]->szName);
- }
- else if(caps&PF2_HEAVYDND)
- {
- oltostatus->push_back(ID_STATUS_DND);
- dummystatusid=ID_STATUS_DND;
- XFireLog("%s supports DND.",temp[i]->szName);
- }
- else if(caps&PF2_SHORTAWAY)
- {
- oltostatus->push_back(ID_STATUS_AWAY);
- dummystatusid=ID_STATUS_AWAY;
- XFireLog("%s supports AWAY.",temp[i]->szName);
- }
- else
- {
- XFireLog("%s no Away???.",temp[i]->szName);
- oltostatus->push_back(statusid);
- dummystatusid=statusid;
- }
- }
- else //dnd bevorzugt
- {
- if(caps&PF2_HEAVYDND)
- {
- oltostatus->push_back(ID_STATUS_DND);
- dummystatusid=ID_STATUS_DND;
- XFireLog("%s supports DND.",temp[i]->szName);
- }
- else if(caps&PF2_LIGHTDND)
- {
- oltostatus->push_back(ID_STATUS_OCCUPIED);
- dummystatusid=ID_STATUS_OCCUPIED;
- XFireLog("%s supports OCCUPIED.",temp[i]->szName);
- }
- else if(caps&PF2_SHORTAWAY)
- {
- oltostatus->push_back(ID_STATUS_AWAY);
- dummystatusid=ID_STATUS_AWAY;
- XFireLog("%s supports AWAY.",temp[i]->szName);
- }
- else
- {
- XFireLog("%s no Away???.",temp[i]->szName);
- oltostatus->push_back(statusid);
- dummystatusid=statusid;
- }
- }
- }
- else
- oltostatus->push_back(-1);
- }
-
- switch(statusid)
- {
- case ID_STATUS_ONLINE:
- if(DBGetContactSetting(NULL,"SRAway","OnMsg",&dbv))
- olstatusmsg->push_back(Translate("Yep, I'm here."));
- break;
- case ID_STATUS_AWAY:
- if(DBGetContactSetting(NULL,"SRAway","AwayMsg",&dbv))
- olstatusmsg->push_back(Translate("I've been away since %time%."));
- break;
- case ID_STATUS_NA:
- if(DBGetContactSetting(NULL,"SRAway","NaMsg",&dbv))
- olstatusmsg->push_back(Translate("Give it up, I'm not in!"));
- break;
- case ID_STATUS_OCCUPIED:
- if(DBGetContactSetting(NULL,"SRAway","OccupiedMsg",&dbv))
- olstatusmsg->push_back(Translate("Not right now."));
- break;
- case ID_STATUS_DND:
- if(DBGetContactSetting(NULL,"SRAway","DndMsg",&dbv))
- olstatusmsg->push_back(Translate("Give a guy some peace, would ya?"));
- break;
- case ID_STATUS_FREECHAT:
- if(DBGetContactSetting(NULL,"SRAway","FreeChatMsg",&dbv))
- olstatusmsg->push_back(Translate("Well, I would talk to you if Miranda ICQ supported chat"));
- break;
- case ID_STATUS_ONTHEPHONE:
- if(DBGetContactSetting(NULL,"SRAway","OtpMsg",&dbv))
- olstatusmsg->push_back(Translate("That'll be the phone."));
- break;
- case ID_STATUS_OUTTOLUNCH:
- if(DBGetContactSetting(NULL,"SRAway","OtlMsg",&dbv))
- olstatusmsg->push_back(Translate("Mmm...food."));
- break;
- default:
- //nix zumachn, kenn den status nicht
- olstatus->push_back(-1);
- olstatusmsg->push_back("");
- protoname->push_back("");
- continue;
- }
-
- //ab in den vector
- olstatus->push_back(statusid);
- if(olstatus->size()>olstatusmsg->size())
- {
- olstatusmsg->push_back(string(dbv.pszVal));
- protoname->push_back(temp[i]->szName);
- //freigeben
- DBFreeVariant(&dbv);
- }
- else
- protoname->push_back(temp[i]->szName);
- }
-
- return TRUE;
-}
-
-BOOL SetGameStatusMsg()
-{
- char* statusmsg=NULL;
-
- //prüfe ob vector leer
- if(olstatusmsg==NULL)
- return FALSE;
-
- //zusetzende statusmsg erstellen
- if (ServiceExists(MS_VARS_FORMATSTRING))
- {
- DBVARIANT dbv;
- if(!DBGetContactSetting(NULL,protocolname,"setstatusmsg",&dbv)) {
- //direkte funktionen verwenden
- statusmsg = variables_parse(dbv.pszVal,NULL,0);
- if (statusmsg == NULL)
- {
- DBFreeVariant(&dbv);
- return FALSE;
- }
-
- DBFreeVariant(&dbv);
- }
- }
- else
- {
- //alternativ zweig ohne variables
- DBVARIANT dbv;
- if(!DBGetContactSetting(NULL,protocolname,"setstatusmsg",&dbv)) {
-
- DBVARIANT dbv3;
-
- //statusmsg rein
- xgamelist.setString(dbv.pszVal,&statusmsg);
-
- //mit den vars ersetzen beginnen
-
- //derzeitiges spiel
- if(!DBGetContactSetting(NULL,protocolname, "currentgamename",&dbv3))
- {
- xgamelist.strreplace("%myxfiregame%",dbv3.pszVal,&statusmsg);
- DBFreeVariant(&dbv3);
- }
- else
- xgamelist.strreplace("%myxfiregame%","",&statusmsg);
-
- //derzeitiges voiceprogram
- if(!DBGetContactSetting(NULL,protocolname, "currentvoicename",&dbv3))
- {
- xgamelist.strreplace("%myxfirevoice%",dbv3.pszVal,&statusmsg);
- DBFreeVariant(&dbv3);
- }
- else
- xgamelist.strreplace("%myxfirevoice%","",&statusmsg);
-
- //derzeitige voiceip
- if(!DBGetContactSetting(NULL,protocolname, "VServerIP",&dbv3))
- {
- xgamelist.strreplace("%myxfirevoiceip%",dbv3.pszVal,&statusmsg);
- DBFreeVariant(&dbv3);
- }
- else
- xgamelist.strreplace("%myxfirevoiceip%","",&statusmsg);
-
- //derzeitige gameip
- if(!DBGetContactSetting(NULL,protocolname, "ServerIP",&dbv3))
- {
- xgamelist.strreplace("%myxfireserverip%",dbv3.pszVal,&statusmsg);
- DBFreeVariant(&dbv3);
- }
- else
- xgamelist.strreplace("%myxfireserverip%","",&statusmsg);
-
- }
- }
-
- CallService(MS_PROTO_ENUMPROTOCOLS,(WPARAM)&anz,(LPARAM)&temp);
- for(int i=0;i<anz;i++)
- {
- if(olstatus->at(i)!=-1)
- {
- if(statustype)
- {
- //newawaysys
- if(ServiceExists("NewAwaySystem/SetStateA"))
- {
- XFireLog("-> SetStatusMsg of %s with NewAwaySystem/SetStateA.",protoname->at(i).c_str());
-
- NAS_PROTOINFO npi = {0};
- npi.cbSize=sizeof(NAS_PROTOINFO);
- npi.szProto=(char*)protoname->at(i).c_str();
- npi.status=oltostatus->at(i);
- npi.szMsg=mir_strdup(statusmsg);
- CallService("NewAwaySystem/SetStateA", (WPARAM)&npi, (LPARAM)1);
- }
- else if(ServiceExists("NewAwaySystem/SetStateW")) {
- XFireLog("-> SetStatusMsg of %s with NewAwaySystem/SetStateW.",protoname->at(i).c_str());
-
- NAS_PROTOINFO npi = {0};
- npi.cbSize=sizeof(NAS_PROTOINFO);
- npi.szProto=(char*)protoname->at(i).c_str();
- npi.status=oltostatus->at(i);
- npi.szMsg=mir_strdup(statusmsg);
- CallService("NewAwaySystem/SetStateW", (WPARAM)&npi, (LPARAM)1);
- }
- else
- {
- XFireLog("-> SetStatusMsg of %s with Miranda with occupied status.",protoname->at(i).c_str());
-
- //statusmsg für beschäftigt setzen
- CallProtoService(temp[i]->szName,PS_SETAWAYMSG,oltostatus->at(i),(LPARAM)statusmsg);
- //status auf beschäftigt wechseln
- CallProtoService(temp[i]->szName,PS_SETSTATUS,oltostatus->at(i),0);
- //statusmsg für beschäftigt setzen
- if(CallProtoService(temp[i]->szName,PS_GETSTATUS,0,0)!=oltostatus->at(i))
- {
- XFireLog("Set StatusMsg again, Status was not succesfully set.");
- CallProtoService(temp[i]->szName,PS_SETAWAYMSG,oltostatus->at(i),(LPARAM)statusmsg);
- }
- }
- }
- else
- {
- XFireLog("-> SetStatusMsg of %s.",protoname->at(i).c_str());
-
- CallProtoService(temp[i]->szName,PS_SETAWAYMSG,olstatus->at(i),(LPARAM)statusmsg);
- }
- }
- }
-
- if (ServiceExists(MS_VARS_FORMATSTRING))
- CallService(MS_VARS_FREEMEMORY, (WPARAM)statusmsg, 0);
- else
- if(statusmsg) delete[] statusmsg;
-
- return TRUE;
-}
-
-BOOL SetOldStatusMsg()
-{
- //prüfe ob vector leer
- if(olstatusmsg==NULL)
- return FALSE;
-
- CallService(MS_PROTO_ENUMPROTOCOLS,(WPARAM)&anz,(LPARAM)&temp);
- for(int i=0;i<anz;i++)
- {
- if(olstatus->at(i)!=-1)
- {
- if(statustype)
- {
- //alten status setzen
- CallProtoService(temp[i]->szName,PS_SETSTATUS,olstatus->at(i),0);
- //status wurde nicht gewechselt, dann statusmsg nachträglich setzen
- if(CallProtoService(temp[i]->szName,PS_GETSTATUS,0,0)!=olstatus->at(i))
- CallProtoService(temp[i]->szName,PS_SETAWAYMSG,olstatus->at(i),(LPARAM)olstatusmsg->at(i).c_str());
- }
- else
- {
- CallProtoService(temp[i]->szName,PS_SETSTATUS,olstatus->at(i),0);
- CallProtoService(temp[i]->szName,PS_SETAWAYMSG,olstatus->at(i),(LPARAM)olstatusmsg->at(i).c_str());
- }
- }
- }
-
- //alten vector löschen
- if(protoname!=NULL)
- {
- delete protoname;
- protoname=NULL;
- }
- if(olstatusmsg!=NULL)
- {
- delete olstatusmsg;
- olstatusmsg=NULL;
- }
- if(olstatus!=NULL)
- {
- delete olstatus;
- olstatus=NULL;
- }
- if(oltostatus!=NULL)
- {
- delete olstatus;
- olstatus=NULL;
- }
-
- return TRUE;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.h b/plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.h
deleted file mode 100644
index a3a95a56b7..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/all_statusmsg.h
+++ /dev/null
@@ -1,7 +0,0 @@
-//definitionen für die statusmsg handling geschichte
-#include "baseProtocol.h"
-
-//sichert die statusmeldungen in den speicher
-BOOL BackupStatusMsg();
-BOOL SetGameStatusMsg();
-BOOL SetOldStatusMsg(); \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/authpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/authpacket.cpp
deleted file mode 100644
index 9183fd1e48..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/authpacket.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "authpacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-
-namespace xfirelib {
- using namespace std;
-
- AuthPacket::AuthPacket() : XFireRecvPacketContent() {
- salt = 0;
- }
- AuthPacket::~AuthPacket() {
- delete salt;
- }
-
- void AuthPacket::parseContent(char *buf, int length, int numberOfAtts) {
-
- //XFireParse parse;
- salt = new VariableValue();
- //parse.readVariableValue(buf, 0, length, salt);
- salt->readVariableValue(buf, 0, length);
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/authpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/authpacket.h
deleted file mode 100644
index 5a9f5bb057..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/authpacket.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __AUTHPACKET_H
-#define __AUTHPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-#define XFIRE_PACKET_AUTH_ID 128
-
-namespace xfirelib {
-
- class AuthPacket : public XFireRecvPacketContent {
- public:
- AuthPacket();
- virtual ~AuthPacket();
-
- XFirePacketContent* newPacket() { return new AuthPacket(); }
-
-
- int getPacketId() { return XFIRE_PACKET_AUTH_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- VariableValue *getSalt() { return salt; }
- private:
- VariableValue *salt;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h b/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h
deleted file mode 100644
index feae6e69de..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//=====================================================
-// Includes (yea why not include lots of stuff :D )
-//=====================================================
-#include <windows.h>
-#include <gdiplus.h>
-#include <Wininet.h>
-#include <commctrl.h>
-#include <stdio.h>
-#include <time.h>
-#include <stddef.h>
-#include <process.h>
-#include <string.h>
-#include <winsock.h>
-#include "resource.h"
-#include <winbase.h>
-#include <tlhelp32.h>
-#include <Psapi.h>
-#include <string.h>
-#include <Iphlpapi.h>
-
-//Miranda SDK headers
-#include <newpluginapi.h>
-#include <m_clist.h>
-#include <m_clui.h>
-#include <m_skin.h>
-#include <m_langpack.h>
-#include <m_protomod.h>
-#include <m_database.h>
-#include <m_system.h>
-#include <m_protocols.h>
-#include <m_protomod.h>
-#include <m_protosvc.h>
-#include <m_protoint.h>
-#include <m_userinfo.h>
-#include <m_options.h>
-#include <m_protosvc.h>
-#include <m_utils.h>
-#include <m_ignore.h>
-#include <m_clc.h>
-#include <m_netlib.h>
-#include <m_avatars.h>
-#include <m_folders.h>
-#include <m_assocmgr.h>
-#include <services.h>
-#include <m_extraicons.h>
-
-/*#pragma comment(lib, "atl.lib")
-#include <atldef.h>
-#define _ATL_DLL_IMPL
-#include <atliface.h>*/
-
-#ifndef _BASEPROTO_H
-#define _BASEPROTO_H
-
-//=======================================================
-// Definitions
-//=======================================================
-#define protocolname "XFire" //no spaces here :)
-
-/* */
-typedef DWORD (*pGetExtendedTcpTable)(
- __out_bcount_opt(*pdwSize) PVOID pTcpTable,
- __inout PDWORD pdwSize,
- __in BOOL bOrder,
- __in ULONG ulAf,
- __in TCP_TABLE_CLASS TableClass,
- __in ULONG Reserved
- );
-
-typedef DWORD (*pGetExtendedUdpTable)(
- __out_bcount_opt(*pdwSize) PVOID pUdpTable,
- __inout PDWORD pdwSize,
- __in BOOL bOrder,
- __in ULONG ulAf,
- __in UDP_TABLE_CLASS TableClass,
- __in ULONG Reserved
- );
-
-//=======================================================
-// Defines
-//=======================================================
-//General
-extern HINSTANCE hinstance;
-extern int bpStatus;
-
-//Services.c
-int GetCaps(WPARAM wParam,LPARAM lParam);
-int GetName(WPARAM wParam,LPARAM lParam);
-int TMLoadIcon(WPARAM wParam,LPARAM lParam);
-int SetStatus(WPARAM wParam,LPARAM lParam);
-int GetStatus(WPARAM wParam,LPARAM lParam);
-BOOL IsXFireContact(HANDLE h);
-int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hhicon=NULL);
-BOOL CreateToolTip(int toolID, HWND hDlg, CHAR* pText);
-void EnableDlgItem(HWND hwndDlg, UINT control, int state);
-BOOL str_replace(char*src,char*find,char*rep);
-extern void Message(LPVOID msg);
-extern void MessageE(LPVOID msg);
-char* GetLaunchPath(char*launch);
-unsigned short r(unsigned short data);
-BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,char*ip2,char*ip3,char*ip4,long*port);
-BOOL GetServerIPPort2(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,char*ip2,char*ip3,char*ip4,long*port);
-int SetNickName(WPARAM newnick, LPARAM lparam);
-BOOL FindTeamSpeak(DWORD*pid,int*vid);
-char*menuitemtext(char*mtext);
-BOOL checkCommandLine(HANDLE hProcess,char * mustcontain,char * mustnotcontain);
-char * getItem(char * string,char delim,int count);
-BOOL GetWWWContent(char*host,char* request,char*filename,BOOL dontoverwrite);
-BOOL GetWWWContent2(char*address,char*filename,BOOL dontoverwrite,char**tobuf=NULL,unsigned int* size=NULL);
-BOOL CheckWWWContent(char*address);
-unsigned int getfilesize(char*path);
-void UpdateMyXFireIni(LPVOID dummy);
-void UpdateMyIcons(LPVOID dummy);
-BOOL IsContactMySelf(std::string buddyusername);
-DWORD xfire_GetPrivateProfileString(__in LPCTSTR lpAppName, __in LPCTSTR lpKeyName, __in LPCTSTR lpDefault, __out LPTSTR lpReturnedString, __in DWORD nSize, __in LPCTSTR lpFileName);
-BOOL mySleep(int ms,HANDLE evt);
-void __stdcall XFireLog( const char* fmt, ... );
-
-#define ID_STATUS_RECONNECT ID_STATUS_OFFLINE-1
-
-struct CONTACT // Contains info about users
-{
- TCHAR* name;
- TCHAR* user;
- TCHAR* host;
- bool ExactOnly;
- bool ExactWCOnly;
- bool ExactNick;
-};
-
-
-#define MSGBOX(msg) mir_forkthread(Message,(LPVOID)msg)
-#define MSGBOXE(msg) mir_forkthread(MessageE,(LPVOID)msg)
-
-/*#define EXTRA_ICON_EMAIL 1
-#define EXTRA_ICON_PROTO 2
-#define EXTRA_ICON_SMS 3
-#define EXTRA_ICON_ADV1 4
-#define EXTRA_ICON_ADV2 9 //5
-#define EXTRA_ICON_ADV3 9
-#define EXTRA_ICON_ADV4 10 */
-
-static int icoslot[] = { 4, 5, 9, 10 };
-
-
-typedef struct
-{
-int cbSize; //must be sizeof(IconExtraColumn)
-int ColumnType;
-HANDLE hImage; //return value from MS_CLIST_EXTRA_ADD_ICON
-}IconExtraColumn,*pIconExtraColumn;
-
-
-//Set icon for contact at needed column
-//wparam=hContact
-//lparam=pIconExtraColumn
-//return 0 on success,-1 on failure
-//
-//See above for supported columns
-#define MS_CLIST_EXTRA_SET_ICON "CListFrames/SetIconForExraColumn"
-
-//Adding icon to extra image list.
-//Call this in ME_CLIST_EXTRA_LIST_REBUILD event
-//
-//wparam=hIcon
-//lparam=0
-//return hImage on success,-1 on failure
-#define MS_CLIST_EXTRA_ADD_ICON "CListFrames/AddIconToExtraImageList"
-
-
-
-#define ME_CLIST_EXTRA_LIST_REBUILD "CListFrames/OnExtraListRebuild"
-
-#define PS_GETAWAYMSG "/GetAwayMsg"
-
-//called with wparam=hContact
-#define ME_CLIST_EXTRA_IMAGE_APPLY "CListFrames/OnExtraImageApply"
-
-#define FU_TBREDRAW 1 //redraw titlebar
-#define FU_FMREDRAW 2 //redraw Frame
-#define FU_FMPOS 4 //update Frame position
-#define MS_CLIST_FRAMES_UPDATEFRAME "CListFrame/UpdateFrame"
-
-#define SKINICONDESC_SIZE sizeof(SKINICONDESC)
-#define SKINICONDESC_SIZE_V1 0x18
-#define SKINICONDESC_SIZE_V2 0x1C
-#define SKINICONDESC_SIZE_V3 0x24
-
-typedef struct {
- int cbSize;
- union {
- char *pszSection; // section name used to group icons
- TCHAR *ptszSection;
- wchar_t *pwszSection;
- };
- union {
- char *pszDescription; // description for options dialog
- TCHAR *ptszDescription;
- wchar_t *pwszDescription;
- };
- char *pszName; // name to refer to icon when playing and in db
- char *pszDefaultFile; // default icon file to use
- int iDefaultIndex; // index of icon in default file
- HICON hDefaultIcon; // handle to default icon
- int cx,cy; // dimensions of icon
- int flags;
-} SKINICONDESC;
-
-#define SIDF_UNICODE 0x100 // Section and Description are in UCS-2
-
-#if defined(_UNICODE)
- #define SIDF_TCHAR SIDF_UNICODE
-#else
- #define SIDF_TCHAR 0
-#endif
-
-// entfernt menuitems
-#define MS_CLIST_REMOVEMAINMENUITEM "CList/RemoveMainMenuItem"
-
-//
-// Add a icon into options UI
-//
-// wParam = 0
-// lParam = (LPARAM)(SKINICONDESC*)sid;
-//
-#define MS_SKIN2_ADDICON "Skin2/Icons/AddIcon"
-
-//
-// Retrieve HICON with name specified in lParam
-// Returned HICON SHOULDN'T be destroyed, it is managed by IcoLib
-//
-
-#define MS_SKIN2_GETICON "Skin2/Icons/GetIcon"
-
-//
-// Icons change notification
-//
-#define ME_SKIN2_ICONSCHANGED "Skin2/IconsChanged"
-
-#define MS_SKIN2_GETICONBYHANDLE "Skin2/Icons/GetIconByHandle"
-
-
-#pragma comment(lib,"Advapi32.lib")
-#pragma comment(lib,"Psapi.lib")
-#pragma comment(lib,"gdiplus.lib")
-#pragma comment(lib,"comdlg32.lib")
-#pragma comment(lib,"comctl32.lib")
-#pragma comment(lib,"shell32.lib")
-
-//=====================================================
-// Definitions
-//=====================================================
-
-struct GameIco {
- int gameid;
- HANDLE handle;
- HICON hicon;
-};
-
-struct XFireContact {
- char * username;
- char * nick;
- int id;
- int sid;
-};
-
-struct XFireAvatar {
- int type;
- char backup[256];
- char file[256];
- char rfile[256];
-};
-
-struct XFire_FoundGame
-{
- int gameid;
- int gameid2;
- short send_gameid;
- char path[256];
- char mpath[9][256];
- int morepaths;
- char launchparams[1024];
- char networkparams[1024];
- char userparams[1024];
- char pwparams[1024];
- char mustcontain[1024];
- char notcontain[1024];
- char temp[128];
- BOOL setstatusmsg;
- BOOL custom;
- BOOL skip;
- BOOL noicqstatus;
- HANDLE menuitem;
-};
-
-struct XFire_SetAvatar
-{
- HANDLE hContact;
- char* username;
-};
-
-struct gServerstats {
- int players;
- int maxplayers;
- char name[512];
- char map[512];
- char gametype[512];
- char fgametype[512];
- BOOL password;
-};
-
-struct GameServerQuery_query {
- int xfiregameid;
- char ip[16];
- WORD port;
- HANDLE handle; //will be overwritten
- int queryengine; // immer 0
-};
-
-#define XFIRE_MAX_STATIC_STRING_LEN 1024
-#define XFIRE_SCAN_VAL 0x3
-
-#define XFIRE_GAME_ICON 0
-#define XFIRE_VOICE_ICON 1
-
-
-typedef struct {
- int cbSize;
- char *szProto; // pointer to protocol modulename (NULL means global)
- union
- {
- char *szMsg;
- WCHAR *wszMsg;
- TCHAR *tszMsg;
- }; // pointer to the status message _format_ (i.e. it's an unparsed message containing variables, in any case. NAS takes care of parsing) (may be NULL - means that there's no specific message for this protocol - then the global status message will be used)
-/*
- Be aware that MS_NAS_GETSTATE allocates memory for szMsg through Miranda's
- memory management interface (MS_SYSTEM_GET_MMI). And MS_NAS_SETSTATE
- expects szMsg to be allocated through the same service. MS_NAS_SETSTATE deallocates szMsg.
-*/
- WORD status; // status mode. 0 means current (NAS will overwrite 0 with the current status mode)
-// for MS_NAS_GETSTATE if the specified status is not 0, MS_NAS_GETSTATE will return the default/last status message (depends on settings) - i.e. the same message that will be shown by default when user changes status to the specified one. please note that, for example, if current status mode is ID_STATUS_AWAY, then status messages returned by MS_NAS_GETSTATE for status=0 and status=ID_STATUS_AWAY may be different! for status=ID_STATUS_AWAY it always returns the default/last status message, and for status=0 it returns _current_ status message.
- int Flags;
-} NAS_PROTOINFO;
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.cpp b/plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.cpp
deleted file mode 100644
index bcd9d47c81..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include <vector>
-#include <string>
-
-#include "buddyinfo.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- void BuddyInfoPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
-
- VariableValue val;
-
- XDEBUG2( "Len: %ld\n", length );
-
- index+=2; //paar bytes überspringen
-
- index += val.readValue(buf,index,4);
- this->userid = val.getValueAsLong();
-
- XDEBUG2( "UserId: %ld\n", this->userid);
-
- index+=2;
-
- this->avatarmode = buf[index];
- XDEBUG2( "Avatarmode: %ld\n", this->avatarmode);
- index+=6;
-
-
- index += val.readValue(buf,index,4);
- this->avatarid = val.getValueAsLong();
- XDEBUG2( "Avatarid: %ld\n", this->avatarid);
-
- }
-
-}; \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.h b/plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.h
deleted file mode 100644
index 54f918dffd..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddyinfo.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//packet wird empfangen, nachdem man buddyinfos angefordert hat
-
-#ifndef __BUDDYINFO_H
-#define __BUDDYINFO_H
-
-#include "xfirerecvpacketcontent.h"
-#include <string>
-
-#define XFIRE_BUDDYINFO 0xAE
-
-namespace xfirelib {
- class BuddyInfoPacket : public XFireRecvPacketContent {
- public:
- virtual ~BuddyInfoPacket() { }
- int getPacketId() { return XFIRE_BUDDYINFO; }
-
- XFirePacketContent *newPacket() { return new BuddyInfoPacket(); }
- void parseContent(char *buf, int length, int numberOfAtts);
-
- unsigned char avatarmode;
- unsigned int avatarid;
- unsigned int userid;
-
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylist.cpp b/plugins/!NotAdopted/Xfire/xfiretest/buddylist.cpp
deleted file mode 100644
index ea7e264502..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylist.cpp
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include <iostream>
-#include <vector>
-#include "buddylist.h"
-#include "buddylistonlinepacket.h"
-#include "buddylistgamespacket.h"
-#include "buddylistgames2packet.h"
-#include "recvremovebuddypacket.h"
-#include "recvstatusmessagepacket.h"
-#include "recvbuddychangednick.h"
-#include "xdebug.h"
-
-//buddylist verarbeitung von der main in buddylist verschoben, um doppelte schleifenverarbeitung zuunterbinden
-#include "baseProtocol.h"
-
-extern HANDLE handlingBuddys(xfirelib::BuddyListEntry *entry, int clan=0,char* group=NULL,BOOL dontscan=FALSE);
-extern void setBuddyStatusMsg(xfirelib::BuddyListEntry *entry,std::string statusmsg);
-
-namespace xfirelib {
-
- using namespace std;
-
- BuddyList::BuddyList(Client *client) {
- entries = new vector<BuddyListEntry *>;
-
- //clan entries initialisieren - dufte
- entriesClan = new vector<BuddyListEntry *>;
-
- this->client = client;
- this->client->addPacketListener( this );
- }
- BuddyList::~BuddyList() {
- for(vector<BuddyListEntry *>::iterator it = entries->begin();
- it != entries->end(); it++) {
- delete *it;
- }
- delete entries;
-
- //clan entries entfernen - dufte
- for(vector<BuddyListEntry *>::iterator it = entriesClan->begin();
- it != entriesClan->end(); it++) {
- delete *it;
- }
- delete entriesClan;
- }
-
- BuddyListEntry *BuddyList::getBuddyById(long userid) {
- for(uint i = 0 ; i < entries->size() ; i++) {
- BuddyListEntry *entry = entries->at(i);
- if(entry->userid == userid)
- return entry;
- }
-
- //clan entries durchsuchen - dufte
- for(uint i = 0 ; i < entriesClan->size() ; i++) {
- BuddyListEntry *entry = entriesClan->at(i);
- if(entry->userid == userid)
- return entry;
- }
-
- return 0;
- }
-
- BuddyListEntry *BuddyList::getBuddyByName(string username) {
- for(uint i = 0 ; i < entries->size() ; i++) {
- BuddyListEntry *entry = entries->at(i);
- if(entry->username == username)
- return entry;
- }
-
- //clan entries durchsuchen - dufte
- for(uint i = 0 ; i < entriesClan->size() ; i++) {
- BuddyListEntry *entry = entriesClan->at(i);
- if(entry->username == username)
- return entry;
- }
-
- return 0;
- }
-
- BuddyListEntry *BuddyList::getBuddyBySid(const char *sid) {
- for(uint i = 0 ; i < entries->size() ; i++) {
- BuddyListEntry *entry = entries->at(i);
-
- if(memcmp((void *)sid,(void *)entry->sid,16) == 0)
- return entry;
-
- }
-
- //clan entries durchsuchen - dufte
- for(uint i = 0 ; i < entriesClan->size() ; i++) {
- BuddyListEntry *entry = entriesClan->at(i);
-
- if(memcmp((void *)sid,(void *)entry->sid,16) == 0)
- return entry;
-
- }
-
- return 0;
- }
-
-
- void BuddyList::initEntries(BuddyListNamesPacket *buddyNames) {
- for(uint i = 0 ; i < buddyNames->usernames->size() ; i++) {
- BuddyListEntry *entry = new BuddyListEntry;
- entry->username = buddyNames->usernames->at(i);
- entry->userid = buddyNames->userids->at(i);
- entry->nick = buddyNames->nicks->at(i);
- //buddies in miranda verarbeiten
- handlingBuddys(entry,0,NULL);
- entries->push_back(entry);
- }
- }
-
- // funktion zum initialisieren der clanliste - dufte
- void BuddyList::initEntriesClan(ClanBuddyListNamesPacket *buddyNames) {
- for(uint i = 0 ; i < buddyNames->usernames->size() ; i++) {
- BuddyListEntry *entry = new BuddyListEntry;
- entry->username = buddyNames->usernames->at(i);
- entry->userid = buddyNames->userids->at(i);
- entry->nick = buddyNames->nicks->at(i);
- entry->clanid = buddyNames->clanid;
- /* ## buddies im miranda verarbietn */
- char temp[255];
- char * dummy;
- sprintf_s(temp,255,"Clan_%d",entry->clanid);
-
- DBVARIANT dbv;
- if(!DBGetContactSetting(NULL,protocolname,temp,&dbv))
- {
- dummy=dbv.pszVal;
- }
- else
- dummy=NULL;
-
- handlingBuddys(entry,entry->clanid,dummy);
- /* ## ende */
- entriesClan->push_back(entry);
- }
- }
-
- void BuddyList::updateFriendsofFriend(FriendsBuddyListNamesPacket* friends)
- {
- for(uint i = 0 ; i < friends->sids->size() ; i++) {
- BuddyListEntry *entry = getBuddyBySid( friends->sids->at(i) );
- if(entry){
- XDEBUG2("Friends of Friend %s!\n",friends->usernames->at(i).c_str());
- entry->nick=friends->nicks->at(i);
- entry->username=friends->usernames->at(i);
- entry->userid=friends->userids->at(i);
- }else{
- XERROR(("updateFriendsofFriendBuddies: sid not found!\n"));
- }
- }
- }
-
- void BuddyList::updateOnlineBuddies(BuddyListOnlinePacket* buddiesOnline) {
- for(uint i = 0 ; i < buddiesOnline->userids->size() ; i++) {
- BuddyListEntry *entry = getBuddyById( buddiesOnline->userids->at(i) );
- if(entry){
- entry->setSid( buddiesOnline->sids->at(i) );
- //buddies in miranda verarbeiten
- handlingBuddys(entry,0,NULL);
- }else{
- XERROR(("updateOnlineBuddies: Could not find buddy with this sid!\n"));
- }
- }
- }
-
- void BuddyList::updateBuddiesGame(BuddyListGamesPacket* buddiesGames) {
- bool isFirst = buddiesGames->getPacketId() == XFIRE_BUDDYS_GAMES_ID;
- for(uint i = 0 ; i < buddiesGames->sids->size() ; i++) {
- BuddyListEntry *entry = getBuddyBySid( buddiesGames->sids->at(i) );
- if(!entry) {
- //nicht zuordbare sids zuordnen
- XERROR("Add dummy Contact in buddylist for friends of friends!\n");
- BuddyListEntry *newentry = new BuddyListEntry;
- newentry->username = "";
- newentry->userid = 0;
- newentry->nick = "";
- newentry->setSid(buddiesGames->sids->at(i));
- entries->push_back(newentry);
- //nochmal entry suchen
- entry = newentry; //getBuddyBySid( buddiesGames->sids->at(i) );
- }
- if(entry){
- if(isFirst) {
- entry->game = buddiesGames->gameids->at(i);
- delete entry->gameObj; entry->gameObj = NULL;
- } else {
- entry->game2 = buddiesGames->gameids->at(i);
- delete entry->game2Obj; entry->game2Obj = NULL;
- }
- XDEBUG(( "Resolving Game ... \n" ));
- XFireGameResolver *resolver = client->getGameResolver();
- if(resolver) {
- XDEBUG(( "Resolving Game ... \n" ));
- if(isFirst)
- entry->gameObj = resolver->resolveGame( entry->game, i, buddiesGames );
- else
- entry->game2Obj = resolver->resolveGame( entry->game2, i, buddiesGames );
- } else {
- XDEBUG(( "No GameResolver ? :(\n" ));
- }
- XDEBUG(( "%s: Game (%ld): %s / Game2 (%ld): %s\n",
- entry->username.c_str(),
- entry->game,
- (entry->gameObj == NULL ? "UNKNOWN" : entry->gameObj->getGameName().c_str()),
- entry->game2,
- (entry->game2Obj== NULL ? "UNKNOWN" :entry->game2Obj->getGameName().c_str())
- ));
- }else{
- XERROR("updateBuddiesGame: Could not find buddy with this sid!\n");
- }
- }
- }
-
- void BuddyList::receivedPacket(XFirePacket *packet) {
- XFirePacketContent *content = packet->getContent();
- if(content == 0) return;
- XDEBUG2( "hmm... %d\n", content->getPacketId() );
- switch(content->getPacketId()) {
- case XFIRE_BUDDYS_NAMES_ID: {
- XINFO(( "Received Buddy List..\n" ));
- this->initEntries( (BuddyListNamesPacket*)content );
- break;
- }
- case XFIRE_CLAN_BUDDYS_NAMES_ID: {
- XINFO(( "Received Clan Buddy List..\n" ));
- this->initEntriesClan( (ClanBuddyListNamesPacket*)content );
- break;
- }
- //neue nicks updaten, dufte
- case XFIRE_RECVBUDDYCHANGEDNICK: {
- RecvBuddyChangedNick* recvchangednick=(RecvBuddyChangedNick*)content;
- XINFO(( "Received new nick of a buddy..\n" ));
- BuddyListEntry* entry=NULL;
- entry=this->getBuddyById(recvchangednick->userid);
- if(entry) {
- entry->nick=recvchangednick->newnick;
- recvchangednick->entry=(void*)entry;
- handlingBuddys(entry,0,NULL);
- }
- break;
- }
- case XFIRE_BUDDYS_ONLINE_ID: {
- XINFO(( "Received Buddy Online Packet..\n" ));
- this->updateOnlineBuddies( (BuddyListOnlinePacket *)content );
- break;
- }
- case XFIRE_FRIENDS_BUDDYS_NAMES_ID: {
- XINFO(( "Received Friends of Friend..\n" ));
- this->updateFriendsofFriend( (FriendsBuddyListNamesPacket *)content );
- break;
- }
- case XFIRE_BUDDYS_GAMES2_ID:
- case XFIRE_BUDDYS_GAMES_ID: {
- XINFO(( "Recieved the game a buddy is playing..\n" ));
- this->updateBuddiesGame( (BuddyListGamesPacket *)content );
- break;
- }
- case XFIRE_RECVREMOVEBUDDYPACKET: {
- RecvRemoveBuddyPacket *p = (RecvRemoveBuddyPacket*)content;
- XDEBUG2( "Buddy was removed from contact list (userid: %ld)\n", p->userid );
- std::vector<BuddyListEntry *>::iterator i = entries->begin();
- while( i != entries->end() ) {
- if((*i)->userid == p->userid) {
- BuddyListEntry *buddy = *i;
- XINFO(( "%s (%s) was removed from BuddyList.\n", buddy->username.c_str(), buddy->nick.c_str() ));
- p->username = buddy->username;
- p->handle = buddy->hcontact; // handle übergeben - dufte
- entries->erase(i);
- // i.erase();
- break; // we are done.
- }
- ++i;
- }
- break;
- }
- case XFIRE_RECV_STATUSMESSAGE_PACKET_ID: {
- RecvStatusMessagePacket *status = (RecvStatusMessagePacket*) content;
-
- //status->entries=new PBuddyListEntry[status->sids->size];
-
- for(uint i = 0 ; i < status->sids->size() ; i++) {
- BuddyListEntry *entry = getBuddyBySid( status->sids->at(i) );
- //status->entries[i]=entry;
-
- if(entry == NULL) {
- XERROR(( "No such Entry - Got StatusMessage from someone who is not in the buddylist ??\n" ));
- return;
- }
- else
- {
- entry->statusmsg = status->msgs->at(i).c_str();
- setBuddyStatusMsg(entry,entry->statusmsg); //auf eine funktion reduziert, verringert cpuauslastung und beseitigt das
- //das problem der fehlenden statusmsg
- }
- }
-
- break;
- }
- }
- }
-
- BuddyListEntry::~BuddyListEntry() {
- if(lastpopup) {
- delete[] lastpopup;
- lastpopup=NULL;
- }
- }
-
- BuddyListEntry::BuddyListEntry() {
- memset(sid,0,16);
- statusmsg = std::string();
- game = 0;
- game2 = 0;
- gameObj = NULL;
- game2Obj = NULL;
- hcontact = NULL;
- clanid = 0;
- lastpopup=NULL;
- }
- bool BuddyListEntry::isOnline() {
- for(int i = 0 ; i < 16 ; i++) {
- if(sid[i]) return true;
- }
- return false;
- }
- void BuddyListEntry::setSid(const char *sid) {
- int s=0;
- for(int i = 0 ; i < 16 ; i++) { //wenn buddy offline geht, seine gameinfos zurücksetzen - dufte
- if(sid[i])
- {
- s=1;
- break;
- }
- }
- if(s)
- {
- this->statusmsg = std::string();
- this->game = 0;
- this->game2 = 0;
- this->gameObj = NULL;
- this->game2Obj = NULL;
- }
- memcpy(this->sid,sid,16);
- }
-};
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylist.h b/plugins/!NotAdopted/Xfire/xfiretest/buddylist.h
deleted file mode 100644
index 7ab1e26878..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylist.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __BUDDYLIST_H
-#define __BUDDYLIST_H
-
-#include <iostream>
-#include <vector>
-
-#include "buddylistnamespacket.h"
-#include "clanbuddylistnamespacket.h"
-#include "buddylistgamespacket.h"
-#include "buddylistonlinepacket.h"
-#include "packetlistener.h"
-#include "client.h"
-#include "xfiregame.h"
-#include "friendsoffriendlist.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- struct Client;
- struct BuddyListEntry;
-
- class BuddyList : public PacketListener {
- public:
- BuddyList(Client *client);
- ~BuddyList();
-
- vector <BuddyListEntry *> * getEntries() { return entries; }
- vector <BuddyListEntry *> * getEntriesClan() { return entriesClan; }
-
- void receivedPacket(XFirePacket *packet);
- BuddyListEntry *getBuddyById(long userid);
- BuddyListEntry *getBuddyBySid(const char *sid);
- BuddyListEntry *getBuddyByName(string username);
- private:
- void initEntries(BuddyListNamesPacket* buddynames);
- void initEntriesClan(ClanBuddyListNamesPacket* buddynames);
- void updateOnlineBuddies(BuddyListOnlinePacket* buddiesOnline);
- void updateBuddiesGame(BuddyListGamesPacket* buddiesGames);
- void updateFriendsofFriend(FriendsBuddyListNamesPacket* friends);
-
- Client *client;
- vector <BuddyListEntry *> * entries;
- vector <BuddyListEntry *> * entriesClan;
- };
-
-
- class BuddyListEntry {
- public:
- BuddyListEntry();
- ~BuddyListEntry();
- bool isOnline();
-
- void setSid(const char *sid);
-
- long userid;
- char sid[16];
- string nick;
- string username;
- string statusmsg;
- string gameinfo;
- long game;
- long game2;
- HANDLE hcontact;
- int clanid;
-
- //lastpopup
- char* lastpopup;
-
- XFireGame *gameObj;
- XFireGame *game2Obj;
- };
-
- typedef BuddyListEntry *PBuddyListEntry;
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.cpp b/plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.cpp
deleted file mode 100644
index 2252339908..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "buddylistgames2packet.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- BuddyListGames2Packet::BuddyListGames2Packet() : BuddyListGamesPacket() {
-
- }
- void BuddyListGames2Packet::parseContent(char *buf, int length, int numberOfAtts) {
- XDEBUG( "....Parsing Packet Content of game 2 ??\n" )
- this->BuddyListGamesPacket::parseContent(buf,length,numberOfAtts);
- XDEBUG2( "Parsed Packet Content of game 2 ??? ( %ld )\n", gameids->at(0) )
- }
-
-};
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.h b/plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.h
deleted file mode 100644
index 81fe92eecb..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgames2packet.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __BUDDYLISTGAMES2PACKET_H
-#define __BUDDYLISTGAMES2PACKET_H
-
-#define XFIRE_BUDDYS_GAMES2_ID 147
-
-#include "buddylistgamespacket.h"
-
-namespace xfirelib {
-
- class BuddyListGames2Packet : public BuddyListGamesPacket {
- public:
- BuddyListGames2Packet();
- XFirePacketContent* newPacket() { return new BuddyListGames2Packet(); }
- virtual int getPacketId() { return XFIRE_BUDDYS_GAMES2_ID; }
- virtual void parseContent(char *buf, int length, int numberOfAtts);
- };
-
-};
-
-
-#endif
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.cpp
deleted file mode 100644
index 4ba878951b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include <vector>
-#include <string>
-
-#include "buddylistgamespacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- BuddyListGamesPacket::BuddyListGamesPacket() {
- ips = 0;
- ports = 0;
- gameids = 0;
- gameids2 = 0;
- sids = 0;
- type = 0;
- }
- BuddyListGamesPacket::~BuddyListGamesPacket() {
- if(ips) {
- for( vector<char*>::iterator it = ips->begin() ;
- it != ips->end() ; it++) {
- delete[] *it;
- }
- }
- delete ips;
- delete ports;
- delete gameids;
- delete gameids2;
- delete sids;
- }
-
- void BuddyListGamesPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
- int numberOfSids = 0;
- VariableValue val;
-
- index += val.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 03
- numberOfSids = (unsigned char) buf[index];
- index ++; // Ignore 00
- index ++;
- sids = new vector<char *>;
- for(int i = 0 ; i < numberOfSids ; i++) {
- index += val.readValue(buf,index,16);
- char *sid = new char[16];
- memcpy(sid,val.getValue(),16);
- sids->push_back(sid);
- }
-
- index += val.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 03
- numberOfSids = (unsigned char) buf[index];
- index ++; // Ignore 00
- index ++;
-
- gameids = new vector<long>;
- gameids2 = new vector<long>;
- for(int i = 0 ; i < numberOfSids ; i++) {
- index += val.readValue(buf,index,2);
- long game = val.getValueAsLong();
- index += val.readValue(buf,index,2);
- long game2 = val.getValueAsLong();
- gameids->push_back(game);
- gameids2->push_back(game2);
- }
-
- index += val.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 03
- numberOfSids = (unsigned char) buf[index];
- index ++; // Ignore 00
- index ++;
-
- ips = new vector<char *>;
- for(int i = 0 ; i < numberOfSids ; i++) {
- index += val.readValue(buf,index,4);
- char *ip = new char[4];
- memcpy(ip,val.getValue(),4);
- ips->push_back(ip);
- }
-
- index += val.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 03
- numberOfSids = (unsigned char) buf[index];
- index ++; // Ignore 00
- index ++;
-
-// static int was=0;
-// int portwasnull=0;
-
-
-// was++;
-
- ports = new vector<long>;
- for(int i = 0 ; i < numberOfSids ; i++) {
- index += val.readValue(buf,index,2);
- long port = val.getValueAsLong();
-// if(port==0)
-// {
-// portwasnull=1;
-// }
- ports->push_back(port);
- index += 2; // fixed port bug - dufte
- }
-
-// char temp[512];
- /* sprintf(temp,"packet%d_%d.dmp",was,portwasnull);
- FILE * f = fopen(temp,"wb");
- fwrite(buf,length,1,f);
- fclose(f);*/
-
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.h b/plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.h
deleted file mode 100644
index ba0264c29e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistgamespacket.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __BUDDYLISTGAMESPACKET_H
-#define __BUDDYLISTGAMESPACKET_H
-
-#define XFIRE_BUDDYS_GAMES_ID 135
-
-#include <vector>
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- class BuddyListGamesPacket : public XFireRecvPacketContent {
- public:
- BuddyListGamesPacket();
- virtual ~BuddyListGamesPacket();
-
- XFirePacketContent* newPacket() { return new BuddyListGamesPacket(); }
-
- virtual int getPacketId() { return XFIRE_BUDDYS_GAMES_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- virtual void parseContent(char *buf, int length, int numberOfAtts);
-
- vector<char *> *ips;
- vector<long> *ports;
- vector<long> *gameids;
- vector<long> *gameids2;
- vector<char *> *sids;
- int type;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.cpp
deleted file mode 100644
index 80e962fe4d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include <vector>
-#include <string>
-
-#include "buddylistnamespacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- BuddyListNamesPacket::BuddyListNamesPacket() {
- usernames = 0;
- nicks = 0;
- userids = 0;
- }
- BuddyListNamesPacket::~BuddyListNamesPacket() {
- delete usernames;
- delete nicks;
- delete userids;
- }
-
- void BuddyListNamesPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
- //prüfe ob das packet mit 0x7 anfängt um eventuell crashes zufixen
- if(buf[0]!=0x7)
- {
- usernames = new vector<string>;
- nicks = new vector<string>;
- userids = new vector<long>;
- return;
- }
-
- // friends
- VariableValue friends;
- index += friends.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 01, dufte skip 1
-
- usernames = new vector<string>;
- index = readStrings(usernames,buf,index);
-
- index += friends.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 01, dufte skip 1
-
- nicks = new vector<string>;
- index = readStrings(nicks,buf,index);
-
- index += friends.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 01, dufte skip 1
-
- index += friends.readValue(buf,index,2); // 2 bytes lesen, für große mengen an friends
- userids = new vector<long>;
- int numberOfIds = friends.getValueAsLong();
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += friends.readValue(buf,index,4);
- userids->push_back(friends.getValueAsLong());
- XDEBUG2( "UserID: %ld\n", friends.getValueAsLong() );
- }
- }
-
- int BuddyListNamesPacket::readStrings(vector<string> *strings, char *buf, int index) {
- VariableValue friends;
- index += friends.readValue(buf,index,2); //jeweils 2 bytes lesen
- //index ++; // Ignore 00 0 brauch nicht mehr geskippt werden
- int numberOfStrings = friends.getValueAsLong();
- XDEBUG3( "name: %s numberOfStrings: %d\n", friends.getName().c_str(), numberOfStrings );
- for(int i = 0 ; i < numberOfStrings ; i++) {
- int length = (unsigned char)buf[index++];
- index++;
- index += friends.readValue(buf,index,length);
- string stringvalue = string(friends.getValue(),length);
- strings->push_back(stringvalue);
- XDEBUG3( "String length: %2d : %s\n", length, stringvalue.c_str() );
- }
- return index;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.h b/plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.h
deleted file mode 100644
index 5c50f4f110..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistnamespacket.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __BUDDYLISTNAMESPACKET_H
-#define __BUDDYLISTNAMESPACKET_H
-
-#define XFIRE_BUDDYS_NAMES_ID 131
-
-#include <vector>
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- class BuddyListNamesPacket : public XFireRecvPacketContent {
- public:
- BuddyListNamesPacket();
- virtual ~BuddyListNamesPacket();
-
- XFirePacketContent* newPacket() { return new BuddyListNamesPacket(); }
-
- int getPacketId() { return XFIRE_BUDDYS_NAMES_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- //private:
- int readStrings(vector<string> *strings, char *buf, int index);
-
- vector<string> *usernames;
- vector<string> *nicks;
- vector<long> *userids;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.cpp
deleted file mode 100644
index 3dd726d4e9..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#include "stdafx.h"
-#include "buddylistonlinepacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include <vector>
-#include "xdebug.h"
-#include <iostream>
-
-namespace xfirelib {
- 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>;
-
- /* 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); */
-
- 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);
- //for(int loop = 0; loop < userid.getValueLength();loop++){
- // XINFO(( "SID: %d\n", userid.getValue()[loop] ));
- //}
- }
-
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.h
deleted file mode 100644
index 1f9b432b63..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/buddylistonlinepacket.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __BUDDYLISTONLINEPACKET_H
-#define __BUDDYLISTONLINEPACKET_H
-
-#include <vector>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-
-#define XFIRE_BUDDYS_ONLINE_ID 132
-
-namespace xfirelib {
-using namespace std;
- class BuddyListOnlinePacket : public XFireRecvPacketContent {
- public:
- XFirePacketContent* newPacket() { return new BuddyListOnlinePacket(); }
-
-
- int getPacketId() { return XFIRE_BUDDYS_ONLINE_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- vector<long> *userids;
- vector<char *> *sids;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.cpp
deleted file mode 100644
index 2a1b4c77a6..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include <vector>
-#include <string>
-
-#include "clanbuddylistnamespacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- ClanBuddyListNamesPacket::ClanBuddyListNamesPacket() {
- usernames = 0;
- nicks = 0;
- userids = 0;
- clanid = 0;
- }
- ClanBuddyListNamesPacket::~ClanBuddyListNamesPacket() {
- delete usernames;
- delete nicks;
- delete userids;
- }
-
- void ClanBuddyListNamesPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
-
- VariableValue friends;
-
- XDEBUG2( "Len: %ld\n", length );
-
- index+=2; //paar bytes überspringen
-
- index += friends.readValue(buf,index,2);
- this->clanid = friends.getValueAsLong();
-
- index+=4; //paar bytes überspringen
-
- userids = new vector<long>;
-
- index += friends.readValue(buf,index);
-
- int numberOfIds = friends.getValueAsLong();
-
- XDEBUG2( "numberofId: %ld\n", numberOfIds );
-
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += friends.readValue(buf,index,4);
- userids->push_back(friends.getValueAsLong());
- XDEBUG3( "UserID: %ld %ld\n",i+1, friends.getValueAsLong() );
- }
-
- XDEBUG2( "NextByte: %ld\n",buf[index] );
- XDEBUG2( "NextByte: %ld\n",buf[index+1] );
-
- index+=3; //nächsten 3 skippen
-
- XDEBUG2( "NextByte: %ld\n",buf[index] );
- XDEBUG2( "NextByte: %ld\n",buf[index+1] );
-
- usernames = new vector<string>;
- index = readStrings(usernames,buf,index);
-
- index+=3; //nächsten 3 skippen
-
- nicks = new vector<string>;
- index = readStrings(nicks,buf,index);
-
- }
-
- int ClanBuddyListNamesPacket::readStrings(vector<string> *strings, char *buf, int index) {
- VariableValue friends;
- index += friends.readValue(buf,index,2);
- //index ++; // Ignore 00
- int numberOfStrings = friends.getValueAsLong();
- XDEBUG3( "name: %s numberOfStrings: %d\n", friends.getName().c_str(), numberOfStrings );
- for(int i = 0 ; i < numberOfStrings ; i++) {
- int length = (unsigned char)buf[index++];
- index++;
- index += friends.readValue(buf,index,length);
- string stringvalue = string(friends.getValue(),length);
- strings->push_back(stringvalue);
- XDEBUG(( "String length: %2d : %s\n", length, stringvalue.c_str() ));
- }
- return index;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.h b/plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.h
deleted file mode 100644
index f47fc694f7..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clanbuddylistnamespacket.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __CLANBUDDYLISTNAMESPACKET_H
-#define __CLANBUDDYLISTNAMESPACKET_H
-
-#define XFIRE_CLAN_BUDDYS_NAMES_ID 159
-
-#include <vector>
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- class ClanBuddyListNamesPacket : public XFireRecvPacketContent {
- public:
- ClanBuddyListNamesPacket();
- virtual ~ClanBuddyListNamesPacket();
-
- XFirePacketContent* newPacket() { return new ClanBuddyListNamesPacket(); }
-
- int getPacketId() { return XFIRE_CLAN_BUDDYS_NAMES_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 10024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- //private:
- int readStrings(vector<string> *strings, char *buf, int index);
-
- long clanid;
- vector<string> *usernames;
- vector<string> *nicks;
- vector<long> *userids;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.cpp
deleted file mode 100644
index 08fb2b2267..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include <vector>
-#include <string>
-
-#include "claninvitationpacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- ClanInvitationPacket::ClanInvitationPacket() {
- }
- ClanInvitationPacket::~ClanInvitationPacket() {
- }
-
- void ClanInvitationPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
- numberOfInv = 0;
- VariableValue val;
-
- index+=0x3; //einige bytes überspringen
-
- numberOfInv=buf[index];
- XDEBUG2("Invs %d\n",numberOfInv);
-
- index+=2; // überspring 0
-
- //clan id's überspringen, wird eh nicht gebraucht
- for(int i=0;i<numberOfInv;i++)
- index+=4;
-
- index++; // 0x72 überspringen
-
- index+=4; // weitere bytes überspringen
-
- //clanidnamen überspringen
- for(int i=0;i<numberOfInv;i++)
- {
- int length = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,length);
- string stringvalue = string(val.getValue(),length);
- XDEBUG2("Clanidnames von %s\n",stringvalue.c_str());
- }
-
- //weitere 5 bytes überspringen
- index+=5;
-
- for(int i=0;i<numberOfInv;i++)
- {
- int length = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,length);
- string stringvalue = string(val.getValue(),length);
- XDEBUG2("Inv von %s\n",stringvalue.c_str());
- clanname[i]=stringvalue;
- }
-
- //weitere 5 bytes skippen
- index+=5;
-
- //weitere leere bytes skippen, weis nich was für einen sinn haben
- for(int i=0;i<numberOfInv;i++)
- index+=4;
-
- //weitere 5 bytes skippen
- index+=5;
-
- //usernames auslesen
- for(int i=0;i<numberOfInv;i++)
- {
- int length = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,length);
- string stringvalue = string(val.getValue(),length);
- XDEBUG2("Usernames von %s\n",stringvalue.c_str());
- invitefromusername[i]=stringvalue;
- }
-
- //nochmal weitere 5 bytes skippen
- index+=5;
-
- //nicks auslesen
- for(int i=0;i<numberOfInv;i++)
- {
- int length = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,length);
- string stringvalue = string(val.getValue(),length);
- XDEBUG2("Nicks von %s\n",stringvalue.c_str());
- invitefrom[i]=stringvalue;
- }
-
- //nochmal weitere 5 bytes skippen
- index+=5;
-
- //einladungen auslesen
- for(int i=0;i<numberOfInv;i++)
- {
- int length = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,length);
- string stringvalue = string(val.getValue(),length);
- XDEBUG2("Nicks von %s\n",stringvalue.c_str());
- invitemsg[i]=stringvalue;
- }
-
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.h
deleted file mode 100644
index b595c5ba9c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/claninvitationpacket.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __CLANINVITATION_H
-#define __CLANINVITATION_H
-
-#define XFIRE_CLANINVITATION_ID 165
-
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-namespace xfirelib {
- using namespace std;
-
- class ClanInvitationPacket : public XFireRecvPacketContent {
- public:
- ClanInvitationPacket();
- virtual ~ClanInvitationPacket();
-
- XFirePacketContent* newPacket() { return new ClanInvitationPacket(); }
-
- virtual int getPacketId() { return XFIRE_CLANINVITATION_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- virtual void parseContent(char *buf, int length, int numberOfAtts);
-
- //maximal 10 inv, mehr wird denk ich äh nich aufeinmal auftreten
- string clanname[10];
- string invitefrom[10];
- string invitefromusername[10];
- string invitemsg[10];
-
- int numberOfInv;
- };
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/client.cpp b/plugins/!NotAdopted/Xfire/xfiretest/client.cpp
deleted file mode 100644
index 4800482e27..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/client.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "xdebug.h"
-#include "client.h"
-#include "clientinformationpacket.h"
-#include "clientversionpacket.h"
-#include "xfirepacket.h"
-#include "authpacket.h"
-#include "clientloginpacket.h"
-#include "buddylistnamespacket.h"
-#include "messagepacket.h"
-#include "sendmessagepacket.h"
-#include "messageackpacket.h"
-#include "recvoldversionpacket.h"
-#include "sendkeepalivepacket.h"
-
-#include "baseProtocol.h"
-
-#include <iostream>
-
-//#define XFIRE_HOST "cs.xfire.com"
-#define XFIRE_HOST "206.220.42.147"
-#define XFIRE_PORT 25999
-
-extern BOOL mySleep(int ms,HANDLE evt);
-extern HANDLE hConnectionClose;
-extern WINBASEAPI
-BOOL
-WINAPI
-ResetEvent(
- __in HANDLE hEvent
- );
-
-//#define UINT_8 unsigned char
-//#define UINT_32 unsigned long
-
-namespace xfirelib {
-
-using namespace std;
-
- Client::Client() {
- XDEBUG(("Client constructor ...\n"));
- gameResolver = NULL;
- packetReader = new PacketReader(NULL);
- packetReader->addPacketListener( this );
- buddyList = new BuddyList( this );
- socket=NULL;
-#ifndef NO_PTHREAD
- sendpingthread.p=NULL;
- readthread.p=NULL;
-#endif
- }
-
- Client::~Client(){
- XDEBUG(("Client destructor ...\n"));
- delete username;
- delete password;
- delete buddyList;
- delete packetReader;
- delete socket;
- }
-
- void Client::connect( string username, string password, int useproxy, string proxyip, int proxyport) {
- try {
- this->gotBudduyList=FALSE;
- this->username = new string(username);
- this->password = new string(password);
- socket = new Socket( XFIRE_HOST, XFIRE_PORT,useproxy,proxyip,proxyport );
-
- //bevors losgeht, erstmal die localaddr sichern
- struct sockaddr_in sa;
- int iLen = sizeof(sa);
- getsockname(socket->m_sock, (SOCKADDR*)&sa, &iLen);
- strcpy(this->localaddr,inet_ntoa(sa.sin_addr));
- this->llocaladdr=inet_addr(this->localaddr);
-
- packetReader->setSocket(socket);
-
- ResetEvent(hConnectionClose);
-
- startThreads();
- //packetReader->startListening();
-
-
- socket->send("UA01");
- XDEBUG(("Sent UA01\n"));
- ClientInformationPacket *infoPacket = new ClientInformationPacket();
- this->send( infoPacket );
- delete infoPacket;
- XINFO(("sent ClientInformationPacket\n"));
-
- ClientVersionPacket *versionPacket = new ClientVersionPacket();
- versionPacket->setProtocolVersion( protocolVersion);
- this->send( versionPacket );
- delete versionPacket;
-
- XINFO(("sent ClientVersionPacket\n"));
- this->connected=TRUE;
- } catch( SocketException ex ) {
- XERROR(("Socket Exception ?! %s \n",ex.description().c_str() ));
- this->connected=FALSE;
- }
- }
- XFireGameResolver *Client::getGameResolver() {
- return gameResolver;
- }
- void Client::startThreads() {
- XINFO(("About to start thread\n"));
-#ifndef NO_PTHREAD
- void* (*func)(void*) = &xfirelib::Client::startReadThread;
- pthread_create( &readthread, NULL, func, (void*)this );
- void* (*func2)(void*) = &xfirelib::Client::startSendPingThread;
- pthread_create( &sendpingthread, NULL, func2, (void*)this );
-#else
- //mir_create!!!!
- mir_forkthread(xfirelib::Client::startReadThread,(LPVOID)this);
- mir_forkthread(xfirelib::Client::startSendPingThread,(LPVOID)this);
-#endif
- }
-#ifndef NO_PTHREAD
- void *Client::startReadThread(void *ptr) {
-#else
- void Client::startReadThread(LPVOID lParam) {
- void* ptr=(void*)lParam;
-#endif
- if(ptr==NULL||((Client*)ptr)->packetReader==NULL)
-#ifndef NO_PTHREAD
- return NULL;
-#else
- return;
-#endif
- try {
- ((Client*)ptr)->packetReader->run();
- } catch (SocketException ex) {
- XERROR(("Socket Exception ?! %s \n",ex.description().c_str() ));
-
- //miranda bescheid geben, wir haben verbindung verloren
- if(ptr==NULL||((Client*)ptr)->connected) SetStatus(ID_STATUS_OFFLINE,NULL);
-
- //((Client*)ptr)->disconnect();
- }
-#ifndef NO_PTHREAD
- return NULL;
-#else
- return;
-#endif
- }
-
-#ifndef NO_PTHREAD
- void *Client::startSendPingThread(void *ptr) {
- Client *me = (Client*)ptr;
-#else
- void Client::startSendPingThread(LPVOID lParam) {
- Client *me = (Client*)lParam;
-#endif
- SendKeepAlivePacket packet;
-
- while(1) {
-#ifndef NO_PTHREAD
- pthread_testcancel();
-#endif
- //Sleep(60000); // Sleep for 40 sek
- if(mySleep(60000,hConnectionClose))
- {
-#ifndef NO_PTHREAD
- return NULL;
-#else
- return;
-#endif
- }
-#ifndef NO_PTHREAD
- pthread_testcancel();
-#endif
- XDEBUG(( "Sending KeepAlivePacket\n" ));
- if(!me->send( &packet )) {
- XINFO(( "Could not send KeepAlivePacket... exiting thread.\n" ));
- break;
- }
- }
-#ifndef NO_PTHREAD
- return NULL;
-#else
- return;
-#endif
- }
-
- void Client::disconnect() {
- this->connected=FALSE;
-
- //socket vom packetreader auf NULL, damit die readschleife geschlossen wird
- if(this->packetReader!=NULL)
- this->packetReader->setSocket(NULL);
-
- XDEBUG( "cancelling readthread ... \n");
-#ifndef NO_PTHREAD
- if(readthread.p!=NULL) pthread_cancel (readthread);
- readthread.p=NULL;
-
- XDEBUG( "cancelling sendpingthread ... \n");
- if(sendpingthread.p!=NULL) pthread_cancel (sendpingthread);
- sendpingthread.p=NULL;
-#endif
-
- XDEBUG( "deleting socket ...\n" );
- if(socket){
- delete socket;
- socket = NULL;
- }
- XDEBUG(( "done\n" ));
- }
-
- bool Client::send( XFirePacketContent *content ) {
- if(!socket) {
- XERROR(( "Trying to send content packet altough socket is NULL ! (ignored)\n" ));
- return false;
- }
- XFirePacket *packet = new XFirePacket(content);
- packet->sendPacket( socket );
- delete packet;
- return true;
- }
-
- void Client::addPacketListener( PacketListener *listener ) {
- packetReader->addPacketListener( listener );
- }
-
-
- void Client::receivedPacket( XFirePacket *packet ) {
- XDEBUG(("Client::receivedPacket\n"));
- if( packet == NULL ) {
- XERROR(("packet is NULL !!!\n"));
- return;
- }
- if( packet->getContent() == NULL ) {
- XERROR(("ERRRR getContent() returns null ?!\n"));
- return;
- }
- XFirePacketContent *content = packet->getContent();
-
- switch( content->getPacketId() ) {
- case XFIRE_PACKET_AUTH_ID: {
- XINFO(("Got Auth Packet .. Sending Login\n"));
- AuthPacket *authPacket = (AuthPacket*)packet->getContent();
-
- ClientLoginPacket *login = new ClientLoginPacket();
- login->setSalt( authPacket->getSalt() );
- login->setUsername( *username );
- login->setPassword( *password );
- send( login );
- delete login;
- break;
- }
-
- case XFIRE_MESSAGE_ID: {
- XDEBUG(( "Got Message, sending ACK\n" ));
- MessagePacket *message = (MessagePacket*)packet->getContent();
- if(message->getMessageType() == 0){
- MessageACKPacket *ack = new MessageACKPacket();
- memcpy(ack->sid,message->getSid(),16);
- ack->imindex = message->getImIndex();
- send( ack );
- delete ack;
- }else if(message->getMessageType() == 2){
- send(message);
- }
- break;
- }
-
- default:
- //cout << "Nothing here ... " << endl;
- break;
- }
-
- }
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/client.h b/plugins/!NotAdopted/Xfire/xfiretest/client.h
deleted file mode 100644
index 5822c6c27e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/client.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __CLIENT_H
-#define __CLIENT_H
-
-#include "stdafx.h"
-
-#ifndef NO_PTHREAD
- #include <pthread.h>
-#endif
-
-#include <string>
-#include "packetreader.h"
-#include "xfirepacketcontent.h"
-#include "packetlistener.h"
-#include "buddylist.h"
-#include "xfiregameresolver.h"
-
-namespace xfirelib {
- struct BuddyList;
-
-class Client : public PacketListener {
- public:
- Client();
- ~Client();
- //proxy hinzugefügt dufte
- void connect(std::string username, std::string password,int useproxy=0,string proxyip="",int proxyport=0);
- /**
- * Sends a XFirePacketContent (does NOT delete content)
- * Returns true if sent successfully.
- */
- bool send(XFirePacketContent *content);
-
- BuddyList *getBuddyList() { return buddyList; }
- void addPacketListener(PacketListener *packetListener);
- void disconnect();
- void sendMessage(string username, string message);
- void sendNickChange(string nick);
- XFireGameResolver *getGameResolver();
- void setGameResolver(XFireGameResolver *resolver) {
- delete this->gameResolver;
- this->gameResolver = resolver;
- }
-
- BOOL gotBudduyList;
- BOOL connected;
- char protocolVersion;
- char localaddr[18];
- unsigned long llocaladdr;
-
- protected:
- void receivedPacket( XFirePacket *packet );
- void startThreads();
-#ifndef NO_PTHREAD
- static void *startReadThread(void *ptr);
- static void *startSendPingThread(void *ptr);
-#else
- static void startReadThread(LPVOID lParam);
- static void startSendPingThread(LPVOID lParam);
-#endif
- private:
- XFireGameResolver *gameResolver;
- PacketReader *packetReader;
- std::string *username;
- std::string *password;
- Socket *socket;
- BuddyList *buddyList;
-#ifndef NO_PTHREAD
- pthread_t readthread;
- pthread_t sendpingthread;
-#endif
-};
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.cpp
deleted file mode 100644
index f0d65e8a00..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "clientinformationpacket.h"
-#include "xfireutils.h"
-#include <string.h>
-#include <iostream>
-
-namespace xfirelib {
- using namespace std;
-
- int ClientInformationPacket::getPacketContent(char *packet) {
- int index = 0;
- int skins = 2;
- int i;
-
- index = XFireUtils::addAttributName(packet,index, "skin");/*add skin*/
- packet[index++] = 0x04;
- packet[index++] = 0x01;
- packet[index++] = (char)skins;
- packet[index++] = 0x00;
- packet[index++] = strlen("Standard");
- packet[index++] = 0x00;
-
- memcpy(packet+index,"Standard",strlen("Standard"));/*add first skin name*/
- index += strlen("Standard");
-
- packet[index++] = strlen("XFire");
- packet[index++] = 0x00;
-
- memcpy(packet+index,"XFire",strlen("XFire"));/*add second skin name*/
- index += strlen("XFire");
-
- VariableValue val;
- val.setName( "version" );
- index += val.writeName( packet, index );
- //index = XFireUtils::addAttributName(packet,index, "version");/*add version of skins*/
- packet[index++] = 0x04;
- packet[index++] = 0x02;
- packet[index++] = (char)skins;
- packet[index++] = 0x00;
-
- for(i = 0;i < skins;i++){/*(forEachSkin){ 01 00 00 00 }*/
- packet[index++] = 0x01;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
- }
- length = index;
- return index;
- }
-
- int ClientInformationPacket::getPacketAttributeCount() {
- return 2;
- }
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.h
deleted file mode 100644
index 533e3fbc91..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clientinformationpacket.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __CLIENTINFORMATIONPACKET_H
-#define __CLIENTINFORMATIONPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-
-#include <string>
-
-namespace xfirelib {
-
- /**
- * (Internal) packet used by Client::login( std::string, std::string )
- * Users of xfirelib won't need this packet.
- */
- class ClientInformationPacket : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new ClientInformationPacket(); }
-
- int getPacketId() { return 18; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 46; };
- void parseContent(char *buf, int length, int numberOfAtts) { };
- std::string skinname;
- private:
- int length;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.cpp
deleted file mode 100644
index 30a28cc7eb..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "clientloginpacket.h"
-#include "xfireutils.h"
-#include "SHA1.h"
-#include <string.h>
-#include <iostream>
-
-namespace xfirelib {
- using namespace std;
-
- int ClientLoginPacket::getPacketContent(char *packet) {
- int index = 0;
- /*Username*/
-
- index = XFireUtils::addAttributName(packet,index, "name");/*add username attribute*/
- packet[index] = 0x01;
- packet[index+1] = (char)name.length();
- packet[index+2] = 0x00;
- index +=3;
- std::copy(name.begin(),name.end(),packet+index);
- index += name.size();
-
- /*Crypted Password*/
- unsigned char pass[41];
- pass[40] = 0x00;
- cryptPassword(pass);
- index = XFireUtils::addAttributName(packet,index, "password");/*add username attribute*/
- packet[index] = 0x01;
- packet[index+1] = (char)40;
- packet[index+2] = 0x00;
- index += 3;
-
- memcpy(packet+index,pass,40);
- index += 40;
-
- VariableValue val;
- val.setName( "flags" );
- index += val.writeName( packet, index );
- packet[index++] = 0x02;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
-
- val.setName( "sid" );
- index += val.writeName( packet, index );
- packet[index++] = 0x03;
-
- for(int i=0;i<16;i++)
- {
- packet[index++] = 0x0;
- }
-
- length = index;
- return index;
- }
-
- int ClientLoginPacket::getPacketAttributeCount() {
- return 3;
- }
-
- void ClientLoginPacket::cryptPassword(unsigned char *crypt){
- std::string total;
- char temp[81];
- CSHA1 sha1;
-
- total = name+password+"UltimateArena";
- hashSha1(total.c_str(),crypt);
- memcpy(temp,crypt,40);
- memcpy(temp+40,salt->getValue(),40);
- temp[80] = 0x00;
-
- hashSha1(temp,crypt);
- }
-
-
-
-/*give string and you will get the hash*/
-void ClientLoginPacket::hashSha1(const char *string, unsigned char *sha){
-
- char result[41];
- unsigned char temp[1024];
- CSHA1 sha1;
- sha1.Reset();
- sha1.Update((UINT_8 *)string, strlen(string));
- sha1.Final();
- sha1.GetHash(temp);
-
- result[0] = 0;
- char szTemp[16];
- for(int i = 0 ; i < 20 ; i++) {
- sprintf(szTemp, "%02x", temp[i]);
- strcat(result,szTemp);
- }
- memcpy(sha,result,40);
- sha[40] = 0x00;
-}
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.h
deleted file mode 100644
index 56f8641b25..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clientloginpacket.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __CLIENTLOGINPACKET_H
-#define __CLIENTLOGINPACKET_H
-
-
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-#include <string.h>
-
-namespace xfirelib {
-
- /**
- * (Internal) Packet used to send login/authorization data.
- * Users of xfirelib should not use it, call
- * Client::connect( std::string username, std::string password )
- * instead.
- */
- class ClientLoginPacket : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new ClientLoginPacket(); }
-
- int getPacketId() { return 1; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 1024; };
- void setUsername(std::string name) {this->name = name;}
- void setPassword(std::string password) {this->password = password; };
-
- /**
- *Set the salt the server sent us to crypt the password
- *@param salt The VariableValue object that we extracted from the packet
- */
- void setSalt(VariableValue *salt) {this->salt = salt; };
-
- void parseContent(char *buf, int length, int numberOfAtts) { };
- private:
- void cryptPassword(unsigned char *crypt);
- void hashSha1(const char *string, unsigned char *sha);
- int length;
- std::string name;
- std::string password;
- VariableValue *salt;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.cpp
deleted file mode 100644
index 3150eac746..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "clientversionpacket.h"
-#include "xfireutils.h"
-#include <string.h>
-
-namespace xfirelib {
-
- int ClientVersionPacket::getPacketContent(char *packet) {
- int index = 0;
-
- index = XFireUtils::addAttributName(packet,index, "version");/*add xfire version*/
- packet[index] = 0x02;
- packet[index+1] = (char) version;//protocol version
- packet[index+2] = 0x00;
- packet[index+3] = 0x00;
- packet[index+4] = 0x00;
- index += 5;
- length = index;
- return index;
- }
-
- int ClientVersionPacket::getPacketAttributeCount() {
- return 1;
- }
-
- void ClientVersionPacket::setProtocolVersion(int newVersion){
- version = newVersion;
- }
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.h
deleted file mode 100644
index 4c40b1875a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/clientversionpacket.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __CLIENTVERSIONPACKET_H
-#define __CLIENTVERSIONPACKET_H
-
-#include "xfiresendpacketcontent.h"
-
-namespace xfirelib {
-
- /**
- * (Internal) Packet used to send client version information.
- * it is sent in Client::connect( std::string, std::string )
- * so users of xfirelib won't need this packet.
- */
- class ClientVersionPacket : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new ClientVersionPacket(); }
-
- int getPacketId() { return 3; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 1024; };
- void setProtocolVersion(int version);
- void parseContent(char *buf, int length, int numberOfAtts) { };
- private:
- int length;
- int version;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/d_xfire.ico b/plugins/!NotAdopted/Xfire/xfiretest/d_xfire.ico
deleted file mode 100644
index 6855c0b9dd..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/d_xfire.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.cpp b/plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.cpp
deleted file mode 100644
index 5189c8ef9b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "dummyxfiregameresolver.h"
-#include "xdebug.h"
-
-namespace xfirelib {
-
- XFireGame *DummyXFireGameResolver::resolveGame(int gameid, int iterator, BuddyListGamesPacket *packet) {
- XDEBUG2( "Resolving GameId: %d\n", gameid );
- DummyXFireGame *game = new DummyXFireGame();
- switch(gameid) {
- case 2: game->init( gameid, "America's Army: Special Forces", packet,iterator ); break;
- case 3: game->init( gameid, "Unreal Tournament", packet,iterator ); break;
- case 4: game->init( gameid, "Unreal Tournament 2003", packet ,iterator); break;
- case 5: game->init( gameid, "Counter-Strike 1.6", packet ,iterator); break;
- case 32: game->init( gameid, "Teamspeak", packet ,iterator); break;
- case 4181: game->init( gameid, "Unreal Tournament 2004", packet,iterator ); break;
- case 4578: game->init( gameid, "Battlefield 2", packet ,iterator); break;
- case 4611: game->init( gameid, "Live for Speed", packet,iterator ); break;
- default:
- game->init( gameid, "Non Resolvegame", packet,iterator );
- break;
- }
- return game;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.h b/plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.h
deleted file mode 100644
index fdaaeb5c0b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/dummyxfiregameresolver.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __DUMMYXFIREGAMERESOLVER_H
-#define __DUMMYXFIREGAMERESOLVER_H
-
-#include "xfiregame.h"
-#include "xfiregameresolver.h"
-#include "xdebug.h"
-#include <string>
-
-namespace xfirelib {
-
- struct DummyXFireGame;
- class DummyXFireGameResolver : public XFireGameResolver {
- public:
- XFireGame *resolveGame(int gameid, int iterator, BuddyListGamesPacket *packet);
-
- };
-
-
- class DummyXFireGame : public XFireGame {
- public:
- // TODO !!!!!!!!!!!!! this->packet = packet should NOT be used !!
- // we need to create a copy of packet, because it will be deleted as soon
- // as all listeners are notified !!!
- void init(int gameid, std::string gamename, BuddyListGamesPacket *packet, int iterator) {
- this->gameid = gameid;
- this->gamename = gamename;
- this->packet = packet;
-
- memcpy(ip,packet->ips->at(iterator),4);
- port = packet->ports->at(iterator);
- XDEBUG(( "init .. %d / %s\n", gameid, gamename.c_str() ));
- }
-
- int getGameId() { return gameid; }
- std::string getGameName() { return gamename; }
-
- BuddyListGamesPacket *packet;
- int gameid;
- char ip[4];
- long port;
- std::string gamename;
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.cpp b/plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.cpp
deleted file mode 100644
index bb2c4f884f..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include <vector>
-#include <string>
-
-#include "friendsoffriendlist.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- FriendsBuddyListNamesPacket::FriendsBuddyListNamesPacket() {
- usernames = 0;
- nicks = 0;
- userids = 0;
- }
- FriendsBuddyListNamesPacket::~FriendsBuddyListNamesPacket() {
- delete usernames;
- delete nicks;
- delete userids;
- }
-
- void FriendsBuddyListNamesPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
-
- VariableValue friends;
-
- XDEBUG2( "Len: %ld\n", length );
-
- index+=8; //paar bytes überspringen
-
- int numberOfIds = (unsigned char)buf[index];
- XDEBUG2( "numberofId: %ld\n", numberOfIds );
- index++;
- index++;//ignore 00
- sids = new vector<char *>;
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += friends.readValue(buf,index,16);
- char *sid = new char[16];
- memcpy(sid,friends.getValue(),16);
- sids->push_back(sid);
- }
-
- XERROR("Sids ausgelesen\n");
-
- index+=7;
-
- index+=4;
-
- userids = new vector<long>;
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += friends.readValue(buf,index,4);
- userids->push_back(friends.getValueAsLong());
- XDEBUG3( "UserID: %ld %ld\n",i+1, friends.getValueAsLong() );
- }
-
- index+=7;
-
- usernames = new vector<string>;
- index = readStrings(usernames,buf,index);
-
- index+=7;
-
- nicks = new vector<string>;
- index = readStrings(nicks,buf,index);
-
- }
-
- int FriendsBuddyListNamesPacket::readStrings(vector<string> *strings, char *buf, int index) {
- VariableValue friends;
- index += friends.readValue(buf,index,2);
- //index ++; // Ignore 00
- int numberOfStrings = friends.getValueAsLong();
- XDEBUG3( "name: %s numberOfStrings: %d\n", friends.getName().c_str(), numberOfStrings );
- for(int i = 0 ; i < numberOfStrings ; i++) {
- int length = (unsigned char)buf[index++];
- index++;
- index += friends.readValue(buf,index,length);
- string stringvalue = string(friends.getValue(),length);
- strings->push_back(stringvalue);
- XDEBUG(( "String length: %2d : %s\n", length, stringvalue.c_str() ));
- }
- return index;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.h b/plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.h
deleted file mode 100644
index 70c59a76e9..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/friendsoffriendlist.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __FRIENDSBUDDYLISTNAMESPACKET_H
-#define __FRIENDSBUDDYLISTNAMESPACKET_H
-
-#define XFIRE_FRIENDS_BUDDYS_NAMES_ID 0x88
-
-#include <vector>
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- class FriendsBuddyListNamesPacket : public XFireRecvPacketContent {
- public:
- FriendsBuddyListNamesPacket();
- virtual ~FriendsBuddyListNamesPacket();
-
- XFirePacketContent* newPacket() { return new FriendsBuddyListNamesPacket(); }
-
- int getPacketId() { return XFIRE_FRIENDS_BUDDYS_NAMES_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 10024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- //private:
- int readStrings(vector<string> *strings, char *buf, int index);
-
- vector<string> *usernames;
- vector<string> *nicks;
- vector<long> *userids;
- vector<char *> *sids;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.cpp
deleted file mode 100644
index a134af85c9..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include <vector>
-#include <string>
-
-#include "gameinfopacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- GameInfoPacket::GameInfoPacket() {
- }
- GameInfoPacket::~GameInfoPacket() {
- }
-
- void GameInfoPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
- int numberOfSids = 0;
- VariableValue val;
-
- index += val.readName(buf,index);
-
- index++; //ignore 04
- index++; //ignore 03
-
- XDEBUG2("Anzahl: %d\n",buf[index]);
- numberOfSids = buf[index];
-
- index++; //ignore 01
- index++; //ignore 0
-
- sids = new vector<char *>;
- for(int i = 0 ; i < numberOfSids ; i++) {
- index += val.readValue(buf,index,16);
- char *sid = new char[16];
- memcpy(sid,val.getValue(),16);
- sids->push_back(sid);
- }
- index += val.readName(buf,index);
-
- index += 4; // nächsten 4 bytes skippen
-
- gameinfo=new vector<string>;
- for(int i = 0 ; i < numberOfSids ; i++) {
- int length = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,length);
- string stringvalue = string(val.getValue(),length);
- gameinfo->push_back(stringvalue);
- XDEBUG(( "String length: %2d : %s\n", length, stringvalue.c_str() ));
- }
-
- XDEBUG2("Position: %d\n",index);
-
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.h b/plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.h
deleted file mode 100644
index dfd890e814..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/gameinfopacket.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GAMEINFOPACKET_H
-#define __GAMEINFOPACKET_H
-
-#define XFIRE_GAMEINFO_ID 156
-
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-namespace xfirelib {
- using namespace std;
-
- class GameInfoPacket : public XFireRecvPacketContent {
- public:
- GameInfoPacket();
- virtual ~GameInfoPacket();
-
- XFirePacketContent* newPacket() { return new GameInfoPacket(); }
-
- virtual int getPacketId() { return XFIRE_GAMEINFO_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- virtual void parseContent(char *buf, int length, int numberOfAtts);
-
- vector<char *> *sids;
- vector<string> *gameinfo;
- };
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.cpp b/plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.cpp
deleted file mode 100644
index 6d21742510..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "getbuddyinfo.h"
-#include <string.h>
-#include <iostream>
-
-/*
- mit dem paket kan man buddyinfos anfordern, bei zu aggressiven anfragen kappt xfire die verbindung
- getestet mit clanbuddy's >270 members
-*/
-
-namespace xfirelib {
- using namespace std;
-
- int GetBuddyInfo::getPacketContent(char *packet) {
- int index = 0;
-
- VariableValue val;
- val.setValueFromLong(userid,4);
-
- packet[index++] = 0x01;
- packet[index++] = 0x02;
- index += val.writeValue(packet, index);
-
- length = index;
- return index;
- }
-
- int GetBuddyInfo::getPacketAttributeCount() {
- return 1;
- }
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.h b/plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.h
deleted file mode 100644
index efd8ded51d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/getbuddyinfo.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//mit dem packet kann man die buddyinfos anfordern
-
-#ifndef __GETBUDDYINFO_H
-#define __GETBUDDYINFO_H
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-
-#include <string>
-
-namespace xfirelib {
-
- class GetBuddyInfo : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new GetBuddyInfo(); }
-
- int getPacketId() { return 0x25; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 1000; };
- void parseContent(char *buf, int length, int numberOfAtts) { };
-
- unsigned int userid;
-
- private:
- int length;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/icon.ico b/plugins/!NotAdopted/Xfire/xfiretest/icon.ico
deleted file mode 100644
index 0e767a56d8..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/icon.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/iniupdater.cpp b/plugins/!NotAdopted/Xfire/xfiretest/iniupdater.cpp
deleted file mode 100644
index edc8043b78..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/iniupdater.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-//iniupdater.cpp by dufte, großen dank an xfireplus.com
-
-#include "stdafx.h"
-
-#include "iniupdater.h"
-#include "baseProtocol.h"
-
-extern HANDLE XFireWorkingFolder;
-extern HANDLE XFireIconFolder;
-
-BOOL CALLBACK DlgUpdateDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
-
- char*buf=NULL; //leeren zeiger für den empfangen buffer
- GetWWWContent2(INI_WHATSNEW,NULL,FALSE,&buf);
-
- if(buf!=NULL)
- {
- SetDlgItemText(hwndDlg,IDC_UPDATEGAMES,buf);
- delete[] buf;
- }
-
- SetFocus(GetDlgItem(hwndDlg,IDOK));
-
- return TRUE;
- }
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDOK:
- EndDialog(hwndDlg,IDOK);
- return TRUE;
-
- case IDCANCEL:
- EndDialog(hwndDlg,IDCANCEL);
- return TRUE;
- }
- break;
- }
-
- return FALSE;
-}
-
-void UpdateMyXFireIni(LPVOID dummy) {
- char request[1024];
- char file[1024];
- char file2[1024];
- char file3[1024];
-
- //ini pfad rausbekommen
- FoldersGetCustomPath( XFireWorkingFolder, file, 1024, 'W' );
- strcat(file,"\\");
- strcpy(file2,file);
- strcpy(file3,file);
- strcat(file,"xfire_games.new");
- strcat(file2,"xfire_games.ini");
- strcat(file3,"xfire_games.old");
-
- sprintf_s(request,1024,"%s%d",INI_URLREQUEST,getfilesize(file2));
-
- if(CheckWWWContent(request))
- {
- if(DBGetContactSettingByte(NULL,protocolname,"dontaskforupdate",0)==1||DialogBox(hinstance,MAKEINTRESOURCE(IDD_UPDATE),NULL,DlgUpdateDialogProc)==IDOK)
- {
- if(GetWWWContent2(request,file,FALSE))
- {
- //altes backup löschen
- remove(file3);
- //derzeitige ini und sichern
- rename(file2,file3);
- //lösche .old, wenn aktiv
- if(DBGetContactSettingByte(NULL,protocolname,"nobackupini",0))
- remove(file3);
- //neue aktiv schalten
- rename(file,file2);
-
- if(DBGetContactSettingByte(NULL,protocolname,"dontaskforupdate",0)==0) MSGBOX(Translate("The xfire_games.ini was updated."));
- }
- else
- MSGBOX(Translate("Error during xfire_games Update."));
- }
- }
-}
-
-void UpdateMyIcons(LPVOID dummy) {
- char request[1024];
- char file[1024];
- char file2[1024];
- char file3[1024];
-
- //ini pfad rausbekommen
- FoldersGetCustomPath( XFireIconFolder, file, 1024, 'W' );
- strcat(file,"\\");
- strcpy(file2,file);
- strcpy(file3,file);
- strcat(file,"icons.new");
- strcat(file2,"icons.dll");
- strcat(file3,"icons.old");
-
- sprintf_s(request,1024,"%s%d",ICO_URLREQUEST,getfilesize(file2));
-
- if(CheckWWWContent(request))
- {
- if(DBGetContactSettingByte(NULL,protocolname,"dontaskforupdate",0)==1||MessageBox(NULL,Translate("There is a new Icons.dll online, do you want to update now?"),"Miranda XFire Protocol Plugin",MB_YESNO|MB_ICONQUESTION)==IDYES)
- {
- if(GetWWWContent2(request,file,FALSE)) {
- //altes backup löschen
- remove(file3);
- //derzeitige ini und sichern
- rename(file2,file3);
- //lösche .old, wenn aktiv
- if(DBGetContactSettingByte(NULL,protocolname,"nobackupini",0))
- remove(file3);
- //neue aktiv schalten
- rename(file,file2);
-
- if(DBGetContactSettingByte(NULL,protocolname,"dontaskforupdate",0)==0) MSGBOX(Translate("The Icons.dll was updated."));
- }
- else
- MSGBOX(Translate("Error during Icons.dll Update."));
- }
- }
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/iniupdater.h b/plugins/!NotAdopted/Xfire/xfiretest/iniupdater.h
deleted file mode 100644
index f89174ae7d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/iniupdater.h
+++ /dev/null
@@ -1,10 +0,0 @@
-//iniupdater.h by dufte
-
-#define INI_UPDATERHOST "xfireplus.com"
-#define INI_REQUEST "/xfire_games/xfire_games.php?format=miranda"
-
-
-//#define INI_URLREQUEST "http://xfireplus.com/xfire_games/xfire_games.php?format=miranda"
-#define INI_URLREQUEST "http://xfire.pro-laming.de/getini.php?fsize="
-#define INI_WHATSNEW "http://xfire.pro-laming.de/whatsnew.txt"
-#define ICO_URLREQUEST "http://xfire.pro-laming.de/getini.php?mode=ico&fsize=" \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.cpp
deleted file mode 100644
index f9e46cdebf..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "stdafx.h"
-#include "invitebuddypacket.h"
-#include "variablevalue.h"
-
-namespace xfirelib {
- using namespace std;
-
- InviteBuddyPacket::InviteBuddyPacket() {
- names = new vector<string>;
- msgs = new vector<string>;
- }
- InviteBuddyPacket::~InviteBuddyPacket() {
- delete names;
- delete msgs;
- }
-
- void InviteBuddyPacket::parseContent(char *buf, int length, int numberOfAtts) {
- /* Useless.. we only receive Packet 138 for invitations
- VariableValue val;
- int index = 0;
- index += val.readName( buf, index );
- int namecount = (unsigned char)buf[index++];
- for(int i = 0 ; i < namecount ; i++) {
- int namelen = (unsigned char)buf[index++];
- index++; // ignore 00
- index += val.readValue( buf, index, namelen );
- this->msg->push_back(string(val.getValue(),val.getValueLength()));
- }
- index += val.readName( buf, index );
-
- int msgcount = (unsigned char)buf[index++];
- for(int i = 0 ; i < msgcount ; i++) {
- int msglen = (unsigned char)buf[index++];
- index++; // ignore 00
- index += val.readValue(buf,index,msglen);
- this->msg->push_back(string(val.getValue(),val.getValueLength()));
- }
- */
- }
- int InviteBuddyPacket::getPacketContent(char *buf) {
- int index = 0;
- VariableValue val;
- val.setName("name");
- index += val.writeName(buf,index);
- buf[index++] = names->size();
- for(uint i = 0 ; i < names->size() ; i++) {
- string name = names->at(i);
- buf[index++] = name.length();
- buf[index++] = 0;
- memcpy(buf+index,name.c_str(),name.length());
- index+=name.length();
- }
- val.setName("msg");
- index += val.writeName(buf,index);
- buf[index++] = msgs->size();
- for(uint i = 0 ; i < msgs->size() ; i++) {
- string msg = msgs->at(i);
- buf[index++] = msg.length();
- buf[index++] = 0;
- memcpy(buf+index,msg.c_str(),msg.length());
- index+=msg.length();
- }
- return index;
- }
-
- void InviteBuddyPacket::addInviteName(string name, string msg) {
- this->names->push_back(name);
- this->msgs->push_back(msg);
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.h b/plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.h
deleted file mode 100644
index 055898d04a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/invitebuddypacket.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __INVITEBUDDYPACKET_H
-#define __INVITEBUDDYPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include <vector>
-#include <string>
-
-#define XFIRE_PACKET_INVITE_BUDDY 6
-
-using namespace xfirelib;
-
-namespace xfirelib {
- using namespace std;
-
- /**
- * Packet Used to Invite Buddy into Contact List
- * (Received is InviteRequestPacket)
- */
- class InviteBuddyPacket : public XFireSendPacketContent {
- public:
- InviteBuddyPacket();
- ~InviteBuddyPacket();
-
- XFirePacketContent* newPacket() { return new InviteBuddyPacket(); }
-
-
- int getPacketId() { return XFIRE_PACKET_INVITE_BUDDY; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 2; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- void addInviteName(string name, string msg);
-
- vector<string> *names;
- vector<string> *msgs;
- private:
- };
-
-};
-
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.cpp
deleted file mode 100644
index dc105d31ff..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "inviterequestpacket.h"
-#include "variablevalue.h"
-#include <string>
-
-namespace xfirelib {
- using namespace std;
-
- void InviteRequestPacket::parseContent(char *buf, int length, int numberOfAtts) {
- VariableValue val;
- int index = 0;
- index += val.readName(buf,index);
- index += 4; // Ignore 04 01 01 00
- index += val.readValue(buf,index,-1,1);
- name = string(val.getValue(),val.getValueLength());
-
- index += val.readName(buf,index);
- index += 4; // Ignore 04 01 01 00
- index += val.readValue(buf,index,-1,1);
- nick = string(val.getValue(),val.getValueLength());
-
- index += val.readName(buf,index);
- index += 4; // Ignore 04 01 01 00
- index += val.readValue(buf,index,-1,1);
- msg = string(val.getValue(),val.getValueLength());
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.h
deleted file mode 100644
index 5f8bac43cb..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/inviterequestpacket.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __INVITEREQUESTPACKET_H
-#define __INVITEREQUESTPACKET_H
-
-#include <string>
-#include "xfirerecvpacketcontent.h"
-
-#define XFIRE_PACKET_INVITE_REQUEST_PACKET 138
-
-namespace xfirelib {
- using namespace std;
-
- /**
- * Received when someone invites you to his buddylist
- * (For sending invitations see InviteBuddyPacket)
- */
- class InviteRequestPacket : public XFireRecvPacketContent {
- public:
- XFirePacketContent* newPacket() { return new InviteRequestPacket(); }
-
-
- int getPacketId() { return XFIRE_PACKET_INVITE_REQUEST_PACKET; }
- int getPacketContent(char *buf) { return 0;}
- int getPacketAttributeCount() { return 3; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- string name;
- string nick;
- string msg;
-
- private:
- };
-
-};
-
-
-#endif
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.cpp
deleted file mode 100644
index 9d6490dfb2..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#include "stdafx.h"
-#include "loginfailedpacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-
-namespace xfirelib {
- using namespace std;
- using namespace xfirelib;
-
- void LoginFailedPacket::parseContent(char *buf, int length, int numberOfAtts) {
- cout << "Login failed, incorrect username or password" << endl;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.h
deleted file mode 100644
index 20f955bc51..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/loginfailedpacket.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __LOGINFAILEDPACKET_H
-#define __LOGINFAILEDPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-#define XFIRE_LOGIN_FAILED_ID 129
-
-namespace xfirelib {
-
- class LoginFailedPacket : public XFireRecvPacketContent {
- public:
- XFirePacketContent* newPacket() { return new LoginFailedPacket(); }
-
-
- int getPacketId() { return XFIRE_LOGIN_FAILED_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.cpp
deleted file mode 100644
index 483c2fbb4b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xdebug.h"
-#include "loginsuccesspacket.h"
-
-namespace xfirelib {
-
- void LoginSuccessPacket::parseContent(char *buf, int length, int numberOfAtts) {
-
- int read = 0;
- for(int i = 0 ; i < numberOfAtts ; i++) {
- VariableValue *val = new VariableValue();
- read += val->readName(buf, read);
- XDEBUG(( "Read Variable Name: %s\n", val->getName().c_str() ));
- if(val->getName() == "userid") {
- read++; // ignore 02
- read += val->readValue(buf, read, 3);
- read++; // ignore 00
- XDEBUG2( "My userid: %lu\n", val->getValueAsLong() );
- this->myuid=val->getValueAsLong();
- } else if(val->getName() == "sid") {
- read++; // ignore 03
- read+=val->readValue(buf, read, 16);
- //XDEBUG(( "My SID: %u\n", val->getValue() ));
- } else if(val->getName() == "nick") {
- //int lengthLength = (int)val->getValueAsLong();
- read++; // ignore 01
- //read+=val->readValue(buf, read, -1, 1);
-
- unsigned int l = (unsigned char)buf[read++]; //dufte - nick wird benötigt
- XDEBUG2( "Nick Length: %d\n", l );
- read++;
- read += val->readValue(buf,read,l);
- XDEBUG2( "Nick Length: %s\n", val->getValue() );
-
- this->nick=std::string(val->getValue(),l);
-
- } else if(val->getName() == "status") {
- read+=5; // ignore everything
- } else if(val->getName() == "dlset") {
- read+=3; // ignore everything
- } else {
- i = numberOfAtts;
- // If we find something we don't know .. we stop parsing the
- // packet.. who cares about the rest...
- }
- delete val;
- }
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.h b/plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.h
deleted file mode 100644
index 55dae54b01..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/loginsuccesspacket.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __LOGINSUCCESSPACKET_H
-#define __LOGINSUCCESSPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-#include <string.h> // benötigten header eingefügt
-
-#define XFIRE_LOGIN_SUCCESS_ID 130
-
-namespace xfirelib {
-
- class LoginSuccessPacket : public XFireRecvPacketContent {
- public:
- XFirePacketContent* newPacket() { return new LoginSuccessPacket(); }
-
- int getPacketId() { return XFIRE_LOGIN_SUCCESS_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- std::string nick;
- long myuid;
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/m8.h b/plugins/!NotAdopted/Xfire/xfiretest/m8.h
deleted file mode 100644
index 94a25be3bf..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/m8.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _M8_H
-#define _M8_H
-
-#include "baseProtocol.h"
-
-class Xfire_m8 : public PROTO_INTERFACE {
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/main.cpp b/plugins/!NotAdopted/Xfire/xfiretest/main.cpp
deleted file mode 100644
index 1c590e0107..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/main.cpp
+++ /dev/null
@@ -1,3797 +0,0 @@
-#include "stdafx.h"
-
-//#define MIRANDA_VER 0x801
-
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//xfire stuff
-#include "client.h"
-#include "xfirepacket.h"
-#include "loginfailedpacket.h"
-#include "otherloginpacket.h"
-#include "loginsuccesspacket.h"
-#include "messagepacket.h"
-#include "sendstatusmessagepacket.h"
-#include "sendmessagepacket.h"
-#include "invitebuddypacket.h"
-#include "sendacceptinvitationpacket.h"
-#include "senddenyinvitationpacket.h"
-#include "sendremovebuddypacket.h"
-#include "sendnickchangepacket.h"
-#include "sendgamestatuspacket.h"
-#include "sendgamestatus2packet.h"
-#include "dummyxfiregameresolver.h"
-#include "sendgameserverpacket.h"
-#include "recvstatusmessagepacket.h"
-#include "recvoldversionpacket.h"
-#include "packetlistener.h"
-#include "inviterequestpacket.h"
-#include "buddylistgames2packet.h"
-#include "dummyxfiregameresolver.h"
-#include "sendtypingpacket.h"
-#include "xfireclanpacket.h"
-#include "recvremovebuddypacket.h"
-#include "gameinfopacket.h"
-#include "claninvitationpacket.h"
-#include "xfireprefpacket.h"
-#include "searchbuddy.h"
-#include "xfirefoundbuddys.h"
-#include "getbuddyinfo.h"
-#include "buddyinfo.h"
-#include "variables.h"
-#include "passworddialog.h"
-#include "setnickname.h"
-#include "all_statusmsg.h"
-#include "processbuddyinfo.h"
-#include "recvprefspacket.h"
-#include "sendsidpacket.h"
-#include "friendsoffriendlist.h"
-#include "recvbuddychangednick.h"
-
-//miranda stuff
-#include "baseProtocol.h"
-#include "m_updater.h"
-#include "Xfire_gamelist.h"
-#include "Xfire_proxy.h"
-#include "Xfire_avatar_loader.h"
-#include "Xfire_voicechat.h"
-
-#include <stdexcept>
-
-Xfire_gamelist xgamelist;
-Xfire_voicechat voicechat;
-
-HANDLE hLogEvent;
-int bpStatus = ID_STATUS_OFFLINE;
-int previousMode;
-int OptInit(WPARAM wParam,LPARAM lParam);
-int OnDetailsInit(WPARAM wParam,LPARAM lParam);
-HANDLE hFillListEvent = 0;
-CONTACT user;
-HINSTANCE hinstance;
-HANDLE heventXStatusIconChanged;
-HANDLE copyipport,gotoclansite,vipport,joingame,startthisgame,removefriend,blockfriend;
-int foundgames=0;
-Gdiplus::GdiplusStartupInput gdiplusStartupInput;
-ULONG_PTR gdiplusToken;
-BOOL miranda8 = FALSE;
-
-//xfire preferences, wichtige variablen
-xfire_prefitem xfireconfig[XFIRE_RECVPREFSPACKET_MAXCONFIGS];
-extern xfireconfigitem xfireconfigitems[XFIRE_RECVPREFSPACKET_SUPPORTEDONFIGS];
-
-CRITICAL_SECTION modeMsgsMutex;
-CRITICAL_SECTION avatarMutex;
-CRITICAL_SECTION connectingMutex;
-
-DWORD pid=NULL; //processid des gefunden spiels
-DWORD ts2pid=NULL; // processid vom teamspeak/ventrilo
-
-HANDLE XFireAvatarFolder = NULL;
-HANDLE XFireWorkingFolder = NULL;
-HANDLE XFireIconFolder = NULL;
-HANDLE hookgamestart = NULL;
-char statusmessage[2][1024];
-BOOL sendonrecieve=FALSE;
-HANDLE hNetlib=NULL;
-pGetExtendedUdpTable _GetExtendedUdpTable=NULL;
-extern LPtsrGetServerInfo tsrGetServerInfo;
-
-//eventhandles
-HANDLE hGameDetection = CreateEvent(NULL,FALSE,FALSE,NULL);
-HANDLE hConnectionClose = CreateEvent(NULL,TRUE,FALSE,NULL);
-
-//extraicon handles
-HANDLE extraiconGAME=NULL;
-HANDLE extraiconVOICE=NULL;
-
-int EXTRA_ICON_ADV1 = 4;
-int EXTRA_ICON_ADV2 = 5;
-
-PLUGININFOEX pluginInfo={
- sizeof(PLUGININFOEX),
- "Xfire protocol",
- PLUGIN_MAKE_VERSION(0,1,8,4),
- "Xfire Protocol Plugin by dufte [Built: "__DATE__" "__TIME__"]",
- "dufte",
- "dufte@justmail.de",
- "(c) 2012 Xfirelib by Herbert Poul, Xfire Miranda protocol plugin by dufte",
- "",
- 0,
- 0,
- // {9B8E1735-970D-4ce0-930C-A561956BDCA2}
- { 0x9b8e1735, 0x970d, 0x4ce0, { 0x93, 0xc, 0xa5, 0x61, 0x95, 0x6b, 0xdc, 0xa2 } }
-
-};
-
-int FillList(WPARAM wParam, LPARAM lParam);
-HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan);
-HANDLE CList_FindContact (int uid);
-void CList_MakeAllOffline();
-int RecvMessage(WPARAM wParam, LPARAM lParam);
-int SendMessage(WPARAM wParam, LPARAM lParam);
-static int UserIsTyping(WPARAM wParam, LPARAM lParam);
-HANDLE LoadGameIcon(char* g, int id, HICON* ico,BOOL onyico=FALSE,char * gamename=NULL,int*uu=NULL);
-void SetIcon(HANDLE hcontact,HANDLE hicon,int ctype=EXTRA_ICON_ADV1);
-BOOL GetAvatar(char* username,XFireAvatar* av);
-//void SetAvatar(HANDLE hContact, char* username);
-static void SetAvatar(LPVOID lparam);
-static int GetIPPort(WPARAM /*wParam*/,LPARAM lParam);
-static int GetVIPPort(WPARAM /*wParam*/,LPARAM lParam);
-int RebuildContactMenu( WPARAM wParam, LPARAM lParam );
-int doneQuery( WPARAM wParam, LPARAM lParam );
-static int GotoProfile(WPARAM wParam,LPARAM lParam);
-static int GotoProfileAct(WPARAM wParam,LPARAM lParam);
-static int GotoXFireClanSite(WPARAM wParam,LPARAM lParam);
-static int ReScanMyGames(WPARAM wParam,LPARAM lParam);
-static int SetNickDlg(WPARAM wParam,LPARAM lParam);
-static int CustomGameSetup(WPARAM wParam,LPARAM lParam);
-
-#ifndef NO_PTHREAD
- void *gamedetectiont(void *ptr);
- void *inigamedetectiont(void *ptr);
- pthread_t gamedetection;
-#else
- void inigamedetectiont(LPVOID lParam);
- void gamedetectiont(LPVOID lparam);
-#endif
-
-static int GotoProfile2(WPARAM wParam,LPARAM lParam);
-HANDLE handlingBuddys(BuddyListEntry *entry, int clan=0,char* group=NULL,BOOL dontscan=FALSE);
-int StatusIcon(WPARAM wParam,LPARAM lParam);
-int AddtoList( WPARAM wParam, LPARAM lParam );
-int BasicSearch(WPARAM wParam,LPARAM lParam);
-int GetAvatarInfo(WPARAM wParam, LPARAM lParam); //GAIR_NOAVATAR
-static int SearchAddtoList(WPARAM wParam,LPARAM lParam);
-void CreateGroup(char*grpn,char*field); //void CreateGroup(char*grp);
-int SetAwayMsg(WPARAM wParam, LPARAM lParam);
-int GetAwayMsg(WPARAM /*wParam*/, LPARAM lParam);
-int ContactDeleted(WPARAM wParam,LPARAM /*lParam*/);
-int JoinGame(WPARAM wParam,LPARAM lParam);
-extern void Scan4Games( LPVOID lparam );
-int RemoveFriend(WPARAM wParam,LPARAM lParam);
-int BlockFriend(WPARAM wParam,LPARAM lParam);
-int GetXStatusIcon(WPARAM wParam, LPARAM lParam);
-int StartThisGame(WPARAM wParam,LPARAM lParam);
-int IconLibChanged(WPARAM wParam, LPARAM lParam);
-int SendPrefs(WPARAM wparam, LPARAM lparam);
-void SetAvatar2(LPVOID lparam);
-int ExtraListRebuild(WPARAM wparam, LPARAM lparam);
-int ExtraImageApply(WPARAM wparam, LPARAM lparam);
-
-//XFire Stuff
-using namespace xfirelib;
-
-class XFireClient : public PacketListener {
-
- public:
- Client* client;
- Xfire_avatar_loader* avatarloader;
- BOOL useutf8;
-
- XFireClient(string username, string password,char protover,int useproxy=0,string proxyip="",int proxyport=0);
- ~XFireClient();
- void run();
-
- void Status(string s);
-
- void receivedPacket(XFirePacket *packet);
-
- void getBuddyList();
- void sendmsg(char*usr,char*msg);
- void setNick(char*nnick);
- void handlingBuddy(HANDLE handle);
- void CheckAvatar(BuddyListEntry* entry);
-
- private:
- vector<string> explodeString(string s, string e);
- string joinString(vector<string> s, int startindex, int endindex=-1, string delimiter=" ");
- void BuddyList();
-
- string *lastInviteRequest;
-
- string username;
- string password;
- string proxyip;
- int useproxy;
- int proxyport;
- BOOL connected;
- unsigned int myuid;
- };
-
-XFireClient* myClient=NULL;
-
-void XFireClient::CheckAvatar(BuddyListEntry* entry) {
- //kein entry, zurück
- if(!entry)
- return;
-
- //keine avatars?
- if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)==0)
- {
- //avatar gelocked?
- if(DBGetContactSettingByte(entry->hcontact, "ContactPhoto", "Locked", -1)!=1)
- {
- //avatar lade auftrag übergeben
- this->avatarloader->loadAvatar(entry->hcontact,(char*)entry->username.c_str(),entry->userid);
- }
- }
-}
-
-void XFireClient::handlingBuddy(HANDLE handle){
- vector<BuddyListEntry*> *entries = client->getBuddyList()->getEntries();
- for(uint i = 0 ; i < entries->size() ; i ++) {
- BuddyListEntry *entry = entries->at(i);
- if(entry->hcontact==handle)
- {
- handlingBuddys(entry,0,NULL);
- break;
- }
- }
- //mir_forkthread(
-}
-
-void XFireClient::setNick(char*nnick) {
- /*if(strlen(nnick)==0)
- return;*/
- SendNickChangePacket nick;
- if(this->useutf8)
- nick.nick = ( char* )nnick;
- else
- nick.nick = mir_utf8encode(( char* )nnick);
- client->send( &nick );
-}
-
-
-void XFireClient::sendmsg(char*usr,char*cmsg) {
- SendMessagePacket msg;
- // if(strlen(cmsg)>255)
- // *(cmsg+255)=0;
- msg.init(client, usr, cmsg);
- client->send( &msg );
- }
-
-
- XFireClient::XFireClient(string username_,string password_,char protover,int useproxy,string proxyip,int proxyport)
- : username(username_), password(password_) {
- client = new Client();
- client->setGameResolver( new DummyXFireGameResolver() );
- client->protocolVersion=protover;
- avatarloader = new Xfire_avatar_loader(client);
- this->useproxy=useproxy;
- this->proxyip=proxyip;
- this->proxyport=proxyport;
- useutf8=FALSE;
-
- avatarloader=new Xfire_avatar_loader(client);
-
- lastInviteRequest = NULL;
- connected = FALSE;
- }
-
- XFireClient::~XFireClient() {
- if(client!=NULL) {
- client->disconnect();
- delete client;
- }
- if(avatarloader) {
- delete avatarloader;
- avatarloader=NULL;
- }
- if(lastInviteRequest!=NULL) delete lastInviteRequest;
- }
-
- void XFireClient::run() {
- client->connect(username,password,useproxy,proxyip,proxyport);
- client->addPacketListener(this);
- }
-
- void XFireClient::Status(string s) {
- //da bei xfire statusmsg nur 100bytes länge unterstützt werden, wird gecutted
- if(!client->gotBudduyList)
- return;
-
- if(s.length()>100)
- {
- char* temp=(char*)s.c_str();
- *(temp+100)=0;
- }
- SendStatusMessagePacket *packet = new SendStatusMessagePacket();
-
- if(myClient->useutf8)
- packet->awaymsg = s.c_str();
- else
- packet->awaymsg = mir_utf8encode(s.c_str());
-
- client->send( packet );
- delete packet;
- }
-
- void XFireClient::receivedPacket(XFirePacket *packet) {
- XFirePacketContent *content = packet->getContent();
-
- switch(content->getPacketId())
- {
- /*case XFIRE_RECVBUDDYCHANGEDNICK:
- {
- RecvBuddyChangedNick *changednick = (RecvBuddyChangedNick*)content;
- if(changednick) {
- handlingBuddys((BuddyListEntry*)changednick->entry,0,NULL);
- }
- break;
- }*/
- //Konfigpacket empfangen
- case XFIRE_RECVPREFSPACKET:
- {
- //Konfigarray leeren
- memset(&xfireconfig,0,sizeof(xfire_prefitem)*XFIRE_RECVPREFSPACKET_MAXCONFIGS);
- RecvPrefsPacket *config = (RecvPrefsPacket*)content;
- //konfigs in array speichern
- if(config!=NULL)
- {
- //ins preferenes array sichern
- for(int i=0;i<XFIRE_RECVPREFSPACKET_MAXCONFIGS;i++)
- {
- xfireconfig[i]=config->config[i];
- }
- //datenbank einträge durchführen
- for(int i=0;i<XFIRE_RECVPREFSPACKET_SUPPORTEDONFIGS;i++)
- {
- char temp=1;
- if(xfireconfig[xfireconfigitems[i].xfireconfigid].wasset==1)
- {
- temp=0;
- }
- DBWriteContactSettingByte(NULL,protocolname,xfireconfigitems[i].dbentry,temp);
- }
- }
- break;
- }
- case XFIRE_FOUNDBUDDYS_ID:
- {
- PROTOSEARCHRESULT psr;
- ZeroMemory(&psr, sizeof(psr));
- psr.cbSize = sizeof(psr);
-
- XFireFoundBuddys *fb = (XFireFoundBuddys*)content;
- for(uint i = 0 ; i < fb->usernames->size() ; i++) {
- if((char*)fb->usernames->at(i).c_str()!=NULL)
- psr.nick = (char*)fb->usernames->at(i).c_str();
- if((char*)fb->fname->at(i).c_str()!=NULL)
- psr.firstName = (char*)fb->fname->at(i).c_str();
- if((char*)fb->lname->at(i).c_str()!=NULL)
- psr.lastName = (char*)fb->lname->at(i).c_str();
- ProtoBroadcastAck(protocolname, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
- }
-
- ProtoBroadcastAck(protocolname, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
- break;
- }
- case XFIRE_BUDDYINFO:
- {
- BuddyInfoPacket *buddyinfo = (BuddyInfoPacket*)content;
- BuddyListEntry *entry = client->getBuddyList()->getBuddyById( buddyinfo->userid );
-
- //wenn die uid die gleiche wie die eigene ist, dann avatar auch selbst zuweisen
- if(buddyinfo->userid==this->myuid) {
- ProcessBuddyInfo(buddyinfo,NULL,"myxfireavatar");
- }
-
- if(entry)
- ProcessBuddyInfo(buddyinfo,entry->hcontact,(char*)entry->username.c_str());
-
- break;
- }
- case XFIRE_CLANINVITATION_ID:
- {
- ClanInvitationPacket *claninv = (ClanInvitationPacket*)content;
- for(int i=0;i<claninv->numberOfInv;i++)
- {
- char msg[XFIRE_MAX_STATIC_STRING_LEN];
- sprintf(msg,Translate("%s (Nickname: %s) has invited you to join the %s clan. Message: %s%sPlease go to the XFireclan-Site to accept the Invitation."),claninv->invitefromusername[i].c_str(),
- claninv->invitefrom[i].c_str(),
- claninv->clanname[i].c_str(),
- claninv->invitemsg[i].c_str(),"\n");
- MSGBOX(msg);
- }
- break;
- }
- case XFIRE_GAMEINFO_ID:
- {
- GameInfoPacket *gameinfo = (GameInfoPacket*)content;
- for(uint i = 0 ; i < gameinfo->sids->size() ; i++) {
- BuddyListEntry *entry = client->getBuddyList()->getBuddyBySid( gameinfo->sids->at(i) );
- if(entry){
- entry->gameinfo = gameinfo->gameinfo->at(i);
- handlingBuddys(entry,0,NULL);
- }
- }
- break;
- }
- case XFIRE_RECVREMOVEBUDDYPACKET:
- {
- RecvRemoveBuddyPacket *remove = (RecvRemoveBuddyPacket*)content;
- CallService( MS_DB_CONTACT_DELETE, (WPARAM) remove->handle, 1 );
- break;
- }
- case XFIRE_BUDDYS_NAMES_ID:
- {
- //status nachricht nach der buddylist senden
- client->gotBudduyList=TRUE;
- if(sendonrecieve)
- {
- if(myClient!=NULL)
- {
- if(myClient->client->connected)
- {
- //
- if (bpStatus == ID_STATUS_AWAY)
- myClient->Status(statusmessage[1]);
- else
- myClient->Status(statusmessage[0]);
- }
- }
- sendonrecieve=FALSE;
- }
- sendonrecieve=FALSE;
-
-/* GetBuddyInfo buddyinfo;
-
- vector<BuddyListEntry*> *entries = client->getBuddyList()->getEntries();
- for(uint i = 0 ; i < entries->size() ; i ++) {
- BuddyListEntry *entry = entries->at(i);
- handlingBuddys(entry,0,NULL);
- }*/
- break;
- }
- /* case XFIRE_CLAN_BUDDYS_NAMES_ID:
- {
- vector<BuddyListEntry*> *entries = client->getBuddyList()->getEntriesClan();
-
- char temp[255];
- char * dummy;
- ClanBuddyListNamesPacket *clan = (ClanBuddyListNamesPacket*)content;
- sprintf(temp,"Clan_%d",clan->clanid);
-
- DBVARIANT dbv;
- if(!DBGetContactSetting(NULL,protocolname,temp,&dbv))
- {
- dummy=dbv.pszVal;
- }
- else
- dummy=NULL;
-
- for(uint i = 0 ; i < entries->size() ; i ++) {
- BuddyListEntry *entry = entries->at(i);
- if(entry->clanid==clan->clanid) {
- handlingBuddys(entry,clan->clanid,dummy);
- }
- }
- break;
- }*/
- case XFIRE_FRIENDS_BUDDYS_NAMES_ID:
- {
- for(uint i = 0 ; i < ((FriendsBuddyListNamesPacket*)content)->userids->size() ; i++) {
- BuddyListEntry *entry = client->getBuddyList()->getBuddyById( ((FriendsBuddyListNamesPacket*)content)->userids->at(i) );
- if(entry) {
- char fofname[128]="Friends of Friends Playing";
- DBVARIANT dbv;
- //gruppennamen überladen
- if(!DBGetContactSetting(NULL,protocolname,"overload_fofgroupname",&dbv))
- {
- strcpy_s(fofname,128,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- CreateGroup(Translate(fofname),"fofgroup");
- HANDLE hc=handlingBuddys(entry,-1,Translate(fofname));
- if(hc)
- {
- CheckAvatar(entry);
- DBWriteContactSettingByte(hc,protocolname,"friendoffriend",1);
- }
- }
- }
- break;
- }
- /*case XFIRE_BUDDYS_ONLINE_ID:
- {
- for(uint i = 0 ; i < ((BuddyListOnlinePacket*)content)->userids->size() ; i++) {
- BuddyListEntry *entry = client->getBuddyList()->getBuddyById( ((BuddyListOnlinePacket*)content)->userids->at(i) );
- if(entry){
- handlingBuddys(entry,0,NULL);
- }
- }
- break;
- }*/
- /*case XFIRE_RECV_STATUSMESSAGE_PACKET_ID:
- {
- for(uint i=0;i<((RecvStatusMessagePacket*)content)->sids->size();i++)
- {
- BuddyListEntry *entry = this->client->getBuddyList()->getBuddyBySid( ((RecvStatusMessagePacket*)content)->sids->at(i) );
- if(entry) //crashbug entfernt
- setBuddyStatusMsg(entry,entry->statusmsg); //auf eine funktion reduziert, verringert cpuauslastung und beseitigt das
- //das problem der fehlenden statusmsg
- //handlingBuddys(entry,0,NULL);
- }
- break;
- }*/
- case XFIRE_BUDDYS_GAMES_ID:
- {
- vector<char *> *sids=NULL; //dieses array dient zu zwischensicherung von unbekannten sids
- for(uint i=0;i<((BuddyListGamesPacket*)content)->sids->size();i++)
- {
- BuddyListEntry *entry = this->client->getBuddyList()->getBuddyBySid( ((BuddyListGamesPacket*)content)->sids->at(i) );
- if(entry!=NULL)
- {
- //wir haben einen unbekannten user
- if(entry->username.length()==0)
- {
- //sid array ist noch nicht init
- if(sids==NULL)
- {
- sids = new vector<char *>;
- }
- //kopie der sid anlegen
- char *sid = new char[16];
- memcpy(sid,((BuddyListGamesPacket*)content)->sids->at(i),16);
- //ab ins array damit
- sids->push_back(sid);
- }
- else
- {
- if(entry->game==0&&
- entry->hcontact!=0&&
- DBGetContactSettingByte(entry->hcontact,protocolname,"friendoffriend",0)==1)
- {
- DBWriteContactSettingWord(entry->hcontact,protocolname,"Status",ID_STATUS_OFFLINE);
- //CallService( MS_DB_CONTACT_DELETE, (WPARAM) entry->hcontact, 0);
- }
- else
- {
- handlingBuddys(entry,0,NULL);
- }
- }
- }
- }
- //sid anfragen nur senden, wenn das sids array init wurde
- if(sids)
- {
- SendSidPacket sp;
- sp.sids=sids;
- client->send( &sp );
- delete sids;
- }
- break;
- }
- case XFIRE_BUDDYS_GAMES2_ID:
- {
- for(uint i=0;i<((BuddyListGames2Packet*)content)->sids->size();i++)
- {
- BuddyListEntry *entry = this->client->getBuddyList()->getBuddyBySid( ((BuddyListGames2Packet*)content)->sids->at(i) );
- if(entry!=NULL) handlingBuddys(entry,0,NULL);
- }
- break;
- }
- case XFIRE_PACKET_INVITE_REQUEST_PACKET: //friend request
- {
- InviteRequestPacket *invite = (InviteRequestPacket*)content;
-
- //nur nich blockierte buddy's durchlassen
- if(!DBGetContactSettingByte(NULL,"XFireBlock",(char*)invite->name.c_str(),0))
- {
- XFireContact xfire_newc;
- xfire_newc.username=(char*)invite->name.c_str();
- xfire_newc.nick=(char*)invite->nick.c_str();
- xfire_newc.id=0;
-
- HANDLE handle=CList_AddContact(xfire_newc,TRUE,TRUE,0);
-
- if(handle) { // invite nachricht mitsenden
- string str;
- CCSDATA ccs;
- PROTORECVEVENT pre;
-
- str=(char*)invite->msg.c_str();
-
- time_t t = time(NULL);
- ccs.szProtoService = PSR_MESSAGE;
- ccs.hContact = handle;
- ccs.wParam = 0;
- ccs.lParam = (LPARAM) & pre;
- pre.flags = 0;
- pre.timestamp = t;
- pre.szMessage = (char*)mir_utf8decode((char*)str.c_str(),NULL);
- //invite nachricht konnte nicht zugewiesen werden?!?!?!
- if(!pre.szMessage)
- pre.szMessage=(char*)str.c_str();
- pre.lParam = 0;
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
- }
- }
- else
- {
- SendDenyInvitationPacket deny;
- deny.name = invite->name;
- client->send( &deny );
- }
- break;
- }
- case XFIRE_CLAN_PACKET:
- {
- char temp[100];
- XFireClanPacket *clan = (XFireClanPacket*)content;
-
- for(int i=0;i<clan->count;i++)
- {
- sprintf(temp,"Clan_%d",clan->clanid[i]);
- DBWriteContactSettingTString(NULL, protocolname, temp, (char*)clan->name[i].c_str());
-
- sprintf(temp,"ClanUrl_%d",clan->clanid[i]);
- DBWriteContactSettingTString(NULL, protocolname, temp, (char*)clan->url[i].c_str());
-
- if(!DBGetContactSettingByte(NULL,protocolname,"noclangroups",0)) {
- CreateGroup((char*)clan->name[i].c_str(),"mainclangroup");
- }
- }
- break;
- }
- case XFIRE_LOGIN_FAILED_ID:
- MSGBOXE(Translate("Login failed."));
- SetStatus(ID_STATUS_OFFLINE,NULL);
- break;
- case XFIRE_LOGIN_SUCCESS_ID: //login war erfolgreich
- {
- LoginSuccessPacket *login = (LoginSuccessPacket*)content;
- char * temp = mir_utf8decode((char*)login->nick.c_str(),NULL);
- //nick speichern
- DBWriteContactSettingString(NULL,protocolname,"Nick",temp);
- //uid speichern
- DBWriteContactSettingDword(NULL,protocolname,"myuid",login->myuid);
- this->myuid=login->myuid;
- //avatar auslesen
- GetBuddyInfo* buddyinfo=new GetBuddyInfo();
- buddyinfo->userid=login->myuid;
- mir_forkthread(SetAvatar2,(LPVOID)buddyinfo);
- break;
- }
-
- case XFIRE_RECV_OLDVERSION_PACKET_ID:
- {
- RecvOldVersionPacket *version = (RecvOldVersionPacket*)content;
- char temp[255];
-
- if((unsigned int)client->protocolVersion<(unsigned int)version->newversion)
- {
- DBWriteContactSettingByte(NULL,protocolname,"protover",version->newversion);
- //recprotoverchg
- if(DBGetContactSettingWord(NULL,protocolname,"recprotoverchg",0)==0)
- {
- sprintf_s(temp,255,Translate("The protocol version is too old. Changed current version from %d to %d. You can reconnect now."),client->protocolVersion,version->newversion);
- MSGBOXE(temp);
- }
- else
- {
- SetStatus(ID_STATUS_RECONNECT,NULL);
- return;
- }
- }
- else
- {
- sprintf_s(temp,255,Translate("The protocol version is too old. Cannot detect a new version number."));
- MSGBOXE(temp);
- SetStatus(ID_STATUS_OFFLINE,NULL);
- }
- break;
- }
-
- case XFIRE_OTHER_LOGIN:
- MSGBOXE(Translate("Someone loged in with your account.disconnect."));
- SetStatus(ID_STATUS_OFFLINE,NULL);
- break;
-
- //ne nachricht für mich, juhu
- case XFIRE_MESSAGE_ID: {
- string str;
- CCSDATA ccs;
- PROTORECVEVENT pre;
-
- if( (( MessagePacket*)content)->getMessageType() == 0){
- BuddyListEntry *entry = client->getBuddyList()->getBuddyBySid( ((MessagePacket*)content)->getSid() );
- if(entry!=NULL)
- {
- str=((MessagePacket*)content)->getMessage();
- time_t t = time(NULL);
- ccs.szProtoService = PSR_MESSAGE;
- ccs.hContact = entry->hcontact;
- ccs.wParam = 0;
- ccs.lParam = (LPARAM) & pre;
- pre.flags = 0;
- pre.timestamp = t;
- if(this->useutf8)
- {
- pre.szMessage = (char*)str.c_str();
- pre.flags = PREF_UTF;
- }
- else
- pre.szMessage = (char*)mir_utf8decode((char*)str.c_str(),NULL);
- pre.lParam = 0;
-
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)ccs.hContact,PROTOTYPE_CONTACTTYPING_OFF);
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
-
- }
- }
- else if( (( MessagePacket*)content)->getMessageType() == 3) {
- BuddyListEntry *entry = client->getBuddyList()->getBuddyBySid( ((MessagePacket*)content)->getSid() );
- if(entry!=NULL)
- {
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)entry->hcontact,5);
- }
- }
-
- break;
- }
-
- //refresh buddy's
- /* if(content->getPacketId()==XFIRE_RECV_STATUSMESSAGE_PACKET_ID||
- content->getPacketId()==XFIRE_BUDDYS_GAMES_ID||
- content->getPacketId()==XFIRE_BUDDYS_GAMES2_ID)
- CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)-1, (LPARAM)FU_TBREDRAW | FU_FMREDRAW);*/
- }
-
- //
- }
-
-//=====================================================
-
-/*extern "C" __declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
-{
- return &pluginInfo;
-}*/
-
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 8, 0, 0))
- {
- miranda8 = FALSE;
- }
- else
- miranda8 = TRUE;
-
- return &pluginInfo;
-}
-
-static const MUUID interfaces[] = {MIID_PROTOCOL,MIID_LAST};
-
-extern "C" __declspec(dllexport) const MUUID * MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-
-//=====================================================
-// Unloads plugin
-//=====================================================
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- //urlprefix raushaun
- if(ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
- CallService(MS_ASSOCMGR_REMOVEURLTYPE, 0, (LPARAM)"xfire:");
-
- //gamedetetion das dead signal geben
- SetEvent(hGameDetection);
-
-#ifndef NO_PTHREAD
- pthread_cancel (gamedetection);
- pthread_win32_process_detach_np ();
-#endif
-
- DeleteCriticalSection(&modeMsgsMutex);
- DeleteCriticalSection(&connectingMutex);
- DeleteCriticalSection(&avatarMutex);
-
- Gdiplus::GdiplusShutdown(gdiplusToken);
-
- return 0;
-}
-
-void __stdcall XFireLog( const char* fmt, ... )
-{
- va_list vararg;
- va_start( vararg, fmt );
- char* str = ( char* )alloca( 32000 );
- mir_vsnprintf( str, 32000, fmt, vararg );
- va_end( vararg );
-
- CallService( MS_NETLIB_LOG, ( WPARAM )hNetlib, ( LPARAM )str );
-}
-
-//=====================================================
-// WINAPI DllMain
-//=====================================================
-
-BOOL WINAPI DllMain(HINSTANCE hinst,DWORD fdwReason,LPVOID lpvReserved)
-{
- hinstance=hinst;
- //AtlAxWinInit();
- return TRUE;
-}
-
-//suche nach ini und danach starte gamedetection thread
-void StartIniUpdateAndDetection(LPVOID dummy)
-{
- EnterCriticalSection(&connectingMutex);
-
- //ini/ico updater, nur wenn aktiv
- if(DBGetContactSettingByte(NULL,protocolname,"autoiniupdate",0))
- UpdateMyXFireIni(NULL);
- if(DBGetContactSettingByte(NULL,protocolname,"autoicodllupdate",0))
- UpdateMyIcons(NULL);
-
-#ifndef NO_PTHREAD
- void* (*func)(void*) = &inigamedetectiont;
- pthread_create( &gamedetection, NULL, func , NULL);
-#else
- mir_forkthread(inigamedetectiont,NULL);
-#endif
-
- LeaveCriticalSection(&connectingMutex);
-}
-
-int UrlCall(WPARAM wparam,LPARAM lparam) {
- //lparam!=0?
- if(lparam) {
- //nach dem doppelpunkt suchen
- char*type=strchr((char*)lparam,':');
- //gefunden, dann anch fragezeichen suchen
- if(type)
- {
- type++;
- char*q=strchr(type,'?');
- //gefunden? dann urltype ausschneiden
- if(q)
- {
- //abschneiden
- *q=0;
- //ein addfriend url request?
- if(strcmp("add_friend",type)==0)
- {
- q++;
- //nach = suchen
- char*g=strchr(q,'=');
- //gefunden? dann abschneiden
- if(g)
- {
- *g=0;
- g++;
- //user parameter?
- if(strcmp("user",q)==0)
- {
- //tempbuffer für die frage and en user
- char temp[100];
-
- if(strlen(g)>25) //zugroße abschneiden
- *(g+25)=0;
-
- sprintf_s(temp,100,Translate("Do you really want to add %s to your friend list?"),g);
- //Nutzer vorher fragen, ob er wirklich user xyz adden möchte
- if(MessageBoxA(NULL,temp,"Miranda XFire Protocol Plugin",MB_YESNO|MB_ICONQUESTION)==IDYES)
- {
- if(myClient!=NULL)
- {
- if(myClient->client->connected)
- {
- InviteBuddyPacket invite;
- invite.addInviteName(g, Translate("Add me to your friends list."));
- myClient->client->send(&invite);
- }
- else
- MSGBOXE(Translate("XFire is not connected."));
- }
- else
- MSGBOXE(Translate("XFire is not connected."));
- }
- }
- }
- }
- }
- }
-
- }
- return 0;
-}
-
-//wenn alle module geladen sind
-static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
-{
- char servicefunction[100];
-
- /*NETLIB***********************************/
- NETLIBUSER nlu;
- ZeroMemory(&nlu, sizeof(nlu));
- nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS;
- nlu.szSettingsModule = protocolname;
- nlu.szDescriptiveName = "XFire server connection";
- hNetlib = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) & nlu);
- /*NETLIB***********************************/
-
- HookEvent(ME_USERINFO_INITIALISE, OnDetailsInit);
- HookEvent(ME_DB_CONTACT_DELETED, ContactDeleted);
-
- //hook das queryplugin
- HookEvent("GameServerQuery/doneQuery" , doneQuery);
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_SETAWAYMSG);
- CreateServiceFunction(servicefunction, SetAwayMsg);
-
- CallService(MS_UPDATE_REGISTERFL, 3701, (WPARAM)&pluginInfo);
-
- /*NETLIBUSER nlu;
- ZeroMemory(&nlu, sizeof(nlu));
- nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_NOHTTPSOPTION;
- nlu.szSettingsModule = protocolname;
- nlu.szDescriptiveName = "XFire Gamedetectionthread";
- hNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) & nlu);*/
-
-
- // Variables support
- if (ServiceExists(MS_VARS_REGISTERTOKEN))
- {
- TOKENREGISTER tr = {0};
- tr.cbSize = sizeof(TOKENREGISTER);
- tr.memType = TR_MEM_MIRANDA;
- tr.flags = TRF_FREEMEM | TRF_PARSEFUNC | TRF_FIELD;
-
- tr.tszTokenString = _T("xfiregame");
- tr.parseFunction = Varxfiregame;
- tr.szHelpText = "XFire\tCurrent Game";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("myxfiregame");
- tr.parseFunction = Varmyxfiregame;
- tr.szHelpText = "XFire\tMy Current Game";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("xfireserverip");
- tr.parseFunction = Varxfireserverip;
- tr.szHelpText = "XFire\tServerIP";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("myxfireserverip");
- tr.parseFunction = Varmyxfireserverip;
- tr.szHelpText = "XFire\tMy Current ServerIP";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("xfirevoice");
- tr.parseFunction = Varxfirevoice;
- tr.szHelpText = "XFire\tVoice";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("myxfirevoice");
- tr.parseFunction = Varmyxfirevoice;
- tr.szHelpText = "XFire\tMy Current Voice";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("xfirevoiceip");
- tr.parseFunction = Varxfirevoiceip;
- tr.szHelpText = "XFire\tVoice ServerIP";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- tr.tszTokenString = _T("myxfirevoiceip");
- tr.parseFunction = Varmyxfirevoiceip;
- tr.szHelpText = "XFire\tMy Voice ServerIP";
- CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM) &tr);
-
- }
-
- //File Association Manager support
- if(ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
- {
- AssocMgr_AddNewUrlType("xfire:",Translate("Xfire Link Protocol"),hinstance,IDI_TM,XFIRE_URLCALL,0);
- }
-
- //sound einfügen
- SkinAddNewSoundEx(Translate("xfirebstartgame"),protocolname,Translate("Buddy start a game"));
-
- //hook für mbot einfügen, nur wenn mbot option aktiv
- if(DBGetContactSettingByte(NULL,protocolname,"mbotsupport",0))
- HookEvent(XFIRE_INGAMESTATUSHOOK, mBotNotify);
-
- //init der extraicons wenn service vorhanden
- /*if(ServiceExists(MS_EXTRAICON_REGISTER))
- {
- extraiconGAME=ExtraIcon_Register("Game Icon","Xfire game icons.","XFIRE_main",RebuildIcons,ApplyIcons);
- extraiconGAME=ExtraIcon_Register("Voice Icon","Xfire voice icons.","XFIRE_main");
- }*/
-
- //initialisiere teamspeak und co detection
- voicechat.initVoicechat();
-
- mir_forkthread(StartIniUpdateAndDetection,NULL);
-
- return 0;
-}
-
-//=====================================================
-// Called when plugin is loaded into Miranda
-//=====================================================
-
-/*placebo funktionen*/
-/*PROTO_INTERFACE* xfireProtoInit( const char* pszProtoName, const TCHAR* tszUserName )
-{
- Xfire_m8 m8=new Xfire_m8();
- return m8;
-}
-/*placebo funktionen*/
-/*static int xfireProtoUninit( void* ppro )
-{
- return 0;
-}
-
-*/
-
-int ExtraListRebuild(WPARAM wparam, LPARAM lparam)
-{
- //für alle gameicons ein neues handle setzen
- return xgamelist.iconmngr.resetIconHandles();
-}
-
-int ExtraImageApply(WPARAM wparam, LPARAM lparam)
-{
- HANDLE hContact=(HANDLE)wparam;
- if(ServiceExists(MS_CLIST_EXTRA_SET_ICON))
- {
- char *szProto;
- szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if ( szProto != NULL && !lstrcmpiA( szProto, protocolname ) && DBGetContactSettingWord(hContact, protocolname, "Status", ID_STATUS_OFFLINE)!=ID_STATUS_OFFLINE) {
- int gameid=DBGetContactSettingWord(hContact, protocolname, "GameId", 0);
- int gameid2=DBGetContactSettingWord(hContact, protocolname, "VoiceId", 0);
-
- if(gameid!=0)
- {
- SetIcon(hContact,xgamelist.iconmngr.getGameIconHandle(gameid));
- }
- if(gameid2!=0)
- {
- SetIcon(hContact,xgamelist.iconmngr.getGameIconHandle(gameid2),EXTRA_ICON_ADV2);
- }
- }
- }
- return 0;
-}
-
-
-
-extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
-{
- pluginLink=link;
-
- InitializeCriticalSection(&modeMsgsMutex);
- InitializeCriticalSection(&connectingMutex);
- InitializeCriticalSection(&avatarMutex);
-
- Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
-
- //void* init = GetProcAddress(LoadLibrary("atl"),"AtlAxWinInit"); _asm call init;
-
- //keine protoversion in der db, dann wohl der erste start von xfire
- if(DBGetContactSettingByte(NULL,protocolname,"protover",0)==0)
- {
- DBWriteContactSettingByte(NULL,protocolname,"protover",0x84);
- DBWriteContactSettingWord(NULL,protocolname,"avatarloadlatency",1000);
- DBWriteContactSettingByte(NULL,protocolname,"gameico",0);
- DBWriteContactSettingByte(NULL,protocolname,"voiceico",1);
- DBWriteContactSettingByte(NULL,protocolname,"specialavatarload",1);
- DBWriteContactSettingByte(NULL,protocolname,"xfiresitegameico",1);
- DBWriteContactSettingByte(NULL,protocolname,"recprotoverchg",1);
-
- if(MessageBoxA(NULL,Translate("It seems that is the first time you use this plugin. Do you want to automatically download the latest available xfire_games.ini und icons.dll?\r\nWithout the ini xfire cant detect any games on your computer."),"Miranda XFire Protocol Plugin",MB_YESNO|MB_ICONQUESTION)==IDYES)
- {
- DBWriteContactSettingByte(NULL,protocolname,"autoiniupdate",1);
- DBWriteContactSettingByte(NULL,protocolname,"autoicodllupdate",1);
- }
- }
-
-
- XDEBUGS("-----------------------------------------------------\n");
-
- //statusmessages setzen
- strcpy(statusmessage[0],"");
- strcpy(statusmessage[1],"(AFK) Away from Keyboard");
-
- PROTOCOLDESCRIPTOR pd;
- char servicefunction[100];
-
- HookEvent(ME_OPT_INITIALISE, OptInit);
- HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
-
- ZeroMemory(&pd,sizeof(pd));
- pd.cbSize=sizeof(pd);
- pd.szName=protocolname;
- pd.type=PROTOTYPE_PROTOCOL;
- CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
- hLogEvent=CreateHookableEvent("XFireProtocol/Log");
-
- mir_getMMI( &mmi );
- mir_getUTFI( &utfi );
-
- CList_MakeAllOffline();
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_GETCAPS);
- CreateServiceFunction(servicefunction, GetCaps);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_GETNAME);
- CreateServiceFunction(servicefunction, GetName);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_LOADICON);
- CreateServiceFunction(servicefunction, TMLoadIcon);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_SETSTATUS);
- CreateServiceFunction(servicefunction, SetStatus);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_GETSTATUS);
- CreateServiceFunction(servicefunction, GetStatus);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PSS_ADDED);
- CreateServiceFunction(servicefunction, AddtoList);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_ADDTOLIST);
- CreateServiceFunction(servicefunction, SearchAddtoList);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_GETAVATARINFO);
- CreateServiceFunction(servicefunction, GetAvatarInfo);
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_GETMYAVATAR);
- CreateServiceFunction(servicefunction, GetMyAvatar);
-
- //nur bei miranda8 den iconrefresh machen
- if(miranda8) {
- HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, ExtraImageApply);
- HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ExtraListRebuild);
- }
-
- //erstell eine hook für andere plugins damit diese nachprüfen können, ab wann jemand ingame ist oer nicht
- hookgamestart = CreateHookableEvent(XFIRE_INGAMESTATUSHOOK);
-
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PS_BASICSEARCH);
- CreateServiceFunction(servicefunction, BasicSearch);
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PSS_MESSAGE);
- CreateServiceFunction( servicefunction, SendMessage );
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PSS_USERISTYPING);
- CreateServiceFunction( servicefunction, UserIsTyping );
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PSR_MESSAGE);
- CreateServiceFunction( servicefunction, RecvMessage );
-
- strcpy(servicefunction, XFIRE_URLCALL);
- CreateServiceFunction( servicefunction, UrlCall );
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, PSS_GETAWAYMSG);
- CreateServiceFunction( servicefunction, GetAwayMsg );
-
- strcpy(servicefunction, XFIRE_SET_NICK);
- CreateServiceFunction( servicefunction, SetNickName );
-
- strcpy(servicefunction, XFIRE_SEND_PREFS);
- CreateServiceFunction( servicefunction, SendPrefs );
-
-
- //für mtipper, damit man das statusico übertragen kann
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "/GetXStatusIcon");
- CreateServiceFunction( servicefunction, GetXStatusIcon );
-
- char AvatarsFolder[MAX_PATH]= "";
- CallService(MS_DB_GETPROFILEPATH, (WPARAM) MAX_PATH, (LPARAM)AvatarsFolder);
- strcat(AvatarsFolder, "\\");
- strcat(AvatarsFolder, "XFire");
- XFireWorkingFolder = FoldersRegisterCustomPath(protocolname, "Working Folder", AvatarsFolder);
- XFireIconFolder = FoldersRegisterCustomPath(protocolname, "Game Icon Folder", AvatarsFolder);
- strcat(AvatarsFolder, "\\Avatars");
- XFireAvatarFolder = FoldersRegisterCustomPath(protocolname, "Avatars", AvatarsFolder);
-
- //kein folders plugin, verzeichnisse anlegen
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
- CreateDirectory("XFire",NULL);
- CreateDirectory("XFire\\Avatars",NULL);
- }
-
- //erweiterte Kontextmenüpunkte
- CLISTMENUITEM mi = { 0 };
- memset(&mi,0,sizeof(CLISTMENUITEM));
- mi.cbSize = sizeof( mi );
- mi.pszPopupName = protocolname;
-
- //gotoprofilemenüpunkt
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfile");
- CreateServiceFunction(servicefunction,GotoProfile);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.pszContactOwner=protocolname;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszName = LPGEN("&XFire Online Profile");
- CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //gotoxfireclansitemenüpunkt
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoXFireClanSite");
- CreateServiceFunction(servicefunction,GotoXFireClanSite);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.pszContactOwner=protocolname;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszName = LPGEN("XFire &Clan Site");
- gotoclansite=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //kopiermenüpunkt
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GetIPPort");
- CreateServiceFunction(servicefunction,GetIPPort);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("C&opy Server Address and Port");
- copyipport=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //kopiermenüpunkt
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "VoiceIPPort");
- CreateServiceFunction(servicefunction,GetVIPPort);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("Cop&y Voice Server Address and Port");
- vipport=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //joinmenüpunkt
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "JoinGame");
- CreateServiceFunction(servicefunction,JoinGame);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("Join &Game ...");
- joingame=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //joinmenüpunkt
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartThisGame");
- CreateServiceFunction(servicefunction,StartThisGame);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("Play this Game ...");
- startthisgame=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //remove friend
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "RemoveFriend");
- CreateServiceFunction(servicefunction,RemoveFriend);
- mi.pszService = servicefunction;
- mi.position = 2000070000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("Remove F&riend ...");
- removefriend=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //block user
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "BlockFriend");
- CreateServiceFunction(servicefunction,BlockFriend);
- mi.pszService = servicefunction;
- mi.position = 2000070000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("Block U&ser ...");
- blockfriend=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
-
- //my fire profile
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfile2");
- CreateServiceFunction(servicefunction,GotoProfile2);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("&My XFire Online Profile");
- CallService( MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi );
-
- //my activity protocol
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfileAct");
- CreateServiceFunction(servicefunction,GotoProfileAct);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("&Activity Report");
- CallService( MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi );
-
- //rescan my games
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "ReScanMyGames");
- CreateServiceFunction(servicefunction,ReScanMyGames);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("&Rescan my Games ...");
- CallService( MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi );
-
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "SetNick");
- CreateServiceFunction(servicefunction,SetNickDlg);
- mi.pszService = servicefunction;
- mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner=protocolname;
- mi.pszName = LPGEN("Set &Nickname");
- CallService( MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi );
-
- HookEvent( ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu );
-
- EXTRA_ICON_ADV1=icoslot[DBGetContactSettingByte(NULL,protocolname,"gameico",-1)];
- EXTRA_ICON_ADV2=icoslot[DBGetContactSettingByte(NULL,protocolname,"voiceico",-1)];
-
- //lade GetExtendedUdpTable Funktion
- HMODULE hmod=LoadLibraryA("IpHlpApi.dll");
- _GetExtendedUdpTable=(pGetExtendedUdpTable)GetProcAddress(hmod,"GetExtendedUdpTable");
- if(_GetExtendedUdpTable==NULL&&DBGetContactSettingByte(NULL,protocolname,"ipportdetec",0))
- {
- //MessageBoxA(0,"GetExtendedUdpTable not found. ServerIP/Port detection feature will be disabled.","Miranda XFire Protocol Plugin",MB_OK|MB_ICONINFORMATION);
- DBWriteContactSettingByte(NULL,protocolname,"ipportdetec",0);
- XFireLog("Wasn't able to get GetExtendedUdpTable function");
- }
-
- char szFile[MAX_PATH];
- GetModuleFileNameA(hinstance, szFile, MAX_PATH);
-
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszDefaultFile = szFile;
- sid.cx = sid.cy = 16;
- sid.pszSection = (char*)LPGEN( "Protocols/XFire" );
- sid.pszName = "XFIRE_main";
- sid.pszDescription = (char*)Translate("Protocol icon");
- sid.iDefaultIndex = -IDI_TM;
- Skin_AddIcon(&sid);
- return 0;
-}
-
-//funktion liefert für xstatusid den passenden ico zurück, für tipper zb notwendig
-int GetXStatusIcon(WPARAM wParam, LPARAM lParam) {
- if(lParam == LR_SHARED)
- {
- if(wParam>1)
- return (int)xgamelist.iconmngr.getGameIconFromId(wParam-2); //icocache[(int)wParam-2].hicon;
- }
- else
- {
- if(wParam>1)
- return (int)CopyIcon((HICON)xgamelist.iconmngr.getGameIconFromId(wParam-2)/*icocache[(int)wParam-2].hicon*/);
- }
-
- return 0;
-}
-
-int RecvMessage(WPARAM wParam, LPARAM lParam)
-{
- CCSDATA *ccs = ( CCSDATA* )lParam;
- DBDeleteContactSetting(ccs->hContact, "CList", "Hidden");
-
- char *szProto;
- szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) ccs->hContact, 0);
- if ( szProto != NULL && !lstrcmpiA( szProto, protocolname ))
- return CallService( MS_PROTO_RECVMSG, wParam, lParam );
-
- return 1;
-}
-
-static void SetMeAFK( LPVOID param )
-{
- if(bpStatus==ID_STATUS_ONLINE)
- {
- SetStatus(ID_STATUS_AWAY,(LPARAM)param);
- }
-}
-
-static void SetStatusLate( LPVOID param )
-{
- Sleep(1000);
- if(bpStatus==ID_STATUS_OFFLINE)
- {
- SetStatus((WPARAM)param,0);
- }
-}
-
-static void SendAck( LPVOID param )
-{
- ProtoBroadcastAck(protocolname, param, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
-}
-
-static void SendBadAck( LPVOID param )
-{
- ProtoBroadcastAck(protocolname, param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 0, LPARAM(Translate("XFire does not support offline messaging!")));
-}
-
-static int UserIsTyping(WPARAM wParam, LPARAM lParam)
-{
- HANDLE hContact = ( HANDLE )wParam;
- DBVARIANT dbv;
-
- if(lParam==PROTOTYPE_SELFTYPING_ON)
- {
- if(DBGetContactSettingByte(NULL,protocolname,"sendtyping",1)==1)
- {
- if(myClient!=NULL)
- if(myClient->client->connected)
- if(!DBGetContactSettingTString(hContact, protocolname, "Username",&dbv))
- {
- SendTypingPacket typing;
- typing.init(myClient->client, dbv.pszVal);
- myClient->client->send( &typing );
- DBFreeVariant(&dbv);
- }
- }
- }
- else if(lParam==PROTOTYPE_SELFTYPING_OFF)
- {
- }
-
- return 0;
-}
-
-int SendMessage(WPARAM wParam, LPARAM lParam)
-{
- CCSDATA *ccs = (CCSDATA *) lParam;
- PROTORECVEVENT* pre = (PROTORECVEVENT*)ccs->lParam;
- ACKDATA * ack = (ACKDATA*) lParam;
- DBVARIANT dbv;
- int sended=0;
-
- DBGetContactSettingTString(ccs->hContact, protocolname, "Username",&dbv);
- if(myClient!=NULL)
- if(myClient->client->connected&&DBGetContactSettingWord(ccs->hContact, protocolname, "Status", -1)!=ID_STATUS_OFFLINE)
- {
- /*if(myClient->useutf8)
- myClient->sendmsg(dbv.pszVal, ( char* )ccs->lParam);
- else*/
- myClient->sendmsg(dbv.pszVal, mir_utf8encode(( char* )ccs->lParam));
-
- mir_forkthread(SendAck,ccs->hContact);
- sended=1;
- }
- else
- {
- mir_forkthread(SendBadAck,ccs->hContact);
- }
- DBFreeVariant(&dbv);
-
- return sended;
-}
-
-//=======================================================
-//GetCaps
-//=======================================================
-
-int GetCaps(WPARAM wParam,LPARAM lParam)
-{
- if(wParam==PFLAGNUM_1)
- return PF1_BASICSEARCH|PF1_MODEMSG|PF1_IM;
- else if(wParam==PFLAGNUM_2)
- return PF2_ONLINE|PF2_SHORTAWAY; // add the possible statuses here.
- else if(wParam==PFLAGNUM_3)
- return PF2_ONLINE|(DBGetContactSettingByte(NULL,protocolname,"nocustomaway",0)==1?0:PF2_SHORTAWAY);
- else if(wParam==PFLAGNUM_4)
- return PF4_SUPPORTTYPING|PF4_AVATARS;
- else if(wParam==PFLAG_UNIQUEIDTEXT)
- return (int) Translate("Username");
- else if(wParam==PFLAG_UNIQUEIDSETTING)
- return (int)"Username";
- else if(wParam==PFLAG_MAXLENOFMESSAGE)
- return 3996; //255;
- return 0;
-}
-
-//=======================================================
-//GetName (tray icon)
-//=======================================================
-int GetName(WPARAM wParam,LPARAM lParam)
-{
- lstrcpyn((char*)lParam,"XFire",wParam);
- return 0;
-}
-
-//=======================================================
-//TMLoadIcon
-//=======================================================
-int TMLoadIcon(WPARAM wParam,LPARAM lParam)
-{
- if(LOWORD( wParam ) == PLI_PROTOCOL) {
- if(wParam & PLIF_ICOLIB)
- return Skin_GetIcon("XFIRE_main");
- return (int)CopyIcon( Skin_GetIcon("XFIRE_main"));
- }
- return NULL;
-}
-
-
-static void ConnectingThread(LPVOID params)
-{
- WPARAM wParam=(WPARAM)params;
-
- EnterCriticalSection(&connectingMutex);
-
- if(myClient!=NULL&&myClient->client!=NULL)
- myClient->run();
- else
- {
- EnterCriticalSection(&connectingMutex);
- return;
- }
-
- if(myClient->client->connected)
- {
- sendonrecieve=TRUE;
- }
- else
- {
- if(DBGetContactSettingWord(NULL,protocolname,"noconnectfailedbox",0)==0) MSGBOXE(Translate("Unable to connect to XFire."));
- wParam =ID_STATUS_OFFLINE;
- }
-
- int oldStatus;
- oldStatus = bpStatus;
- bpStatus = wParam;
-
- ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
-
- LeaveCriticalSection(&connectingMutex);
-}
-
-//=======================================================
-//SetStatus
-//=======================================================
-int SetStatus(WPARAM wParam,LPARAM lParam)
-{
- int oldStatus;
-
- oldStatus = bpStatus;
-
- if(bpStatus==ID_STATUS_CONNECTING)
- return 0;
-
- if(wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE&&wParam!=ID_STATUS_AWAY&&wParam!=ID_STATUS_RECONNECT)
- if(DBGetContactSettingByte(NULL,protocolname,"oninsteadafk",0)==0)
- wParam=ID_STATUS_AWAY; //protokoll auf away schalten
- else
- wParam=ID_STATUS_ONLINE; //protokoll auf online schalten
-
- if (
- (wParam == ID_STATUS_ONLINE && bpStatus!=ID_STATUS_ONLINE) || // offline --> online
- (wParam == ID_STATUS_AWAY && bpStatus==ID_STATUS_OFFLINE) // offline --> away
- )
- {
- if(bpStatus == ID_STATUS_AWAY) // away --> online
- {
- myClient->Status(statusmessage[0]);
- }
- else
- {
- // the status has been changed to online (maybe run some more code)
- DBVARIANT dbv;
- DBVARIANT dbv2;
-
- if(DBGetContactSetting(NULL,protocolname,"login",&dbv))
- {
- MSGBOXE(Translate("No Loginname is set!"));
- wParam=ID_STATUS_OFFLINE;
- }
- else if(DBGetContactSetting(NULL,protocolname,"password",&dbv2))
- {
- MSGBOXE(Translate("No Password is set!"));
- wParam=ID_STATUS_OFFLINE;
- }
- else
- {
- CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv2.pszVal)+1,(LPARAM)dbv2.pszVal);
-
- if(myClient!=NULL)
- delete myClient;
-
- //alter proxycode, entfernt da über netlib die proxysache geregelt wird
- /* if(DBGetContactSettingByte(NULL, protocolname, "useproxy" ,0))
- {
- //verbindung über proxy
- DBVARIANT dbv3;
- DBVARIANT dbv4;
- if(!DBGetContactSetting(NULL,protocolname,"proxyip",&dbv3))
- {
- if(!DBGetContactSetting(NULL,protocolname,"proxyport",&dbv4))
- {
- myClient = new XFireClient(dbv.pszVal,dbv2.pszVal,DBGetContactSettingByte(NULL,protocolname,"protover",0),1,dbv3.pszVal,atoi(dbv4.pszVal));
- DBFreeVariant(&dbv4);
- }
- DBFreeVariant(&dbv3);
- }
- }
- else */
- myClient = new XFireClient(dbv.pszVal,dbv2.pszVal,DBGetContactSettingByte(NULL,protocolname,"protover",0));
-
- //prüfe ob utf8 option aktiv, dann schlater auf true
- if(DBGetContactSettingByte(NULL,protocolname,"useutf8",0))
- {
- myClient->useutf8=TRUE;
- }
-
-
- //verbindung als thread
- bpStatus = ID_STATUS_CONNECTING;
- ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,ID_STATUS_CONNECTING);
-
- mir_forkthread(ConnectingThread,(LPVOID)wParam);
- //alte verb
- /*
- myClient->run();
-
- if(myClient->client->connected)
- {
- sendonrecieve=TRUE;
- }
- else
- {
- MSGBOXE(Translate("Unable to connect to XFire."));
- wParam =ID_STATUS_OFFLINE;
- }
- */
- //für die vars
- DBDeleteContactSetting(NULL,protocolname,"currentgamename");
- DBDeleteContactSetting(NULL,protocolname,"currentvoicename");
- DBDeleteContactSetting(NULL,protocolname,"VServerIP");
- DBDeleteContactSetting(NULL,protocolname,"ServerIP");
-
- DBFreeVariant(&dbv);
- DBFreeVariant(&dbv2);
- return 0;
- }
- }
- }
- else if (wParam == ID_STATUS_AWAY && bpStatus!=ID_STATUS_AWAY)
- {
- if(bpStatus == ID_STATUS_OFFLINE) // nix
- {
- }
- else if(myClient!=NULL&&myClient->client->connected) // online --> afk
- {
- //setze bei aktivem nocustomaway die alte awaystatusmsg zurück, bugfix
- if(DBGetContactSettingByte(NULL,protocolname,"nocustomaway",0))
- strcpy_s(statusmessage[1],1024,"(AFK) Away from Keyboard");
-
- myClient->Status(statusmessage[1]);
- }
- }
- else if ((wParam == ID_STATUS_OFFLINE || wParam == ID_STATUS_RECONNECT) && bpStatus!=ID_STATUS_OFFLINE) // * --> offline
- {
- SetEvent(hConnectionClose);
-
- // the status has been changed to offline (maybe run some more code)
- if(myClient!=NULL)
- if(myClient->client->connected)
- myClient->client->disconnect();
- CList_MakeAllOffline();
-
- //teamspeak/ventrilo pid sowie gamepid auf NULL setzen, damit bei einem reconnect die neuerkannt werden
- pid=NULL;
- ts2pid=NULL;
- DBWriteContactSettingWord(NULL,protocolname,"currentgame",0);
- DBWriteContactSettingWord(NULL,protocolname,"currentvoice",0);
- DBDeleteContactSetting(NULL,protocolname, "VServerIP");
- DBDeleteContactSetting(NULL,protocolname, "ServerIP");
-
- if(wParam == ID_STATUS_RECONNECT)
- {
- mir_forkthread(SetStatusLate,(LPVOID)oldStatus);
- wParam = ID_STATUS_OFFLINE;
- }
- }
- else
- {
- // the status has been changed to unknown (maybe run some more code)
- }
- //broadcast the message
- bpStatus = wParam;
- ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
-
-
- return 0;
-}
-
-//=======================================================
-//GetStatus
-//=======================================================
-int GetStatus(WPARAM wParam,LPARAM lParam)
-{
- if (bpStatus == ID_STATUS_ONLINE)
- return ID_STATUS_ONLINE;
- else if (bpStatus == ID_STATUS_AWAY)
- return ID_STATUS_AWAY;
- else if (bpStatus == ID_STATUS_CONNECTING)
- return ID_STATUS_CONNECTING;
- else
- return ID_STATUS_OFFLINE;
-}
-
-HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
-{
- HANDLE hContact;
-
- if (xfc.username == NULL)
- return 0;
-
- // here we create a new one since no one is to be found
- hContact = (HANDLE) CallService( MS_DB_CONTACT_ADD, 0, 0);
- if ( hContact ) {
- CallService( MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM)protocolname );
-
- if ( InList )
- DBDeleteContactSetting(hContact, "CList", "NotOnList");
- else
- DBWriteContactSettingByte(hContact, "CList", "NotOnList", 1);
- DBDeleteContactSetting(hContact, "CList", "Hidden");
-
- if(strlen(xfc.nick)>0)
- {
- if(myClient->useutf8)
- DBWriteContactSettingUTF8String(hContact, protocolname, "Nick", xfc.nick);
- else
- DBWriteContactSettingTString(hContact, protocolname, "Nick", mir_utf8decode(( char* )xfc.nick,NULL));
- }
- else if(strlen(xfc.username)>0)
- DBWriteContactSettingTString(hContact, protocolname, "Nick", xfc.username);
-
- DBWriteContactSettingTString(hContact, protocolname, "Username", xfc.username);
-
- //DBWriteContactSettingTString(hContact, protocolname, "Screenname", xfc.nick);
- DBWriteContactSettingDword(hContact, protocolname, "UserId", xfc.id);
-
- if(clan>0)
- DBWriteContactSettingDword(hContact, protocolname, "Clan", clan);
-
- DBWriteContactSettingWord(hContact, protocolname, "Status", SetOnline ? ID_STATUS_ONLINE:ID_STATUS_OFFLINE);
-
- if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)==0)
- {
- if(!DBGetContactSettingByte(NULL,protocolname,"specialavatarload",0))
- {
- XFire_SetAvatar* xsa=new XFire_SetAvatar;
- xsa->hContact=hContact;
- xsa->username=new char[strlen(xfc.username)+1];
- strcpy(xsa->username,xfc.username);
- mir_forkthread(SetAvatar,(LPVOID)xsa);
- }
- else
- {
- /*
- scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
- getestet mit clanbuddy's >270 members
-
- mit hilfe der buddyinfos kann man den avatar laden und screenshot infos etc bekommt man auch
- */
- GetBuddyInfo* buddyinfo=new GetBuddyInfo();
- buddyinfo->userid=xfc.id;
- mir_forkthread(SetAvatar2,(LPVOID)buddyinfo);
- }
-
-
- }
-
- if (xfc.id==0) {
- DBWriteContactSettingByte( hContact, "CList", "NotOnList", 1 );
- DBWriteContactSettingByte( hContact, "CList", "Hidden", 1 );
- }
-
- return hContact;
- }
- return false;
-}
-
-BOOL IsXFireContact(HANDLE hContact)
-{
- char *szProto;
- szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if ( szProto != NULL && !lstrcmpiA( szProto, protocolname )) {
- return TRUE;
- }
- else
- return FALSE;
-}
-
-HANDLE CList_FindContact (int uid)
-{
- char *szProto;
-
- HANDLE hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0);
- while (hContact) {
- szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if ( szProto != NULL && !lstrcmpiA( szProto, protocolname )) {
- if ( DBGetContactSettingDword(hContact, protocolname, "UserId",-1)==uid)
- {
- return (HANDLE)hContact;
- }
- }
- hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
- }
- return 0;
-}
-
-void CList_MakeAllOffline()
-{
- vector<HANDLE> fhandles;
- char *szProto;
- HANDLE hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0);
- while (hContact) {
- szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if ( szProto != NULL && !lstrcmpiA( szProto, protocolname )) {
- //freunde von freunden in eine seperate liste setzen
- //nur wenn das nicht abgestellt wurde
- if(DBGetContactSettingByte(hContact,protocolname,"friendoffriend",0)==1&&
- DBGetContactSettingByte(NULL,protocolname,"fofdbremove",0)==1)
- {
- fhandles.push_back(hContact);
- }
-
- //DBDeleteContactSetting(hContact, protocolname, "XStatusMsg");
- //DBDeleteContactSetting(hContact, protocolname, "XStatusId");
- //DBDeleteContactSetting(hContact, protocolname, "XStatusName");
- //DBDeleteContactSetting(hContact, "CList", "StatusMsg");
- DBDeleteContactSetting(hContact, protocolname, "ServerIP");
- DBDeleteContactSetting(hContact, protocolname, "Port");
- DBDeleteContactSetting(hContact, protocolname, "ServerName");
- DBDeleteContactSetting(hContact, protocolname, "GameType");
- DBDeleteContactSetting(hContact, protocolname, "Map");
- DBDeleteContactSetting(hContact, protocolname, "Players");
- DBDeleteContactSetting(hContact, protocolname, "Passworded");
-
- DBWriteContactSettingTString(hContact, "CList", "StatusMsg", "");
- DBDeleteContactSetting(hContact, protocolname, "XStatusMsg");
- DBDeleteContactSetting(hContact, protocolname, "XStatusId");
- DBDeleteContactSetting(hContact, protocolname, "XStatusName");
-
- if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)==1)
- {
- DBDeleteContactSetting(hContact, "ContactPhoto", "File");
- DBDeleteContactSetting(hContact, "ContactPhoto", "RFile");
- DBDeleteContactSetting(hContact, "ContactPhoto", "Backup");
- DBDeleteContactSetting(hContact, "ContactPhoto", "Format");
- DBDeleteContactSetting(hContact, "ContactPhoto", "ImageHash");
- DBDeleteContactSetting(hContact, "ContactPhoto", "XFireAvatarId");
- DBDeleteContactSetting(hContact, "ContactPhoto", "XFireAvatarMode");
- }
- else
- {
- //prüf ob der avatar noch existiert
- DBVARIANT dbv;
- if(!DBGetContactSettingTString(hContact, "ContactPhoto", "File",&dbv))
- {
- FILE*f=fopen(dbv.pszVal,"r");
- if(f==NULL)
- {
- DBDeleteContactSetting(hContact, "ContactPhoto", "File");
- DBDeleteContactSetting(hContact, "ContactPhoto", "RFile");
- DBDeleteContactSetting(hContact, "ContactPhoto", "Backup");
- DBDeleteContactSetting(hContact, "ContactPhoto", "Format");
- DBDeleteContactSetting(hContact, "ContactPhoto", "ImageHash");
- DBDeleteContactSetting(hContact, "ContactPhoto", "XFireAvatarId");
- DBDeleteContactSetting(hContact, "ContactPhoto", "XFireAvatarMode");
- }
- else
- {
- fclose(f);
- }
- DBFreeVariant(&dbv);
- }
- }
- DBWriteContactSettingWord(hContact,protocolname,"Status",ID_STATUS_OFFLINE);
- }
- hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
- }
- //alle gefundenen handles lsöchen
- for(uint i=0;i<fhandles.size();i++)
- {
- CallService( MS_DB_CONTACT_DELETE, (WPARAM) fhandles.at(i), 0);
- }
-}
-
-void SetIcon(HANDLE hcontact,HANDLE hicon,int ctype)
-{
- IconExtraColumn iec;
- iec.cbSize = sizeof(iec);
- iec.hImage = hicon;
- iec.ColumnType = ctype;
- CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM)hcontact, (LPARAM)&iec);
-}
-
-void SetAvatar2(LPVOID lparam) {
- static int lasttime=0;
- int sleep=DBGetContactSettingWord(NULL,protocolname,"avatarloadlatency",1000);
- lasttime+=sleep;
-
- if(mySleep(lasttime,hConnectionClose))
- {
- delete lparam;
- lasttime-=sleep;
- return;
- }
-
- GetBuddyInfo* buddyinfo=(GetBuddyInfo*)lparam;
- if(myClient!=NULL)
- if(myClient->client->connected)
- myClient->client->send( buddyinfo );
-
- delete lparam;
- lasttime-=sleep;
-}
-
-void SetAvatar(LPVOID lparam)
-//void SetAvatar(HANDLE hContact, char* username)
-{
- //EnterCriticalSection(&avatarMutex);
- //WaitForSingleObject(hMutex, INFINITE);
- static int lasttime=0;
- int sleep=DBGetContactSettingWord(NULL,protocolname,"avatarloadlatency",250);
-
- if(bpStatus==ID_STATUS_OFFLINE)
- return;
-
- lasttime+=sleep;
- //Sleep(lasttime);
- if(mySleep(lasttime,hConnectionClose))
- {
- delete lparam;
- lasttime-=sleep;
- return;
- }
-
- if(bpStatus==ID_STATUS_OFFLINE)
- return;
-
- XFireAvatar av;
-
- XFire_SetAvatar* xsa=(XFire_SetAvatar*)lparam;
-
- if(xsa->hContact==NULL)
- return;
-
- if(GetAvatar(xsa->username,&av))
- {
- PROTO_AVATAR_INFORMATION AI;
- AI.cbSize = sizeof(AI);
- AI.format = av.type;
- AI.hContact = xsa->hContact;
- lstrcpy(AI.filename,av.file);
- ProtoBroadcastAck(protocolname, xsa->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS,(HANDLE) &AI, 0);
- }
-
- delete(xsa);
- //ReleaseMutex(hMutex);
-
- lasttime-=sleep;
-}
-
-BOOL GetAvatar(char* username,XFireAvatar* av)
-{
- BOOL status=FALSE;
-
- if(av==NULL||username==NULL)
- return FALSE;
-
- char address[256]="http://www.xfire.com/profile/";
- strcat_s(address,256,username);
- strcat_s(address,256,"/");
-
- //netlib request
- NETLIBHTTPREQUEST nlhr={0},*nlhrReply;
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType= REQUEST_GET;
- nlhr.flags = NLHRF_NODUMP|NLHRF_GENERATEHOST|NLHRF_SMARTAUTHHEADER;
- nlhr.szUrl = address;
-
- nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
- if(nlhrReply) {
- //nicht auf dem server
- if (nlhrReply->resultCode != 200) {
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- return FALSE;
- }
- //keine daten für mich
- else if (nlhrReply->dataLength < 1 || nlhrReply->pData == NULL)
- {
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- return FALSE;
- }
- else
- {
- //fwrite(nlhrReply->pData,nlhrReply->dataLength,1,f);
-
- //id wo angefangen wird, die adresse "rauszuschneiden"
- char avatarid[]="m_user_avatar_img_wrapper";
- char* pointer_av=avatarid;
- //ende des datenbuffers
- char* deathend=nlhrReply->pData+nlhrReply->dataLength;
- char* pointer=nlhrReply->pData;
- //status ob gefunden oder nich
- BOOL found=FALSE;
-
- while(pointer<deathend&&*pointer_av!=0)
- {
- if(*pointer_av==*pointer)
- {
- pointer_av++;
- if(pointer_av-avatarid>4)
- found=TRUE;
- }
- else
- pointer_av=avatarid;
-
- pointer++;
- }
- //was gefunden, nun das bild raustrennen
- if(*pointer_av==0)
- {
- char * pos = NULL;
- pos=strchr(pointer,'/');
- pos-=5;
- pointer=pos;
-
- pos=strchr(pointer,' ');
- if(pos)
- {
- pos--;
- *pos=0;
-
- //analysieren, welchent typ das bild hat
- pos=strrchr(pointer,'.');
- if(pos)
- {
- char filename[512];
- FoldersGetCustomPath( XFireAvatarFolder, filename, 1024, 'A' );
- strcat(filename,"\\");
- strcat(filename,username);
-
- pos++;
- //gif?!?!
- if(*pos=='g'&&
- *(pos+1)=='i'&&
- *(pos+2)=='f')
- {
- av->type=PA_FORMAT_GIF;
- strcat(filename,".gif");
- }
- else//dann kanns nur jpg sein
- {
- av->type=PA_FORMAT_JPEG;
- strcat(filename,".jpg");
- }
-
- //verusch das bild runterladen
- if(GetWWWContent2(pointer,filename,FALSE))
- {
- strcpy_s(av->file,256,filename); //setzte dateinamen
- status=TRUE; //avatarladen hat geklappt, cool :)
- }
- }
- }
- }
- }
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- }
-
- return status;
-}
-
-static int GetIPPort(WPARAM wParam,LPARAM lParam)
-{
- char temp[XFIRE_MAX_STATIC_STRING_LEN];
- HGLOBAL clipbuffer;
- char* buffer;
-
- if(DBGetContactSettingWord((HANDLE)wParam, protocolname, "Port", -1)==0)
- return 0;
-
- DBVARIANT dbv;
- if(DBGetContactSettingTString((HANDLE)wParam, protocolname, "ServerIP",&dbv))
- return 0;
-
- sprintf(temp,"%s:%d",dbv.pszVal,DBGetContactSettingWord((HANDLE)wParam, protocolname, "Port", -1));
-
- DBFreeVariant(&dbv);
-
- if(OpenClipboard(NULL))
- {
- EmptyClipboard();
-
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(temp)+1);
- buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(temp));
- GlobalUnlock(clipbuffer);
-
- SetClipboardData(CF_TEXT, clipbuffer);
- CloseClipboard();
- }
-
- return 0;
-}
-
-static int GetVIPPort(WPARAM wParam,LPARAM lParam)
-{
- char temp[XFIRE_MAX_STATIC_STRING_LEN];
- HGLOBAL clipbuffer;
- char* buffer;
-
- if(DBGetContactSettingWord((HANDLE)wParam, protocolname, "VPort", -1)==0)
- return 0;
-
- DBVARIANT dbv;
- if(DBGetContactSettingTString((HANDLE)wParam, protocolname, "VServerIP",&dbv))
- return 0;
-
- sprintf(temp,"%s:%d",dbv.pszVal,DBGetContactSettingWord((HANDLE)wParam, protocolname, "VPort", -1));
-
- DBFreeVariant(&dbv);
-
- if(OpenClipboard(NULL))
- {
- EmptyClipboard();
-
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(temp)+1);
- buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(temp));
- GlobalUnlock(clipbuffer);
-
- SetClipboardData(CF_TEXT, clipbuffer);
- CloseClipboard();
- }
-
- return 0;
-}
-
-static int GotoProfile(WPARAM wParam,LPARAM lParam)
-{
- DBVARIANT dbv;
- char temp[64]="";
-
- if(DBGetContactSettingTString((HANDLE)wParam, protocolname, "Username",&dbv))
- return 0;
-
- strcpy(temp,"http://xfire.com/profile/");
- strcat_s(temp,64,dbv.pszVal);
- DBFreeVariant(&dbv);
-
- CallService( MS_UTILS_OPENURL, 1, (LPARAM)temp );
-
- return 0;
-}
-
-static int GotoXFireClanSite(WPARAM wParam,LPARAM lParam) {
- DBVARIANT dbv;
- char temp[64]="";
-
- int clanid=DBGetContactSettingDword((HANDLE)wParam, protocolname, "Clan",-1);
- sprintf(temp,"ClanUrl_%d",clanid);
-
- if(DBGetContactSettingTString(NULL, protocolname, temp,&dbv))
- return 0;
-
- strcpy(temp,"http://xfire.com/clans/");
- strcat_s(temp,64,dbv.pszVal);
- DBFreeVariant(&dbv);
-
- CallService( MS_UTILS_OPENURL, 1, (LPARAM)temp );
-
- return 0;
-}
-
-static int GotoProfile2(WPARAM wParam,LPARAM lParam)
-{
- DBVARIANT dbv;
- char temp[64]="";
-
- if(DBGetContactSettingTString(NULL, protocolname, "login",&dbv))
- return 0;
-
- strcpy(temp,"http://xfire.com/profile/");
- strcat_s(temp,64,dbv.pszVal);
- DBFreeVariant(&dbv);
-
- CallService( MS_UTILS_OPENURL, 1, (LPARAM)temp );
-
- //prefrences pakcet senden
- //XFirePrefPacket *packet2 = new XFirePrefPacket();
- //myClient->client->send( packet2 );
- //delete(packet2);
-
- return 0;
-}
-
-static int GotoProfileAct(WPARAM wParam,LPARAM lParam)
-{
- DBVARIANT dbv;
- char temp[64]="";
-
- if(DBGetContactSettingTString(NULL, protocolname, "login",&dbv))
- return 0;
-
- strcpy(temp,"http://www.xfire.com/?username=");
- strcat_s(temp,64,dbv.pszVal);
- DBFreeVariant(&dbv);
-
- CallService( MS_UTILS_OPENURL, 1, (LPARAM)temp );
-
- //prefrences pakcet senden
- //XFirePrefPacket *packet2 = new XFirePrefPacket();
- //myClient->client->send( packet2 );
- //delete(packet2);
-
- return 0;
-}
-
-int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
-{
- CLISTMENUITEM clmi = { 0 };
- clmi.cbSize = sizeof( clmi );
- CLISTMENUITEM clmi2 = { 0 };
- clmi2.cbSize = sizeof( clmi2 );
- CLISTMENUITEM clmi3 = { 0 };
- clmi3.cbSize = sizeof( clmi3 );
- CLISTMENUITEM clmi4 = { 0 };
- clmi4.cbSize = sizeof( clmi4 );
- CLISTMENUITEM clmi5 = { 0 };
- clmi5.cbSize = sizeof( clmi5 );
- CLISTMENUITEM clmi6 = { 0 };
- clmi6.cbSize = sizeof( clmi6 );
- CLISTMENUITEM clmi7 = { 0 };
- clmi7.cbSize = sizeof( clmi7 );
- CLISTMENUITEM clmi8 = { 0 };
- clmi8.cbSize = sizeof( clmi8 );
-
- //kopieren von port und ip nur erlauben, wenn verfügbar
- clmi.flags = CMIM_FLAGS;
- clmi2.flags = CMIM_FLAGS;
- clmi3.flags = CMIM_FLAGS;
- clmi4.flags = CMIM_FLAGS;
- clmi5.flags = CMIM_FLAGS;
- clmi6.flags = CMIM_FLAGS;
- clmi7.flags = CMIM_FLAGS;
- clmi8.flags = CMIM_FLAGS;
-
- DBVARIANT dbv;
- if(DBGetContactSettingTString((HANDLE)wParam, protocolname, "ServerIP",&dbv))
- clmi.flags|= CMIF_HIDDEN;
- else
- DBFreeVariant(&dbv);
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )copyipport, ( LPARAM )&clmi );
-
- //kopieren von voice port und ip nur erlauben, wenn verfügbar
- DBVARIANT dbv2;
- if(DBGetContactSettingTString((HANDLE)wParam, protocolname, "VServerIP",&dbv2))
- {
- clmi2.flags|= CMIF_HIDDEN;
- }
- else
- DBFreeVariant(&dbv2);
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )vipport, ( LPARAM )&clmi2 );
-
- //clansite nur bei clanmembern anbieten
- if(DBGetContactSettingDword((HANDLE)wParam, protocolname, "Clan",0)==0)
- clmi3.flags|= CMIF_HIDDEN;
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )gotoclansite, ( LPARAM )&clmi3 );
-
- //NotOnList
- if(DBGetContactSettingDword((HANDLE)wParam, "CList", "NotOnList",0)==0)
- clmi5.flags|= CMIF_HIDDEN;
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )blockfriend, ( LPARAM )&clmi5 );
-
- //speichere gameid ab
- int gameid=DBGetContactSettingWord((HANDLE)wParam, protocolname, "GameId",0);
- //spiel in xfirespieliste?
- if(!xgamelist.Gameinlist(gameid))
- {
- //nein, dann start und join auf unsichbar schalten
- clmi7.flags|= CMIF_HIDDEN;
- clmi4.flags|= CMIF_HIDDEN;
- }
- else
- {
- //gameobject holen
- Xfire_game* game=xgamelist.getGamebyGameid(gameid);
- //hat das spiel netzwerkparameter?
- if(game)
- {
- if(game->networkparams)
- {
- //is beim buddy ein port hinterlegt, also spielt er im internet?
- if(!DBGetContactSettingDword((HANDLE)wParam, protocolname, "Port",0))
- {
- //nein, dann join button auch ausblenden
- clmi4.flags|= CMIF_HIDDEN;
- }
- }
- else
- clmi4.flags|= CMIF_HIDDEN;
- }
- else
- clmi4.flags|= CMIF_HIDDEN;
- }
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )joingame, ( LPARAM )&clmi4 );
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )startthisgame, ( LPARAM )&clmi7 );
-
-
- //remove freind nur bei noramlen buddies
- if(DBGetContactSettingByte((HANDLE)wParam, protocolname, "friendoffriend",0)==1)
- clmi8.flags|= CMIF_HIDDEN;
-
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )removefriend, ( LPARAM )&clmi8 );
-
- return 0;
-}
-
-//wird beim miranda start ausgeführt, lädt spiele und startet gamedetection
-#ifndef NO_PTHREAD
-void *inigamedetectiont(void *ptr)
-#else
-void inigamedetectiont(LPVOID lParam)
-#endif
-{
- Scan4Games(NULL);
-#ifndef NO_PTHREAD
- return gamedetectiont(ptr);
-#else
- gamedetectiont(NULL);
-#endif
-
-}
-
-void SetXFireGameStatusMsg(Xfire_game* game)
-{
- char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
- static char statusmsg[100]="";
-
- //kein gameobject, dann abbrechen
- if(!game) return;
-
- if(!game->statusmsg)
- {
- xgamelist.getIniValue(game->id,"XUSERStatusMsg",statusmsg,100);
- }
- else
- {
- strcpy_s(statusmsg,100,game->statusmsg);
- }
-
- if(statusmsg[0]!=0)
- if(myClient!=NULL)
- if(myClient->client->connected)
- myClient->Status(statusmsg);
-
-}
-
-#ifndef NO_PTHREAD
-void *gamedetectiont(void *ptr)
-#else
-void gamedetectiont(LPVOID lparam)
-#endif
-{
- DWORD ec; //exitcode der processid
- int ts2port=0;
- int vid=0;
- char ts2ip[4]={0,0,0,0};
- char temp[200];
- Xfire_game* currentgame=NULL;
- BOOL disabledsound=FALSE;
- BOOL disabledpopups=FALSE;
-
- //vaiable zum spielzeit messen
- time_t t1;
-
-
- if(DBGetContactSettingByte(NULL,protocolname,"nogamedetect",0))
-#ifndef NO_PTHREAD
- return ptr;
-#else
- return;
-#endif
-
- DWORD lowpids=DBGetContactSettingByte(NULL,protocolname,"skiplowpid",100);
-
- //XFireLog("XFire Gamedetectionthread started ...","");
-
- while(1)
- {
- //Sleep(12000);
- //XFireLog("12 Sek warten ...","");
- if(mySleep(12000,hGameDetection))
- {
-#ifndef NO_PTHREAD
- return ptr;
-#else
- return;
-#endif
- }
-
-#ifndef NO_PTHREAD
- pthread_testcancel();
-#else
- if(Miranda_Terminated())
- return;
-#endif
-
- if(myClient!=NULL)
- if(!myClient->client->connected)
- {
- //XFireLog("PID und TSPID resett ...","");
- ts2pid=pid=0;
- //voicechat internen status zurücksetzen
- voicechat.resetCurrentvoicestatus();
- }
- /*
- else*/
- {
- //erstmal nach TS2 suchen
- //XFireLog("Teamspeak detection ...","");
- if(DBGetContactSettingByte(NULL,protocolname,"ts2detection",0))
- {
- SendGameStatus2Packet *packet = new SendGameStatus2Packet();
- if(voicechat.checkVoicechat(packet)) {
- if(myClient!=NULL)
- {
- XFireLog("Send voicechat infos ...");
- myClient->client->send( packet );
- }
- }
- delete packet;
-
- //nach ts3 mapfile suchen
- //HANDLE hMapObject = OpenFileMappingA(FILE_MAP_READ, FALSE, "$ts3info4xfire$");
- //if (hMapObject) {
- //}
- //wenn remote feature aktiviert, darüber ip erkennen
- /*if(DBGetContactSettingByte(NULL,protocolname,"ts2useremote",0))
- {
- //ipholen
- SendGameStatus2Packet *packet = new SendGameStatus2Packet();
- if(TSSetupPacket(packet,&ts2pid,&ts2port))
- {
- DBWriteContactSettingWord(NULL,protocolname,"currentvoice",packet->gameid);
-
- if(packet->ip[3]!=0)
- {
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
- DBWriteContactSettingTString(NULL, protocolname, "VServerIP", temp);
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Teamspeak");
- }
- else
- {
- DBDeleteContactSetting(NULL,protocolname, "VServerIP");
- DBDeleteContactSetting(NULL,protocolname, "currentvoicename");
- }
-
- if(myClient!=NULL)
- myClient->client->send( packet );
- }
- delete packet;
-
- }
- else
- {
- if(!ts2pid)
- {
- if(FindTeamSpeak(&ts2pid,&vid))
- {
- //gefunden, serverdaten scannen
- SendGameStatus2Packet *packet = new SendGameStatus2Packet();
- if(myClient!=NULL)
- if(GetServerIPPort2(ts2pid,myClient->client->localaddr,myClient->client->llocaladdr,&packet->ip[3],&packet->ip[2],&packet->ip[1],&packet->ip[0],&packet->port))
- {
- if(packet->port!=0)
- {
- packet->gameid=vid;
-
- if(vid==32)
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Teamspeak");
- else if(vid==33)
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Ventrilo");
- else if(vid==34)
- DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Mumble");
-
- DBWriteContactSettingWord(NULL,protocolname,"currentvoice",vid);
-
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
- DBWriteContactSettingTString(NULL, protocolname, "VServerIP", temp);
-
- if(myClient!=NULL)
- myClient->client->send( packet );
- }
- }
- delete packet;
- }
- }
- else
- {
- //HANDLE op=OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ts2pid);
- //if(op!=NULL) GetExitCodeProcess(op,&ec);
-
- //if(ec!=STILL_ACTIVE) //nicht mehr offen
- if (GetProcessVersion(ts2pid) == 0)
- {
- SendGameStatus2Packet *packet = new SendGameStatus2Packet();
- packet->gameid=0;
- DBWriteContactSettingWord(NULL,protocolname,"currentvoice",0);
- DBDeleteContactSetting(NULL,protocolname, "VServerIP");
- DBDeleteContactSetting(NULL,protocolname, "currentvoicename");
-
- if(myClient!=NULL)
- myClient->client->send( packet );
- ts2pid=0;
- delete packet;
- }
- else
- {
- SendGameStatus2Packet *packet = new SendGameStatus2Packet();
- if(myClient!=NULL)
- if(GetServerIPPort2(ts2pid,myClient->client->localaddr,myClient->client->llocaladdr,&packet->ip[3],&packet->ip[2],&packet->ip[1],&packet->ip[0],&packet->port))
- {
- if(packet->port!=0)
- {
- packet->gameid=vid;
- DBWriteContactSettingWord(NULL,protocolname,"currentvoice",vid);
-
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
- DBWriteContactSettingTString(NULL, protocolname, "VServerIP", temp);
-
- if(myClient!=NULL)
- myClient->client->send( packet );
- }
- }
- delete packet;
- }
- //if(op!=NULL) CloseHandle(op);
- }
- }*/
- }
-
- if(currentgame!=NULL)
- {
-
- //XFireLog("XFire Gamedetection - Game still running ...","");
-
- //prüf ob das spiel noch offen
- ec=0;
- //HANDLE op=OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
- //if(op!=NULL) GetExitCodeProcess(op,&ec);
-
- //if(GetLastError()==5) //anwendung ist noch offen und der zugriff wird noch darauf blockiert
- //{
- //
- //}
- //else if(ec!=STILL_ACTIVE) //nicht mehr offen
-
- if (!xgamelist.isValidPid(pid))
- {
- //XFireLog("XFire Gamedetection - Game was closed ID: %i",currentgame);
- SendGameStatusPacket *packet = new SendGameStatusPacket();
- packet->gameid=0;
- if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
- if(myClient!=NULL)
- myClient->client->send( packet );
-
- //spielzeit messen
- time_t t2=time(NULL);
- time_t t3=t2-t1;
- tm * mytm=gmtime(&t3);
-
- //statusmsg von xfire zurücksetzen
- if(currentgame->setstatusmsg)
- {
- if(myClient!=NULL)
- if(myClient->client->connected)
- if(bpStatus==ID_STATUS_ONLINE)
- myClient->Status(statusmessage[0]);
- else if(bpStatus==ID_STATUS_AWAY)
- myClient->Status(statusmessage[1]);
- }
-
- sprintf(temp,Translate("Last game: %s playtime: %.2d:%.2d:%.2d"),currentgame->name,mytm->tm_hour,mytm->tm_min,mytm->tm_sec);
- DBWriteContactSettingTString(NULL, protocolname, "LastGame", temp);
-
- if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
- SetOldStatusMsg();
-
- DBWriteContactSettingWord(NULL,protocolname,"currentgame",0);
- DBDeleteContactSetting(NULL,protocolname,"currentgamename");
-
- //popup wieder aktivieren, menuservice funk aufrufen, nur wenn popups vorher abgestellt wurden
- if(disabledpopups)
- if(DBGetContactSettingByte(NULL,protocolname,"nopopups",0))
- {
- if(ServiceExists("PopUp/EnableDisableMenuCommand"))
- {
- CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
- }
- else if(ServiceExists("PopUp/ToggleEnabled"))
- {
- CallService("PopUp/ToggleEnabled",NULL,NULL);
- }
- disabledpopups=FALSE;
- }
- //sound wieder aktivieren, nur wenn es vorher abgestellt wurde
- if(disabledsound)
- if(DBGetContactSettingByte(NULL,protocolname,"nosoundev",0))
- {
- DBWriteContactSettingByte(NULL,"Skin","UseSound",1);
- disabledsound=FALSE;
- }
-
- //bug beseitigt, wenn spiel beendet, alte ip entfernen
- DBDeleteContactSetting(NULL,protocolname, "ServerIP");
-
- pid=NULL;
- currentgame=NULL;
- xgamelist.SetGameStatus(FALSE);
-
- NotifyEventHooks(hookgamestart,0,0);
-
- delete packet;
- }
- else //noch offen
- {
- //XFireLog("Spiel noch offen ...","");
- //nur nwspiele nach ip/port scannen
- if(DBGetContactSettingByte(NULL,protocolname,"ipportdetec",0))
- if(currentgame->networkparams!=NULL&&currentgame->send_gameid>0)
- {
- SendGameStatusPacket *packet = new SendGameStatusPacket();
- //verscueh serverip und port zu scannen
-
- //XFireLog("IPPort detection ...","");
- if(GetServerIPPort(pid,myClient->client->localaddr,myClient->client->llocaladdr,&packet->ip[3],&packet->ip[2],&packet->ip[1],&packet->ip[0],&packet->port))
- {
-
- if(packet->ip[3]!=0)
- {
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
- DBWriteContactSettingTString(NULL, protocolname, "ServerIP", temp);
- }
- else
- DBDeleteContactSetting(NULL,protocolname, "ServerIP");
-
- packet->gameid=currentgame->send_gameid;
- if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
- if(myClient!=NULL)
- myClient->client->send( packet );
-
- if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
- SetGameStatusMsg();
- }
- delete packet;
- }
- //XFireLog("fertig ...","");
- //packet->=xf[currentgame].gameid2;
- }
-
- //if(op!=NULL) CloseHandle(op);
- }
- else
- {
- //XFireLog("nach spiel suchen ...","");
- //hardcoded game detection
- HANDLE hSnapShot = CreateToolhelp32Snapshot ( TH32CS_SNAPALL, 0);
- PROCESSENTRY32* processInfo = new PROCESSENTRY32;
- processInfo->dwSize = sizeof ( PROCESSENTRY32);
-
- XFireLog("XFire Gamedetection - Suche laufende Spiele ...");
-
- //gamelist blocken
- xgamelist.Block(TRUE);
-
-
- while ( Process32Next ( hSnapShot,processInfo ) != FALSE && currentgame==NULL)
- {
- //überspringe niedrige pids
- if(processInfo->th32ProcessID<lowpids)
- continue;
-
- Xfire_game* nextgame;
- while(xgamelist.getnextGame(&nextgame))
- {
- if(nextgame->checkpath(processInfo))
- {
- SendGameStatusPacket *packet = new SendGameStatusPacket() ;
-
- XFireLog("XFire Gamedetection - Spiel gefunden: %i",nextgame->id);
-
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- currentgame=nextgame;
- pid=processInfo->th32ProcessID;
- DBWriteContactSettingWord(NULL,protocolname,"currentgame",currentgame->id);
- DBWriteContactSettingString(NULL,protocolname,"currentgamename",currentgame->name);
- packet->gameid=currentgame->send_gameid;
- t1=time(NULL);
-
- if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
- {
- XFireLog("XFire Gamedetection - Sendgame-ID: %i",currentgame->send_gameid);
- if(currentgame->send_gameid>0)
- {
- XFireLog("XFire Gamedetection - Setzte Status für XFire");
- myClient->client->send( packet );
- }
- }
-
- xgamelist.SetGameStatus(TRUE);
-
- //eventhook triggern
- NotifyEventHooks(hookgamestart,1,0);
-
- //statusmsg für xfire setzen
- if(currentgame->setstatusmsg)
- {
- SetXFireGameStatusMsg(currentgame);
- }
-
- if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
- {
- BackupStatusMsg();
- SetGameStatusMsg();
- }
- //popup abschalten, menuservice funk aufrufen
- if(DBGetContactSettingByte(NULL,protocolname,"nopopups",0))
- {
- if(ServiceExists("PopUp/EnableDisableMenuCommand")&&DBGetContactSettingByte(NULL,"PopUp","ModuleIsEnabled",0)==1&&DBGetContactSettingByte(NULL,"PopUp","DisableWhenFullscreen",0)==0) /**/
- {
- disabledpopups=TRUE;
- CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
- }
- else if(ServiceExists("PopUp/ToggleEnabled")&&DBGetContactSettingByte(NULL,"YAPP","Enabled",0)==1)
- {
- disabledpopups=TRUE;
- CallService("PopUp/ToggleEnabled",NULL,NULL);
- }
- }
- //sound abschalten
- if(DBGetContactSettingByte(NULL,protocolname,"nosoundev",0)&&DBGetContactSettingByte(NULL,"Skin","UseSound",0)==1)
- {
- DBWriteContactSettingByte(NULL,"Skin","UseSound",0);
- disabledsound=TRUE;
- }
- }
-
- delete packet;
-
- break;
- }
- }
- }
- CloseHandle ( hSnapShot);
-
- //gamelist unblocken
- xgamelist.Block(FALSE);
- }
- }
- }
-}
-
-static int ReScanMyGames(WPARAM wParam,LPARAM lParam)
-{
- DBDeleteContactSetting(NULL, protocolname, "foundgames");
-
- mir_forkthread(Scan4Games,NULL);
-
- return 0;
-}
-
-static int CustomGameSetup(WPARAM wParam,LPARAM lParam)
-{
- //DialogBox(hinstance,MAKEINTRESOURCE(IDD_GAMELIST),NULL,DlgAddGameProc);
- return 0;
-}
-
-void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg)
-{
- char status[300];
- int mystatus=ID_STATUS_ONLINE;
-
- if(entry==NULL)
- return;
-
- if(IsContactMySelf(entry->username))
- return;
-
- if(strlen(entry->statusmsg.c_str())>5)
- {
- char* away=(char*)entry->statusmsg.c_str();
- if(
- (*(away)=='('
- && *(away+1)=='A'
- && *(away+2)=='F'
- && *(away+3)=='K'
- && *(away+4)==')')
- ||
- (*(away)=='('
- &&*(away+1)=='A'
- && *(away+2)=='B'
- && *(away+3)=='S'
- && *(away+4)==')')
- )
- {
- mystatus=ID_STATUS_AWAY;
- }
- }
-
- //statusmsg umwandeln
- char * temp = mir_utf8decode((char*)entry->statusmsg.c_str(),NULL);
- if(temp==NULL) temp=(char*)entry->statusmsg.c_str();
-
- //DBDeleteContactSetting(hContact, "CList", "StatusMsg");
- DBWriteContactSettingWord(entry->hcontact, protocolname, "Status", mystatus);
-
- if(entry->game!=0)
- {
- char temp2[255];
- temp2[0]=0;
-
- DBVARIANT dbv;
- if(!DBGetContactSettingTString(entry->hcontact,protocolname, "RGame",&dbv))
- {
- strcat(temp2,dbv.pszVal);
- strcat(temp2," ");
- DBFreeVariant(&dbv);
- }
-
- if(DBGetContactSettingByte(NULL,protocolname,"noipportinstatus",0)==0)
- {
- if(!DBGetContactSettingTString(entry->hcontact,protocolname, "ServerName",&dbv))
- {
- strcat(temp2,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- else
- {
- if(!DBGetContactSettingTString(entry->hcontact,protocolname, "ServerIP",&dbv))
- {
- strcat(temp2,"(");
- strcat(temp2,dbv.pszVal);
- sprintf(status,":%d)",DBGetContactSettingWord(entry->hcontact, protocolname, "Port", 0));
- strcat(temp2,status);
- DBFreeVariant(&dbv);
- }
- }
- }
-
- strncpy(status,temp2,97);
-
- if(strlen(entry->statusmsg.c_str())>0)
- {
- strcat(status," - ");
- strcat(status,temp);
- }
- DBWriteContactSettingTString(entry->hcontact, "CList", "StatusMsg", status );
- DBWriteContactSettingTString(entry->hcontact, protocolname, "XStatusMsg", status );
- }
- else
- {
- DBWriteContactSettingTString(entry->hcontact, "CList", "StatusMsg", temp );
- DBWriteContactSettingTString(entry->hcontact, protocolname, "XStatusMsg", temp );
- DBWriteContactSettingByte(entry->hcontact, protocolname, "XStatusId", 1);
- DBWriteContactSettingTString(entry->hcontact, protocolname, "XStatusName", "");
- }
-}
-
-/*void CheckAvatar(void *ventry)
-{
- BuddyListEntry* entry=(BuddyListEntry*)ventry;
- DBVARIANT dbv;
- if(entry==NULL)
- return;
- if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)==0)
- {
- if(DBGetContactSettingByte(entry->hcontact, "ContactPhoto", "Locked", -1)!=1)
- {
- if(!DBGetContactSettingByte(NULL,protocolname,"specialavatarload",0))
- {
- if(DBGetContactSetting(entry->hcontact,"ContactPhoto", "File",&dbv))
- {
- XFire_SetAvatar* xsa=new XFire_SetAvatar;
- xsa->hContact=entry->hcontact;
- xsa->username=new char[strlen(entry->username.c_str())+1];
- strcpy(xsa->username,entry->username.c_str());
-
- mir_forkthread(SetAvatar,(LPVOID)xsa);
- }
- }
- else
- {
- /*
- scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
- getestet mit clanbuddy's >270 members
-
- mit hilfe der buddyinfos kann man den avatar laden und screenshot infos etc bekommt man auch
- */
-/* GetBuddyInfo* buddyinfo=new GetBuddyInfo();
- buddyinfo->userid=entry->userid;
- mir_forkthread(SetAvatar2,(LPVOID)buddyinfo);
- }
- }
- }
-}*/
-
-HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
-{
- HANDLE hContact;
- string game;
-
- if(entry==NULL)
- return NULL;
-
- //wenn der buddy ich selbst ist, dann ignorieren
- if(IsContactMySelf(entry->username))
- return NULL;
-
- if(entry->hcontact==NULL)
- {
- entry->hcontact=CList_FindContact(entry->userid);
- if(entry->hcontact&&clan==-1)
- {
- DBWriteContactSettingWord(entry->hcontact, protocolname, "Status", ID_STATUS_ONLINE);
- DBWriteContactSettingString(entry->hcontact, protocolname, "MirVer", "xfire");
- }
- }
-
- if(entry->hcontact==NULL)
- {
- XFireContact xfire_newc;
- xfire_newc.username=(char*)entry->username.c_str();
- xfire_newc.nick=(char*)entry->nick.c_str();
- xfire_newc.id=entry->userid;
-
- entry->hcontact=CList_AddContact(xfire_newc,TRUE,entry->isOnline()?TRUE:FALSE,clan);
- }
-
-
- hContact=entry->hcontact;
-
- if(hContact!=0)
- {
- if(strlen(entry->nick.c_str())>0&&DBGetContactSettingByte(NULL,protocolname,"shownicks",1))
- {
- char*nick=NULL;
-
- if(myClient->useutf8)
- nick=( char* )entry->nick.c_str();
- else
- nick=mir_utf8decode(( char* )entry->nick.c_str(),NULL);
-
- if(nick)
- {
- if(myClient->useutf8)
- DBWriteContactSettingUTF8String(hContact, protocolname, "Nick", nick);
- else
- DBWriteContactSettingTString(hContact, protocolname, "Nick", nick);
- }
- else
- DBWriteContactSettingString(hContact, protocolname, "Nick", entry->username.c_str());
-
- //DBWriteContactSettingStringUtf(hContact, protocolname, "Nick", entry->nick.c_str());
- //DBWriteContactSettingUTF8String(hContact, protocolname, "Nick", ( char* )entry->nick.c_str());
- }
- else
- DBWriteContactSettingString(hContact, protocolname, "Nick", entry->username.c_str());
-
- if(!entry->isOnline())
- {
- DBWriteContactSettingWord(hContact, protocolname, "Status", ID_STATUS_OFFLINE);
- DBDeleteContactSetting(hContact, protocolname, "XStatusMsg");
- DBDeleteContactSetting(hContact, protocolname, "XStatusId");
- DBDeleteContactSetting(hContact, protocolname, "XStatusName");
- DBDeleteContactSetting(hContact, "CList", "StatusMsg");
- DBWriteContactSettingTString(hContact, protocolname, "XStatusName", "");
- DBDeleteContactSetting(hContact, protocolname, "ServerIP");
- DBDeleteContactSetting(hContact, protocolname, "Port");
- DBDeleteContactSetting(hContact, protocolname, "VServerIP");
- DBDeleteContactSetting(hContact, protocolname, "VPort");
- DBDeleteContactSetting(hContact, protocolname, "RVoice");
- DBDeleteContactSetting(hContact, protocolname, "RGame");
- DBDeleteContactSetting(hContact, protocolname, "GameId");
- DBDeleteContactSetting(hContact, protocolname, "VoiceId");
- DBDeleteContactSetting(hContact, protocolname, "GameInfo");
- }
- else if(entry->game>0||entry->game2>0)
- {
- char temp[XFIRE_MAX_STATIC_STRING_LEN]="";
- char gname[255]="";
-
- DummyXFireGame *gameob;
-
- if(strlen(entry->gameinfo.c_str())>0)
- DBWriteContactSettingTString(hContact, protocolname, "GameInfo", entry->gameinfo.c_str());
-
- //beim voicechat foglendes machn
- if(entry->game2>0)
- {
- gameob=(DummyXFireGame*)entry->game2Obj; //obj wo ip und port sind auslesen
-
- xgamelist.getGamename(entry->game2,gname,255);
-
- DBWriteContactSettingTString(hContact, protocolname, "RVoice", gname);
-
- if(gameob)
- {
- if((unsigned char)gameob->ip[3]!=0) // wenn ip, dann speichern
- {
- sprintf(temp,"%d.%d.%d.%d",(unsigned char)gameob->ip[3],(unsigned char)gameob->ip[2],(unsigned char)gameob->ip[1],(unsigned char)gameob->ip[0]);
- DBWriteContactSettingTString(hContact, protocolname, "VServerIP", temp);
- DBWriteContactSettingWord(hContact, protocolname, "VPort", (unsigned long)gameob->port);
- }
- else
- {
- DBDeleteContactSetting(hContact, protocolname, "VServerIP");
- DBDeleteContactSetting(hContact, protocolname, "VPort");
- }
- }
-
- DBWriteContactSettingWord(hContact, protocolname, "VoiceId", entry->game2);
-
- SetIcon(hContact,xgamelist.iconmngr.getGameIconHandle(entry->game2),EXTRA_ICON_ADV2); //icon seperat setzen
- }
- else
- {
- DBDeleteContactSetting(hContact, protocolname, "VServerIP");
- DBDeleteContactSetting(hContact, protocolname, "VPort");
- DBDeleteContactSetting(hContact, protocolname, "RVoice");
- DBDeleteContactSetting(hContact, protocolname, "VoiceId");
- SetIcon(hContact,(HANDLE)-1,EXTRA_ICON_ADV2);
- }
-
- //beim game folgendes machen
- if(entry->game>0)
- {
- HICON hicongame=xgamelist.iconmngr.getGameIcon(entry->game);
-
- xgamelist.getGamename(entry->game,gname,255);
-
- DBWriteContactSettingTString(hContact, protocolname, "RGame", gname);
-
- //beinhaltet ip und port
- gameob=(DummyXFireGame*)entry->gameObj;
-
- //popup, wenn jemand was spielt
- if(DBGetContactSettingByte(NULL,protocolname,"gamepopup",0)==1) {
- char temp[256]="";
-
- sprintf(temp,Translate("%s playing %s."),
- //ist ein nick gesetzt?
- (entry->nick.length()==0?
- //nein dann username
- entry->username.c_str():
- //klar, dann nick nehmen
- entry->nick.c_str())
- ,gname);
-
- if(gameob)
- {
- if((unsigned char)gameob->ip[3]!=0)
- {
- sprintf(temp,Translate("%s playing %s on server %d.%d.%d.%d:%d."),
- //ist ein nick gesetzt?
- (entry->nick.length()==0?
- //nein dann username
- entry->username.c_str():
- //klar, dann nick nehmen
- entry->nick.c_str())
- ,gname,(unsigned char)gameob->ip[3],(unsigned char)gameob->ip[2],(unsigned char)gameob->ip[1],(unsigned char)gameob->ip[0],(unsigned long)gameob->port);
- }
- }
-
- /*
- POPUP-Filter
- Nur Popups anzeigen die noch nicht angezeigt wurden
- */
- if(entry->lastpopup==NULL)
- {
- //größe des popupstrings
- int size=strlen(temp)+1;
- //popup darstellen
- displayPopup(NULL,temp,"Miranda XFire Protocol Plugin",0,hicongame);
- //letzten popup definieren
- entry->lastpopup=new char[size];
- //string kopieren
- strcpy_s(entry->lastpopup,size,temp);
- }
- else
- {
- if(strcmp(entry->lastpopup,temp)!=0)
- {
- delete[] entry->lastpopup;
- entry->lastpopup=NULL;
-
- //größe des popupstrings
- int size=strlen(temp)+1;
- //popup darstellen
- displayPopup(NULL,temp,"Miranda XFire Protocol Plugin",0,hicongame);
- //letzten popup definieren
- entry->lastpopup=new char[size];
- //string kopieren
- strcpy_s(entry->lastpopup,size,temp);
- }
- }
- }
-
- if(gameob)
- {
- if((unsigned char)gameob->ip[3]!=0)
- {
- //ip und port in kontakt speichern
- sprintf(temp,"%d.%d.%d.%d",(unsigned char)gameob->ip[3],(unsigned char)gameob->ip[2],(unsigned char)gameob->ip[1],(unsigned char)gameob->ip[0]);
- DBWriteContactSettingTString(hContact, protocolname, "ServerIP", temp);
- DBWriteContactSettingWord(hContact, protocolname, "Port", (unsigned long)gameob->port);
-
- //lass das query arbeiten
- if(dontscan==FALSE)
- if(ServiceExists("GameServerQuery/Query")&&DBGetContactSettingByte(NULL,protocolname,"gsqsupport",0))
- {
- GameServerQuery_query gsqq={0};
- gsqq.port=gameob->port;
- gsqq.xfiregameid=entry->game;
- strcpy(gsqq.ip,temp);
- CallService("GameServerQuery/Query" , (WPARAM) entry, (LPARAM)&gsqq);
- }
- }
- else
- {
- DBDeleteContactSetting(hContact, protocolname, "ServerName");
- DBDeleteContactSetting(hContact, protocolname, "ServerIP");
- DBDeleteContactSetting(hContact, protocolname, "Port");
- }
- }
-
- SetIcon(hContact,xgamelist.iconmngr.getGameIconHandle(entry->game));
-
- //DBDeleteContactSetting(hContact, "CList", "StatusMsg");
- DBWriteContactSettingWord(hContact, protocolname, "Status", ID_STATUS_ONLINE);
- DBWriteContactSettingTString(hContact, protocolname, "XStatusName", Translate("Playing"));
- setBuddyStatusMsg(entry,entry->statusmsg);
- DBWriteContactSettingByte(hContact, protocolname, "XStatusId", xgamelist.iconmngr.getGameIconId(entry->game)+2);
-
- //buddy vorher ein spielgestartet, wenn nicht sound spielen?
- if(!DBGetContactSettingWord(hContact, protocolname, "GameId",0))
- SkinPlaySound( Translate( "xfirebstartgame" ) );
-
- DBWriteContactSettingWord(hContact, protocolname, "GameId", entry->game);
- }
- else
- {
- SetIcon(hContact,(HANDLE)-1);
- DBDeleteContactSetting(hContact, protocolname, "ServerIP");
- DBDeleteContactSetting(hContact, protocolname, "Port");
- if(strlen(entry->statusmsg.c_str())==0)
- {
- DBDeleteContactSetting(hContact, protocolname, "XStatusMsg");
- DBDeleteContactSetting(hContact, protocolname, "XStatusId");
- DBDeleteContactSetting(hContact, protocolname, "XStatusName");
- }
- DBDeleteContactSetting(hContact, protocolname, "RGame");
- DBDeleteContactSetting(hContact, protocolname, "GameId");
- setBuddyStatusMsg(entry,entry->statusmsg);
- }
- }
- else if(strlen(entry->statusmsg.c_str())>0)
- {
- setBuddyStatusMsg(entry,entry->statusmsg);
-
- SetIcon(hContact,(HANDLE)-1);
- SetIcon(hContact,(HANDLE)-1,EXTRA_ICON_ADV2);
- DBDeleteContactSetting(hContact, protocolname, "ServerIP");
- DBDeleteContactSetting(hContact, protocolname, "Port");
- DBDeleteContactSetting(hContact, protocolname, "VServerIP");
- DBDeleteContactSetting(hContact, protocolname, "VPort");
- DBDeleteContactSetting(hContact, protocolname, "RVoice");
- DBDeleteContactSetting(hContact, protocolname, "RGame");
- DBDeleteContactSetting(hContact, protocolname, "GameId");
- DBDeleteContactSetting(hContact, protocolname, "VoiceId");
- }
- else
- {
- if(DBGetContactSettingWord(entry->hcontact, protocolname, "Status", -1)==ID_STATUS_OFFLINE)
- {
- if(DBGetContactSettingByte(NULL, protocolname, "noclanavatars", 0)==1&&clan>0)
- ;
- else
- if(myClient) myClient->CheckAvatar(entry);
- }
-
- SetIcon(hContact,(HANDLE)-1);
- SetIcon(hContact,(HANDLE)-1,EXTRA_ICON_ADV2);
- DBWriteContactSettingWord(hContact, protocolname, "Status", ID_STATUS_ONLINE);
- DBWriteContactSettingString(entry->hcontact, protocolname, "MirVer", "xfire");
- if(clan>0) DBWriteContactSettingDword(hContact, protocolname, "Clan", clan);
- DBWriteContactSettingTString(hContact, "CList", "StatusMsg", "");
- DBDeleteContactSetting(hContact, protocolname, "XStatusMsg");
- DBDeleteContactSetting(hContact, protocolname, "XStatusId");
- DBDeleteContactSetting(hContact, protocolname, "XStatusName");
- //DBDeleteContactSetting(hContact, "CList", "StatusMsg");
- DBDeleteContactSetting(hContact, protocolname, "ServerIP");
- DBDeleteContactSetting(hContact, protocolname, "Port");
- DBDeleteContactSetting(hContact, protocolname, "VServerIP");
- DBDeleteContactSetting(hContact, protocolname, "VPort");
- DBDeleteContactSetting(hContact, protocolname, "RVoice");
- DBDeleteContactSetting(hContact, protocolname, "RGame");
- DBDeleteContactSetting(hContact, protocolname, "GameId");
- DBDeleteContactSetting(hContact, protocolname, "VoiceId");
- }
- }
- if(group!=NULL)
- {
- if(!DBGetContactSettingByte(NULL,protocolname,"noclangroups",0))
- {
- if(clan>0)
- {
- int val=DBGetContactSettingByte(NULL,protocolname,"mainclangroup",0);
-
- if( DBGetContactSettingByte(NULL,protocolname,"skipfriendsgroups",0)==0 ||
- (DBGetContactSettingByte(NULL,protocolname,"skipfriendsgroups",0)==1&&
- DBGetContactSettingByte(entry->hcontact, protocolname, "isfriend", 0)==0)
- )
- {
- if(val==0)
- {
- DBWriteContactSettingTString(entry->hcontact, "CList", "Group", group);
- }
- else
- {
- char temp[256];
- DBVARIANT dbv;
- sprintf_s(temp,256,"%d",val-1);
- DBGetContactSettingString(NULL,"CListGroups",temp,&dbv);
- if(dbv.pszVal!=NULL)
- {
- sprintf_s(temp,256,"%s\\%s",&dbv.pszVal[1],group);
- DBWriteContactSettingTString(entry->hcontact, "CList", "Group", temp);
- DBFreeVariant(&dbv);
- }
- }
- }
- }
- else if(clan==-1)//hauptgruppe für fof
- {
- int val=DBGetContactSettingByte(NULL,protocolname,"fofgroup",0);
-
- if(val==0)
- {
- DBWriteContactSettingTString(entry->hcontact, "CList", "Group", group);
- }
- else
- {
- char temp[256];
- DBVARIANT dbv;
- sprintf_s(temp,256,"%d",val-1);
- DBGetContactSettingString(NULL,"CListGroups",temp,&dbv);
- if(dbv.pszVal!=NULL)
- {
- sprintf_s(temp,256,"%s\\%s",&dbv.pszVal[1],group);
- DBWriteContactSettingTString(entry->hcontact, "CList", "Group", temp);
- DBFreeVariant(&dbv);
- }
- }
- }
- }
- }
- else
- {
- DBWriteContactSettingByte(entry->hcontact, protocolname, "isfriend", 1);
- }
-
- return hContact;
-}
-
-int AddtoList( WPARAM wParam, LPARAM lParam ) {
- CCSDATA* ccs = (CCSDATA*)lParam;
-
- if (ccs->hContact)
- {
- DBVARIANT dbv2;
- if(!DBGetContactSetting(ccs->hContact,protocolname,"Username",&dbv2)) {
-
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- SendAcceptInvitationPacket accept;
- accept.name = dbv2.pszVal;
- myClient->client->send(&accept );
- }
-
- //temporären buddy entfernen, da eh ein neues packet kommt
- DBWriteContactSettingByte(ccs->hContact, protocolname, "DontSendDenyPacket", 1);
- CallService(MS_DB_CONTACT_DELETE, (WPARAM) ccs->hContact, 0);
- }
- }
- return 0;
-}
-
-
-static void __cdecl AckBasicSearch(void * pszNick)
-{
- if(pszNick!=NULL)
- {
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- SearchBuddy search;
- search.searchfor(( char* )pszNick);
- myClient->client->send(&search );
- }
- }
-}
-
-int BasicSearch(WPARAM wParam,LPARAM lParam) {
- static char buf[50];
- if ( lParam ) {
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- lstrcpynA(buf, (const char *)lParam, 50);
- mir_forkthread(AckBasicSearch, &buf );
- return 1;
- }
- }
-
- return 0;
-}
-
-
-
-static int SearchAddtoList(WPARAM wParam,LPARAM lParam)
-{
- PROTOSEARCHRESULT *psr = ( PROTOSEARCHRESULT* ) lParam;
-
- if ( psr->cbSize != sizeof( PROTOSEARCHRESULT ))
- return 0;
-
- if((int)wParam==0)
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- InviteBuddyPacket invite;
- invite.addInviteName( psr->nick, Translate("Add me to your friends list."));
- myClient->client->send(&invite );
- }
-
- return -1;
-}
-
-
-void CreateGroup(char*grpn,char*field) {
- DBVARIANT dbv;
- char* grp[255];
-
- int val=DBGetContactSettingByte(NULL,protocolname,field,0);
-
- if(val==0)
- {
- strcpy_s((char*)grp,255,grpn);//((char*)clan->name[i].c_str());
- }
- else
- {
- char temp[255];
- DBVARIANT dbv;
- sprintf_s(temp,255,"%d",val-1);
- DBGetContactSettingString(NULL,"CListGroups",temp,&dbv);
- if(dbv.pszVal!=NULL)
- {
- sprintf_s((char*)grp,255,"%s\\%s",&dbv.pszVal[1],(char*)grpn);
- DBFreeVariant(&dbv);
- }
- else //gruppe existiert nciht mehr, auf root alles legen
- {
- strcpy_s((char*)grp,255,grpn);
- DBWriteContactSettingByte(NULL,protocolname,field,0);
- }
- }
-
-
- char group[255]="";
- char temp[10];
- int i=0;
- for (i = 0;; i++)
- {
- sprintf(temp,"%d",i);
- if (DBGetContactSettingString(NULL, "CListGroups", temp, &dbv))
- {
- i--;
- break;
- }
- if (dbv.pszVal[0] != '\0' && !lstrcmp(dbv.pszVal + 1, (char*)grp)) {
- DBFreeVariant(&dbv);
- return;
- }
- DBFreeVariant(&dbv);
- }
- strcpy_s(group,255,"D");
- strcat_s(group,255,(char*)grp);
- group[0]= 1 | GROUPF_EXPANDED;
- sprintf(temp,"%d",i+1);
- DBWriteContactSettingString(NULL, "CListGroups", temp, group);
- CallServiceSync(MS_CLUI_GROUPADDED, i + 1, 0);
-}
-
-
-int SetAwayMsg(WPARAM wParam, LPARAM lParam) {
- EnterCriticalSection(&modeMsgsMutex);
- if(( char* )lParam==NULL)
- {
- if(wParam==ID_STATUS_ONLINE)
- {
- strcpy(statusmessage[0],"");
- }
- else if((wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)&&DBGetContactSettingByte(NULL,protocolname,"nocustomaway",0)==0)
- {
- strcpy(statusmessage[1],"(AFK) Away from Keyboard");
- }
- }
- else
- {
- if(wParam==ID_STATUS_ONLINE)
- {
- strcpy(statusmessage[0],( char* )lParam);
- }
- else if((wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)&&DBGetContactSettingByte(NULL,protocolname,"nocustomaway",0)==0&&strlen(( char* )lParam)>0)
- {
- strcpy(statusmessage[1],( char* )lParam);
- }
- else if(wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)
- {
- strcpy(statusmessage[1],"(AFK) Away from Keyboard");
- }
- }
-
- if(myClient!=NULL)
- {
- if(myClient->client->connected)
- {
- if(bpStatus==ID_STATUS_ONLINE)
- myClient->Status(statusmessage[0]);
- else if(wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)
- myClient->Status(statusmessage[1]);
- }
- }
- LeaveCriticalSection(&modeMsgsMutex);
- return 0;
-}
-
-static void SendAMAck( LPVOID param )
-{
- DBVARIANT dbv;
-
- if(!DBGetContactSettingTString((HANDLE)param, protocolname, "XStatusMsg",&dbv))
- {
- ProtoBroadcastAck(protocolname, (HANDLE)param, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, LPARAM(dbv.pszVal));
- }
- else
- ProtoBroadcastAck(protocolname, (HANDLE)param, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, LPARAM(""));
-}
-
-int SetNickName(WPARAM wparam, LPARAM newnick)
-{
- if(newnick==NULL)
- {
- return FALSE;
- }
-
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- myClient->setNick((char*)newnick);
- DBWriteContactSettingString(NULL,protocolname,"Nick",(char*)newnick);
- return TRUE;
- }
- return FALSE;
-}
-
-//sendet neue preferencen zu xfire
-int SendPrefs(WPARAM wparam, LPARAM lparam)
-{
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- PrefsPacket prefs;
- for(int i=0;i<XFIRE_RECVPREFSPACKET_MAXCONFIGS;i++)
- {
- prefs.config[i]=xfireconfig[i];
- }
- myClient->client->send( &prefs );
- return TRUE;
- }
- return FALSE;
-}
-
-
-int GetAwayMsg(WPARAM /*wParam*/, LPARAM lParam)
-{
- CCSDATA* ccs = (CCSDATA*)lParam;
-
- mir_forkthread(SendAMAck,ccs->hContact);
- return 1;
-}
-
-int ContactDeleted(WPARAM wParam,LPARAM lParam) {
- if(!DBGetContactSettingByte((HANDLE)wParam, protocolname, "DontSendDenyPacket", 0))
- if(DBGetContactSettingByte((HANDLE)wParam,"CList","NotOnList",0))
- {
- if(myClient!=NULL)
- if(myClient->client->connected)
- {
- DBVARIANT dbv2;
- if(!DBGetContactSetting((HANDLE)wParam,protocolname,"Username",&dbv2)) {
- SendDenyInvitationPacket deny;
- deny.name = dbv2.pszVal;
- myClient->client->send( &deny );
- }
- }
- }
- return 0;
-}
-
-int StartGame(WPARAM wParam,LPARAM lParam,LPARAM fParam) {
- //gamelist blocken
- xgamelist.Block(TRUE);
-
- Xfire_game*game=xgamelist.getGamebyGameid(fParam);
-
- //starte das spiel
- if(game)
- game->start_game();
-
- //gamelist blocken
- xgamelist.Block(FALSE);
-
-
- return 0;
-}
-
-int RemoveFriend(WPARAM wParam,LPARAM lParam) {
- char temp[256];
- DBVARIANT dbv;
-
- if(!DBGetContactSettingTString((HANDLE)wParam, protocolname, "Username",&dbv))
- {
- sprintf(temp,Translate("Do you really want delete your friend %s?"),dbv.pszVal);
- if(MessageBoxA(NULL,temp,Translate("Confirm Delete"),MB_YESNO|MB_ICONQUESTION)==IDYES)
- {
- if(myClient!=NULL)
- {
- if(myClient->client->connected)
- {
- SendRemoveBuddyPacket removeBuddy;
-
- removeBuddy.userid=DBGetContactSettingDword((HANDLE)wParam,protocolname,"UserId",0);
-
- if(removeBuddy.userid!=0)
- {
- myClient->client->send(&removeBuddy);
- }
- }
- }
- }
- DBFreeVariant(&dbv);
- }
- return 0;
-}
-
-int BlockFriend(WPARAM wParam,LPARAM lParam) {
- DBVARIANT dbv;
-
- if(!DBGetContactSettingTString((HANDLE)wParam, protocolname, "Username",&dbv))
- {
- if(MessageBoxA(NULL,Translate("Block this user from ever contacting you again?"),Translate("Block Confirmation"),MB_YESNO|MB_ICONQUESTION)==IDYES)
- {
- if(myClient!=NULL)
- {
- if(myClient->client->connected)
- {
- DBWriteContactSettingByte(NULL,"XFireBlock",dbv.pszVal,1);
-
- SendDenyInvitationPacket deny;
- deny.name = dbv.pszVal;
- myClient->client->send( &deny );
- }
- }
- }
- CallService( MS_DB_CONTACT_DELETE, (WPARAM) wParam, 1 );
- DBFreeVariant(&dbv);
- }
- return 0;
-}
-
-int StartThisGame(WPARAM wParam,LPARAM lParam) {
- //gamelist blocken
- xgamelist.Block(TRUE);
-
- //hole die gameid des spiels
- int id=DBGetContactSettingWord((HANDLE)wParam, protocolname, "GameId",0);
-
- //hole passendes spielobjekt
- Xfire_game*game=xgamelist.getGamebyGameid(id);
-
- //starte das spiel
- if(game)
- game->start_game();
-
- //gamelist blocken
- xgamelist.Block(FALSE);
-
- return 0;
-}
-
-int JoinGame(WPARAM wParam,LPARAM lParam) {
- //gamelist blocken
- xgamelist.Block(TRUE);
-
- //hole die gameid des spiels
- int id=DBGetContactSettingWord((HANDLE)wParam, protocolname, "GameId",0);
-
- //hole passendes spielobjekt
- Xfire_game*game=xgamelist.getGamebyGameid(id);
-
- //starte das spiel
- if(game)
- {
- DBVARIANT dbv; //dbv.pszVal
- int port=DBGetContactSettingWord((HANDLE)wParam, protocolname, "Port",0);
- if(!DBGetContactSettingTString((HANDLE)wParam, protocolname, "ServerIP",&dbv))
- {
- //starte spiel mit netzwerk parametern
- game->start_game(dbv.pszVal,port);
- DBFreeVariant(&dbv);
- }
- }
-
- //gamelist unblocken
- xgamelist.Block(FALSE);
-
-
- return 0;
-}
-
-
-int doneQuery( WPARAM wParam, LPARAM lParam ) {
- char temp[256];
- BuddyListEntry* bud=(BuddyListEntry*)wParam;
- gServerstats* gameinfo = (gServerstats*)lParam;
- DBWriteContactSettingTString(bud->hcontact, protocolname, "ServerName", gameinfo->name);
- DBWriteContactSettingTString(bud->hcontact, protocolname, "GameType", gameinfo->gametype);
- DBWriteContactSettingTString(bud->hcontact, protocolname, "Map", gameinfo->map);
- sprintf(temp,"(%d/%d)",gameinfo->players,gameinfo->maxplayers);
- DBWriteContactSettingTString(bud->hcontact, protocolname, "Players", temp);
- DBWriteContactSettingByte(bud->hcontact, protocolname, "Passworded", gameinfo->password);
-
- if(myClient!=NULL)
- handlingBuddys(bud,0,NULL,TRUE);
-
- return 0;
-}
-
-static int SetNickDlg(WPARAM wParam,LPARAM lParam) {
- return ShowSetNick();
-}
-
-
-int IconLibChanged(WPARAM wParam, LPARAM lParam) {
- /*int x=0;
- char temp[255];
- for(int i=0;i<1024;i++)
- {
- if(icocache[i].hicon>0)
- {
- //ImageList_ReplaceIcon(hAdvancedStatusIcon,(int)icocache[i].handle,icocache[i].hicon);
- HANDLE before=icocache[i].handle;
- icocache[i].handle=(HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)icocache[i].hicon, 0);
- sprintf(temp,"before: %d after: %d",before,icocache[i].handle);
- MessageBoxA(NULL,temp,temp,0);
- DrawIcon(GetDC(NULL),x,0,(HICON)CallService(MS_SKIN2_GETICONBYHANDLE,0,(LPARAM)icocache[i].handle));
- x+=32;
- }
- }*/
- return 0;
-}
-
-
-int GetAvatarInfo(WPARAM wParam, LPARAM lParam) {
- PROTO_AVATAR_INFORMATION* pai = (PROTO_AVATAR_INFORMATION*)lParam;
-
- if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)!=0)
- return GAIR_NOAVATAR;
-
- pai->format=DBGetContactSettingWord(pai->hContact,"ContactPhoto","Format",0);
- if(pai->format==0)
- return GAIR_NOAVATAR;
-
- DBVARIANT dbv;
- if(!DBGetContactSetting(pai->hContact,"ContactPhoto","File",&dbv))
- {
- strcpy(pai->filename,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- else
- return GAIR_NOAVATAR;
-
- return GAIR_SUCCESS;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.cpp
deleted file mode 100644
index 178e2c9717..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "messageackpacket.h"
-#include "xdebug.h"
-#include "string.h"
-#include "variablevalue.h"
-#include <iostream>
-
-namespace xfirelib {
-
- MessageACKPacket::MessageACKPacket() {
- memset( sid, 0, 16 );
- imindex = -1;
- }
- MessageACKPacket::~MessageACKPacket() {
- }
-
- int MessageACKPacket::getPacketContent(char *buf) {
- int index = 0;
- VariableValue val;
- val.setName("sid");
- val.setValue(sid,16);
-
- index += val.writeName(buf,index);
- buf[index++] = 3;
- index += val.writeValue(buf,index);
-
- val.setName("peermsg");
- index += val.writeName(buf,index);
- buf[index++] = 5;
- buf[index++] = 2;
-
- val.setName("msgtype");
- val.setValueFromLong(1,4);
- index += val.writeName(buf,index);
- buf[index++] = 2;
- index += val.writeValue(buf,index);
-
- val.setName("imindex");
- val.setValueFromLong(imindex,4);
- index += val.writeName(buf,index);
- buf[index++] = 02;
- index += val.writeValue(buf,index);
-
- return index;
- }
-
- void MessageACKPacket::parseContent(char *buf, int length, int numberOfAtts) {
- }
-
-
-};
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.h
deleted file mode 100644
index 35d0848fbd..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/messageackpacket.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MESSAGEACKPACKET_H
-#define __MESSAGEACKPACKET_H
-
-#include "xfiresendpacketcontent.h"
-
-#define XFIRE_MESSAGE_ACK_ID 2
-
-namespace xfirelib {
-
- /**
- * (Internal) Packet used to acknowledge a received message.
- * It is of no use to users of the library because it is already
- * sent by the Client.
- */
- class MessageACKPacket : public XFireSendPacketContent {
- public:
- MessageACKPacket();
- ~MessageACKPacket();
-
- XFirePacketContent* newPacket() { return new MessageACKPacket(); }
-
-
- int getPacketId() { return XFIRE_MESSAGE_ACK_ID; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 2; }
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- char sid[16];
- long imindex;
-
- private:
- };
-
-};
-
-
-#endif
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/messagepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/messagepacket.cpp
deleted file mode 100644
index 61617bc541..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/messagepacket.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "messagepacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include <iostream>
-#include <string>
-#include "xdebug.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- MessagePacket::MessagePacket(){
- packetID = 133;
- }
-
-int MessagePacket::getPacketContent(char *packet){
- memcpy(packet,buf,bufLength);
- packetID = 2;
- return 150;
-}
- void MessagePacket::parseContent(char *buf, int length, int numberOfAtts) {
-
- bufLength = length;
- XINFO(( "Got IM\n" ));
-
- int index = 0;
- sid = new VariableValue();
- peermsg = new VariableValue();
- msgtype = new VariableValue();
-
- index += sid->readName(buf,index);
- index++; //ignore 03
- index += sid->readValue(buf,index,16);
-
- index += peermsg->readName(buf,index);
- index++;
- index++;
- index += msgtype->readName(buf,index);
- index++;
- index += msgtype->readValue(buf,index,4);
-
- if(msgtype->getValue()[0] == 0){
- imindex = new VariableValue();
- index += imindex->readName(buf,index);
-
- VariableValue messageTemp;
- index++;//ignore 02
- index += imindex->readValue(buf,index,4);
- index += messageTemp.readName(buf,index);
- index++;
- index += messageTemp.readValue(buf,index,2);
- int messageLength = messageTemp.getValueAsLong();
- index = messageTemp.readValue(buf,index,messageLength);
-
- for(int i = 0; i < messageTemp.getValueLength();i++){
- message += messageTemp.getValue()[i];
- }
- /*TODO: implement this and answer the package*/
- }else if(msgtype->getValue()[0] == 1){
- cout << "got ack for a message we have sent" << endl;
- }else if(msgtype->getValue()[0] == 2){
- memcpy(this->buf,buf,150);
- /*answer the packet*/
- cout << "some auth magic stuff" << length << endl;
- }
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/messagepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/messagepacket.h
deleted file mode 100644
index fe867ef96b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/messagepacket.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MESSAGEPACKET_H
-#define __MESSAGEPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-#include <string>
-
-#define XFIRE_MESSAGE_ID 133
-
-namespace xfirelib {
-
- class MessagePacket : public XFireRecvPacketContent {
- public:
-
- MessagePacket();
- XFirePacketContent* newPacket() { return new MessagePacket(); }
-
- int getPacketContent(char *packet);
- int getPacketId() { return packetID; }
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
- std::string getMessage() {return message; }
- int getMessageType(){return msgtype->getValue()[0];}
- int getImIndex(){ return imindex->getValue()[0];}//TODO: fix this if we have more than 255 messages
- int getPacketAttributeCount(){ return 2; }
- char * getSid(){ return sid->getValue(); }
-
- private:
- VariableValue *sid;
- VariableValue *peermsg;
- VariableValue *msgtype;
- VariableValue *imindex;
- std::string message;
- char buf[150];
- int bufLength;
- int packetID;//Special case because we have to answer this packet with id 2
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.cpp b/plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.cpp
deleted file mode 100644
index 42b00120ae..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * xfiregateway - Jabber Gateway for XFire.
- * Copyright (C) 2006 by
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "stdafx.h"
-
-#include "monitoredobj.h"
-
-//alle string klassen entfernt, da die stringklasse instabil ist - dufte
-
-namespace xfirelib {
- int MonitoredObj::id = 0;
- MonitoredObj::MonitoredObj() {
- this->myid = id++;
- }
-
- MonitoredObj::~MonitoredObj() {
- }
-
- int MonitoredObj::getTotalObjectCount() {
- int total = 0;
- return total;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.h b/plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.h
deleted file mode 100644
index 4e4b2d66f6..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/monitoredobj.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * xfiregateway - Jabber Gateway for XFire.
- * Copyright (C) 2006 by
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef __MONITOREDOBJ_H
-#define __MONITOREDOBJ_H
-
-#include <typeinfo>
-#include <string>
-#include "xdebug.h"
-#include <map>
-
-namespace xfirelib {
- class MonitoredObj {
- public:
- MonitoredObj();
- ~MonitoredObj();
- int getTotalObjectCount();
-
- std::string classname;
- int myid;
- static std::map<std::string,int> instances;
- static int id;
- };
-
-
-};
-
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/options.cpp b/plugins/!NotAdopted/Xfire/xfiretest/options.cpp
deleted file mode 100644
index 10e4fbb25a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/options.cpp
+++ /dev/null
@@ -1,1270 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-#include "stdafx.h"
-
-#include "baseProtocol.h"
-#include "m_variables.h"
-#include "recvprefspacket.h"
-#include "Xfire_gamelist.h"
-#include "addgamedialog.h"
-
-extern HANDLE XFireWorkingFolder;
-extern HANDLE XFireIconFolder;
-extern xfire_prefitem xfireconfig[XFIRE_RECVPREFSPACKET_MAXCONFIGS];
-extern Xfire_gamelist xgamelist;
-
-struct mytreeitem {
- char name[256];
- char dbentry[256];
- int parent;
- int icon;
- HTREEITEM hitem;
-};
-
-extern int bpStatus;
-BOOL alreadyInit=FALSE;
-HWND ghwndDlg2;
-HWND addgameDialog=NULL;
-
-xfireconfigitem xfireconfigitems[XFIRE_RECVPREFSPACKET_SUPPORTEDONFIGS] = {
- {IDC_KONFIG_1,1,"sendgamestatus"},
- {IDC_KONFIG_2,3,"hideprofile"},
- {IDC_KONFIG_3,2,"ipportdetec"},
- {IDC_KONFIG_4,0xa,"shownicks"},
- {IDC_KONFIG_5,0xb,"ts2detection"},
- {IDC_KONFIG_6,0xc,"sendtyping"},
- {IDC_KONFIG_7,8,"friendsoffriends"},
-};
-
-#define NUM_ICONS 4
-
-static mytreeitem mytree[] = {
- {"Avatars","",1,0},
- {"Disable avatars","noavatars",0,0},
- {"Dont download avatars of clan members","noclanavatars",0,0},
- {"Use alternate way for Avatar download","specialavatarload",0,0},
- {"General","",1,0},
- {"Use UTF8 for messaging and nick's (beta)","useutf8",0,0},
- {"Automatically reconnect on protocol version changes","recprotoverchg",0,0},
- {"No Ip/Port in StatusMsg","noipportinstatus",0,0},
- {"Use Online status for unsupported global statuses","oninsteadafk",0,0},
- {"Dont move friends to clan groups","skipfriendsgroups",0,0},
- {"GameServerQuery support","gsqsupport",0,0},
- {"No custom away message","nocustomaway",0,0},
- {"Remove friend of friend buddies from database","fofdbremove",0,0},
- /*{"Show usernames only","onlyusername",0},*/
- {"Hide yourself in buddylist","skipmyself",0,0},
- {"Dont display game search results","dontdisresults",0,0},
- {"Dont display game search status window","dontdissstatus",0,0},
- {"Display popup, if someone start a game","gamepopup",0,0},
- {"Dont automatically create clan groups","noclangroups",0,0},
- {"Enable MBot support","mbotsupport",0,0},
- {"Gamedetection","",1,0},
- /*{"Scan for games on every Miranda start","scanalways",0},*/
- {"Disable game detection","nogamedetect",0,0},
- /*{"Enable server IP/Port detection","ipportdetec",0},*/
- /*{"Enable TeamSpeak2/Ventrilo detection","",0},*/
- {"Use TSRemote.dll to get teamspeak server info","ts2useremote",0,0},
- {"Disable popups when ingame","nopopups",0,0},
- {"Disable sound events when ingame","nosoundev",0,0},
- {"Files","",1,0},
- {"Automatically update xfire_games.ini (pro-laming.de)","autoiniupdate",0,0},
- {"Automatically update icons.dll (pro-laming.de)","autoicodllupdate",0,0},
- {"Download missing game icons from Xfire website","xfiresitegameico",0,0},
- {"No backup on update","nobackupini",0,0},
- {"Background updating","dontaskforupdate",0,0},
-};
-
-//funktion zum auslesen aller einträge unter XFireBlock
-static int enumSettingsProc(const char *szSetting,LPARAM lParam)
-{
- if(strlen(szSetting)>0)
- {
- SendDlgItemMessage( (HWND)lParam, IDC_BLOCKUSER, LB_ADDSTRING, 0, (LPARAM)szSetting);
- }
- EnableDlgItem((HWND)lParam, IDC_REMUSER, TRUE);
- return 0;
-}
-
-//damit die änderungen sofort sichtbar sind
-static BOOL CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
- static BOOL inifound = FALSE;
- static BOOL dllfound = FALSE;
- static int nomsgboxsel[] = {1,0,2};
- static HWND hwndTree = NULL;
- static char login[128];
-
- switch (msg)
- {
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_INITDIALOG:
- {
- DBVARIANT dbv;
- TranslateDialogDefault(hwndDlg);
-
- ghwndDlg2=hwndDlg;
-
- hwndTree = GetDlgItem(hwndDlg, IDC_TREE);
- SetWindowLong(hwndTree,GWL_STYLE,GetWindowLong(hwndTree,GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
- SendMessage(hwndDlg, DM_REBUILD_TREE, 0, 0);
-
- FoldersGetCustomPath( XFireWorkingFolder, inipath, 1024, 'W' );
- strcat(inipath,"\\");
- strcat(inipath,"xfire_games.ini");
-
- FILE * f = fopen(inipath,"r");
- if(f!=NULL)
- {
- fclose(f);
- CheckDlgButton(hwndDlg,IDC_CHKG,1);
- inifound = TRUE;
- }
- else
- {
- EnableDlgItem(hwndDlg, IDC_SETUPGAMES, FALSE);
- inifound = FALSE;
- }
-
- FoldersGetCustomPath( XFireIconFolder, inipath, 1024, 'W' );
- strcat(inipath,"\\");
- strcat(inipath,"icons.dll");
-
- f = fopen(inipath,"r");
- if(f!=NULL)
- {
- fclose(f);
- CheckDlgButton(hwndDlg,IDC_CHKI,1);
- dllfound = TRUE;
- }
- else
- dllfound = FALSE;
-
- if(!DBGetContactSetting(NULL,protocolname,"login",&dbv)) {
- SetDlgItemText(hwndDlg,IDC_LOGIN,dbv.pszVal);
-
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(NULL,protocolname,"Nick",&dbv)) {
- SetDlgItemText(hwndDlg,IDC_NICK,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(NULL,protocolname,"password",&dbv)) {
- //bit of a security hole here, since it's easy to extract a password from an edit box
- CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,(LPARAM)dbv.pszVal);
- SetDlgItemText(hwndDlg,IDC_PASSWORD,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
-
- char temp[255]="";
- sprintf(temp,"%d",DBGetContactSettingByte(NULL,protocolname,"protover",0x5b));
- SetDlgItemText(hwndDlg,IDC_PVER,temp);
-
- EnableWindow(GetDlgItem(hwndDlg,IDC_LASTGAME),FALSE);
- if(!DBGetContactSetting(NULL,protocolname,"LastGame",&dbv)) {
- SetDlgItemText(hwndDlg,IDC_LASTGAME,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
-
- if(bpStatus==ID_STATUS_OFFLINE&&bpStatus!=ID_STATUS_CONNECTING) {
- EnableDlgItem(hwndDlg, IDC_NICK, FALSE);
- }
- else
- {
- int size=sizeof(xfireconfigitems)/sizeof(xfireconfigitem);
- for(int i=0;i<size;i++)
- {
- EnableDlgItem(hwndDlg, xfireconfigitems[i].id, TRUE);
- if(xfireconfig[xfireconfigitems[i].xfireconfigid].wasset==0)
- {
- CheckDlgButton(hwndDlg,xfireconfigitems[i].id,1);
- }
- else
- {
- CheckDlgButton(hwndDlg,xfireconfigitems[i].id,0);
- }
- }
- //wenn die erste option aktiv ist, untere aktivieren, sonst deaktivieren
- if(!(BYTE)IsDlgButtonChecked(hwndDlg, IDC_KONFIG_1 ))
- {
- CheckDlgButton(hwndDlg,IDC_KONFIG_2,0);
- CheckDlgButton(hwndDlg,IDC_KONFIG_3,0);
- EnableDlgItem(hwndDlg, IDC_KONFIG_2, FALSE);
- EnableDlgItem(hwndDlg, IDC_KONFIG_3, FALSE);
- }
- }
-
- return TRUE;
- }
-
-
-
- case WM_COMMAND:
- if(!(BYTE)IsDlgButtonChecked(hwndDlg, IDC_KONFIG_1 ))
- {
- CheckDlgButton(hwndDlg,IDC_KONFIG_2,0);
- CheckDlgButton(hwndDlg,IDC_KONFIG_3,0);
- EnableDlgItem(hwndDlg, IDC_KONFIG_2, FALSE);
- EnableDlgItem(hwndDlg, IDC_KONFIG_3, FALSE);
- }
- else
- {
- EnableDlgItem(hwndDlg, IDC_KONFIG_2, TRUE);
- EnableDlgItem(hwndDlg, IDC_KONFIG_3, TRUE);
- }
- if ( LOWORD( wParam ) == IDC_URLNEWACC ) {
- CallService( MS_UTILS_OPENURL, 1, ( LPARAM )"http://www.xfire.com/register/" );
- return TRUE;
- }
- if ( LOWORD( wParam ) == IDC_LOSTPW ) {
- CallService( MS_UTILS_OPENURL, 1, ( LPARAM )"https://secure.xfire.com/lost_password/" );
- return TRUE;
- }
-
- if ((LOWORD(wParam) == 19901 || LOWORD(wParam) == 25466 || LOWORD(wParam) == IDC_LOGIN || LOWORD(wParam) == IDC_PIP || LOWORD(wParam) == IDC_PPORT || LOWORD(wParam) == IDC_NICK || LOWORD(wParam) == IDC_PASSWORD) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) )
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- int reconnectRequired=0;
- char str[128];
- DBVARIANT dbv;
-
- GetDlgItemText(hwndDlg,IDC_LOGIN,login,sizeof(login));
- dbv.pszVal=NULL;
- if(DBGetContactSetting(NULL,protocolname,"login",&dbv) || strcmp(login,dbv.pszVal))
- reconnectRequired=1;
- if(dbv.pszVal!=NULL) DBFreeVariant(&dbv);
-
- //den login lowercasen
- int size=strlen(login);
- BOOL mustlowercase=FALSE;
- for(int i=0;i<size;i++)
- {
- if(login[i]>='A'&&login[i]<='Z')
- mustlowercase=TRUE;
- login[i]=tolower(login[i]);
- }
- if(mustlowercase) {
- MessageBoxA(NULL,Translate("The username must be lowercase, so it will be lowercased saved."),Translate("XFire Options"),MB_OK|MB_ICONINFORMATION);
- SetDlgItemText(hwndDlg,IDC_LOGIN,login);
- }
-
- DBWriteContactSettingString(NULL,protocolname,"login",login);
- DBWriteContactSettingString(NULL,protocolname,"Username",login);
-
- //nur wenn der nick erfolgreich übertragen wurde
- GetDlgItemText(hwndDlg,IDC_NICK,login,sizeof(login));
- dbv.pszVal=NULL;
- if(DBGetContactSetting(NULL,protocolname,"Nick",&dbv) || strcmp(login,dbv.pszVal))
- {
- if(CallService(XFIRE_SET_NICK,0,(WPARAM)login))
- DBWriteContactSettingString(NULL,protocolname,"Nick",login);
- }
- if(dbv.pszVal!=NULL) DBFreeVariant(&dbv);
-
- GetDlgItemText(hwndDlg,IDC_PASSWORD,str,sizeof(str));
- CallService(MS_DB_CRYPT_ENCODESTRING,sizeof(str),(LPARAM)str);
- dbv.pszVal=NULL;
- if(DBGetContactSetting(NULL,protocolname,"password",&dbv) || strcmp(str,dbv.pszVal))
- reconnectRequired=1;
- if(dbv.pszVal!=NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL,protocolname,"password",str);
- GetDlgItemText(hwndDlg,IDC_SERVER,str,sizeof(str));
-
- //neue preferencen sichern
- if(bpStatus!=ID_STATUS_OFFLINE&&bpStatus!=ID_STATUS_CONNECTING)
- {
- int size=sizeof(xfireconfigitems)/sizeof(xfireconfigitem);
- for(int i=0;i<size;i++)
- {
- if(!(BYTE)IsDlgButtonChecked(hwndDlg, xfireconfigitems[i].id))
- {
- DBWriteContactSettingByte(NULL,protocolname,xfireconfigitems[i].dbentry,0);
- xfireconfig[xfireconfigitems[i].xfireconfigid].wasset=1;
- xfireconfig[xfireconfigitems[i].xfireconfigid].data[0]=1;
- xfireconfig[xfireconfigitems[i].xfireconfigid].data[1]=1;
- xfireconfig[xfireconfigitems[i].xfireconfigid].data[2]=0;
- xfireconfig[xfireconfigitems[i].xfireconfigid].data[3]=0x30;
- }
- else
- {
- xfireconfig[xfireconfigitems[i].xfireconfigid].wasset=0;
- DBWriteContactSettingByte(NULL,protocolname,xfireconfigitems[i].dbentry,1);
- }
- }
- CallService(XFIRE_SEND_PREFS,0,0);
- }
-
- //protocolversion wird autoamtisch vergeben
- //GetDlgItemText(hwndDlg,IDC_PVER,str,sizeof(str));
- //DBWriteContactSettingByte(NULL,protocolname,"protover",(char)atoi(str));
-
- if(reconnectRequired) MessageBox(hwndDlg,Translate("The changes you have made require you to reconnect to the XFire network before they take effect"),Translate("XFire Options"),MB_OK|MB_ICONINFORMATION);
- return TRUE;
- }
-
- }
- break;
- }
- }
- return FALSE;
-}
-
-static BOOL CALLBACK DlgProcOpts3(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
- static BOOL inifound = FALSE;
- static BOOL dllfound = FALSE;
- static int nomsgboxsel[] = {1,0,2};
- static HWND hwndTree = NULL;
-
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
-
- hwndTree = GetDlgItem(hwndDlg, IDC_TREE);
-
- SetWindowLong(hwndTree,GWL_STYLE,GetWindowLong(hwndTree,GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
-
- SendMessage(hwndDlg, DM_REBUILD_TREE, 0, 0);
-
- SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_ADDSTRING, 0, (LPARAM)TranslateT("Hidden" ));
- SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_ADDSTRING, 0, (LPARAM)TranslateT("Messagebox" ));
- SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_ADDSTRING, 0, (LPARAM)TranslateT("Popup" ));
-
- //iconslots auswahl einfügen
- SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #1 (ICQ X-Status)" ));
- SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #2" ));
- SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #3" ));
- SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #4" ));
- SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #1 (ICQ X-Status)" ));
- SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #2" ));
- SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #3" ));
- SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #4" ));
-
- //scanalways
- SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_ADDSTRING, 0, (LPARAM)TranslateT("No" ));
- SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_ADDSTRING, 0, (LPARAM)TranslateT("On every start" ));
- SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_ADDSTRING, 0, (LPARAM)TranslateT("Daily" ));
-
- SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"voiceico",-1), 0);
- SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"gameico",-1), 0);
- SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"scanalways",0), 0);
-
- SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_SETCURSEL, nomsgboxsel[DBGetContactSettingByte(NULL,protocolname,"nomsgbox",0)], 0);
-
- /* Gruppen raussuchen */
- {
- int gruppen_id=0;
- char temp[8];
- DBVARIANT dbv;
-
- SendDlgItemMessage( hwndDlg, IDC_CLANGROUP, CB_ADDSTRING, 0, (LPARAM)TranslateT("<Root Group>" ));
- SendDlgItemMessage( hwndDlg, IDC_FOFGROUP, CB_ADDSTRING, 0, (LPARAM)TranslateT("<Root Group>" ));
-
- sprintf_s(temp,8,"%d",gruppen_id);
- while(!DBGetContactSettingString(NULL,"CListGroups",temp,&dbv))
- {
- gruppen_id++;
- sprintf_s(temp,8,"%d",gruppen_id);
-
- if(dbv.pszVal!=NULL) {
- SendDlgItemMessage( hwndDlg, IDC_CLANGROUP, CB_ADDSTRING, 0, (LPARAM)&dbv.pszVal[1]);
- SendDlgItemMessage( hwndDlg, IDC_FOFGROUP, CB_ADDSTRING, 0, (LPARAM)&dbv.pszVal[1]);
- DBFreeVariant(&dbv);
- }
- }
- SendDlgItemMessage( hwndDlg, IDC_CLANGROUP, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"mainclangroup",0), 0);
- SendDlgItemMessage( hwndDlg, IDC_FOFGROUP, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"fofgroup",0), 0);
- }
-
-
-
- return TRUE;
- }
-
- case DM_REBUILD_TREE:
- //baue optionsmenü auf
- TreeView_SelectItem(hwndTree, NULL);
- ShowWindow(hwndTree, SW_HIDE);
- TreeView_DeleteAllItems(hwndTree);
- {
- TVINSERTSTRUCT tvis;
- HTREEITEM lastSec = NULL;
-
- tvis.hParent = NULL;
- tvis.hInsertAfter = TVI_SORT;
- tvis.item.state = tvis.item.stateMask = TVIS_EXPANDED;
-
- int size=sizeof(mytree)/sizeof(mytreeitem);
-
-
- for(int i=0;i<size;i++)
- {
- tvis.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
- tvis.item.iImage = -1;
- tvis.item.stateMask = TVIS_EXPANDED;
- tvis.item.state = TVIS_EXPANDED;
- tvis.hParent = lastSec;
- if ( mytree[i].parent ) {
- tvis.hParent = NULL;
- tvis.item.lParam = -1;
- tvis.item.pszText = Translate(mytree[i].name);
- tvis.hParent = tvis.item.hItem = TreeView_InsertItem( hwndTree, &tvis );
- lastSec=tvis.hParent;
- tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.state = INDEXTOSTATEIMAGEMASK(0);
- TreeView_SetItem( hwndTree, &tvis.item );
- }
- else
- {
- tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.state = INDEXTOSTATEIMAGEMASK(DBGetContactSettingByte(NULL,protocolname,mytree[i].dbentry,0)==1?2:1);
- tvis.item.lParam = 0;
- tvis.item.pszText = Translate(mytree[i].name);
- mytree[i].hitem=TreeView_InsertItem( hwndTree, &tvis );
- }
- }
- }
- {
- TVITEM tvi;
- tvi.hItem = TreeView_GetRoot(hwndTree);
- while ( tvi.hItem != NULL ) {
- tvi.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
- TreeView_GetItem(hwndTree, &tvi);
- if ( tvi.lParam == -1 )
- TreeView_SetItemState(hwndTree, tvi.hItem, INDEXTOSTATEIMAGEMASK(0), TVIS_STATEIMAGEMASK);
-
- tvi.hItem=TreeView_GetNextSibling(hwndTree,tvi.hItem);
- }
- }
-
-
- ShowWindow(hwndTree, SW_SHOW);
-
- break;
-
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_COMMAND:
- CheckDlgButton(hwndDlg,IDC_CHKI,dllfound);
- CheckDlgButton(hwndDlg,IDC_CHKG,inifound);
-
- if(HIWORD(wParam) == CBN_SELCHANGE)
- {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- return 0;
- }
-
- if ((LOWORD(wParam) == IDC_LOGIN || LOWORD(wParam) == 1013 || LOWORD(wParam) == 1015 || LOWORD(wParam) == 3 || LOWORD(wParam) == IDC_NICK || LOWORD(wParam) == IDC_PASSWORD) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) )
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->idFrom)
- {
- case IDC_TREE:
- {
- switch(((NMHDR*)lParam)->code) { //wenn was geändert wurde, apply aktivieren
- case TVN_SELCHANGEDA:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- case TVN_KEYDOWN: //tastatursteuerung
- {
- NMTVKEYDOWN* ptkd = (NMTVKEYDOWN*)lParam;
- if (ptkd&&ptkd->wVKey==VK_SPACE&&TreeView_GetSelection(ptkd->hdr.hwndFrom))
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- }
- case NM_CLICK: //wenn was geklickt wurde, apply aktivieren
- {
- TVHITTESTINFO hti;
- hti.pt.x=(short)LOWORD(GetMessagePos());
- hti.pt.y=(short)HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR)lParam)->hwndFrom,&hti.pt);
- if(TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom,&hti))
- if (hti.flags&TVHT_ONITEM)
- if(hti.flags&TVHT_ONITEMSTATEICON)
- if (TreeView_GetParent(hwndTree, hti.hItem)!=NULL)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- }
- }
- }
- }
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- int reconnectRequired=0;
- int ccc;
-
- hwndTree = GetDlgItem(hwndDlg, IDC_TREE);
-
- //optionen speichern
- for(int i=0;i<sizeof(mytree)/sizeof(mytreeitem);i++)
- {
- TVITEM tvic;
- if(mytree[i].parent==0)
- {
- tvic.hItem=mytree[i].hitem;
- tvic.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
-
- TreeView_GetItem(hwndTree, &tvic);
- if ((( tvic.state & TVIS_STATEIMAGEMASK ) >> 12 == 2 ))
- DBWriteContactSettingByte(NULL,protocolname,mytree[i].dbentry,1);
- else
- DBWriteContactSettingByte(NULL,protocolname,mytree[i].dbentry,0);
- }
- }
-
- DBWriteContactSettingByte(NULL,protocolname,"nomsgbox",(BYTE)nomsgboxsel[SendDlgItemMessage(hwndDlg, IDC_NOMSG, CB_GETCURSEL, 0, 0)]);
-
- ccc=SendDlgItemMessage(hwndDlg, IDC_CBVICO, CB_GETCURSEL, 0, 0);
- DBWriteContactSettingByte(NULL,protocolname,"voiceico",(BYTE)ccc);
- ccc=SendDlgItemMessage(hwndDlg, IDC_CBGICO, CB_GETCURSEL, 0, 0);
- DBWriteContactSettingByte(NULL,protocolname,"gameico",(BYTE)ccc);
- ccc=SendDlgItemMessage(hwndDlg, IDC_CLANGROUP, CB_GETCURSEL, 0, 0);
- DBWriteContactSettingByte(NULL,protocolname,"mainclangroup",(BYTE)ccc);
- ccc=SendDlgItemMessage(hwndDlg, IDC_FOFGROUP, CB_GETCURSEL, 0, 0);
- DBWriteContactSettingByte(NULL,protocolname,"fofgroup",(BYTE)ccc);
- ccc=SendDlgItemMessage(hwndDlg, IDC_SCANUPDATECB, CB_GETCURSEL, 0, 0);
- DBWriteContactSettingByte(NULL,protocolname,"scanalways",(BYTE)ccc);
-
- //protocolversion wird autoamtisch vergeben
- //GetDlgItemText(hwndDlg,IDC_PVER,str,sizeof(str));
- //DBWriteContactSettingByte(NULL,protocolname,"protover",(char)atoi(str));
-
- if(reconnectRequired) MessageBox(hwndDlg,Translate("The changes you have made require you to reconnect to the XFire network before they take effect"),Translate("XFire Options"),MB_OK|MB_ICONINFORMATION);
- return TRUE;
- }
-
- }
- break;
- }
- }
- return FALSE;
-}
-
-static BOOL CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
- static BOOL inifound = FALSE;
- static BOOL dllfound = FALSE;
- static int nomsgboxsel[] = {1,0,2};
- static HWND hwndTree = NULL;
-
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- //addgamedia auf 0 setzen
- TranslateDialogDefault(hwndDlg);
-
- FoldersGetCustomPath( XFireWorkingFolder, inipath, 1024, 'W' );
- strcat(inipath,"\\");
- strcat(inipath,"xfire_games.ini");
-
- FILE * f = fopen(inipath,"r");
- if(f!=NULL)
- {
- fclose(f);
- CheckDlgButton(hwndDlg,IDC_CHKG,1);
- inifound = TRUE;
- }
- else
- {
- EnableDlgItem(hwndDlg, IDC_SETUPGAMES, FALSE);
- inifound = FALSE;
- }
-
- FoldersGetCustomPath( XFireIconFolder, inipath, 1024, 'W' );
- strcat(inipath,"\\");
- strcat(inipath,"icons.dll");
-
- f = fopen(inipath,"r");
- if(f!=NULL)
- {
- fclose(f);
- CheckDlgButton(hwndDlg,IDC_CHKI,1);
- dllfound = TRUE;
- }
- else
- dllfound = FALSE;
-
- //alle blockierten nutzer in die liste einfügen
- DBCONTACTENUMSETTINGS dbces;
-
- // enum all setting the contact has for the module
- dbces.pfnEnumProc = enumSettingsProc;
- dbces.szModule = "XFireBlock";
- dbces.lParam = (LPARAM)hwndDlg;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, 0,(LPARAM)&dbces);
-
- SendMessage(GetDlgItem(hwndDlg,IDC_REMUSER),BM_SETIMAGE,IMAGE_ICON,(WPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE));
-
- FoldersGetCustomPath( XFireWorkingFolder, inipath, 1024, 'W' );
- SetDlgItemText(hwndDlg,IDC_FILESSHOULDBE,inipath);
-
- EnableDlgItem(hwndDlg, IDC_REMUSER, FALSE);
-
- return TRUE;
- }
-
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_COMMAND:
- CheckDlgButton(hwndDlg,IDC_CHKI,dllfound);
- CheckDlgButton(hwndDlg,IDC_CHKG,inifound);
-
- if(LOWORD(wParam) == IDC_REMUSER) //nutzer soll aus der blockierliste raus
- {
- char temp[255];
- int sel=SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETCURSEL, 0, 0);
- if(sel!=LB_ERR) //nur wenn was ausgewählt wurde
- {
- SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETTEXT, sel, (LPARAM)temp);
- SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_DELETESTRING, sel, 0);
- DBDeleteContactSetting(NULL,"XFireBlock",temp);
- if(SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETCOUNT, 0, 0)==0)
- EnableDlgItem(hwndDlg, IDC_REMUSER, FALSE);
- }
- }
-
-
- if ((LOWORD(wParam) == 9508 || LOWORD(wParam) == IDC_LOGIN || LOWORD(wParam) == IDC_SETUPGAMES || LOWORD(wParam) == IDC_PASSWORD) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) )
- return 0;
-
- break;
-
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- return TRUE;
- }
-
- }
- break;
- }
- }
- return FALSE;
-}
-
-static BOOL CALLBACK DlgProcOpts5(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- DBVARIANT dbv;
-
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
-
- CheckDlgButton(hwndDlg,IDC_ENABLESTSMSG,DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0));
- CheckDlgButton(hwndDlg,IDC_CHGSTATUS,DBGetContactSettingByte(NULL,protocolname,"statuschgtype",0));
- CheckDlgButton(hwndDlg,IDC_DNDFIRST,DBGetContactSettingByte(NULL,protocolname,"dndfirst",0));
- if(!DBGetContactSetting(NULL,protocolname,"setstatusmsg",&dbv)) {
- SetDlgItemText(hwndDlg,IDC_STATUSMSG,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- if(!IsDlgButtonChecked(hwndDlg, IDC_ENABLESTSMSG))
- {
- EnableDlgItem(hwndDlg, IDC_STATUSMSG, FALSE);
- }
- /* if(!ServiceExists(MS_VARS_FORMATSTRING))
- {
- EnableDlgItem(hwndDlg, IDC_STATUSMSG, FALSE);
- EnableDlgItem(hwndDlg, IDC_ENABLESTSMSG, FALSE);
- EnableDlgItem(hwndDlg, IDC_CHGSTATUS, FALSE);
- EnableDlgItem(hwndDlg, IDC_DNDFIRST, FALSE);
- }*/
-
- return TRUE;
- }
-
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_COMMAND:
- if ( IsDlgButtonChecked(hwndDlg, IDC_ENABLESTSMSG) ) {
- EnableDlgItem(hwndDlg, IDC_STATUSMSG, TRUE);
- }
- else
- {
- EnableDlgItem(hwndDlg, IDC_STATUSMSG, FALSE);
- }
-
- if ((LOWORD(wParam) == IDC_LOGIN || LOWORD(wParam) == IDC_STATUSMSG || LOWORD(wParam) == IDC_PASSWORD) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) )
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- break;
-
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- int reconnectRequired=0;
- char str[512];
-
- GetDlgItemText(hwndDlg,IDC_STATUSMSG,str,sizeof(str));
- DBWriteContactSettingString(NULL,protocolname,"setstatusmsg",str);
-
- DBWriteContactSettingByte(NULL,protocolname, "autosetstatusmsg", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ENABLESTSMSG));
- DBWriteContactSettingByte(NULL,protocolname, "statuschgtype", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CHGSTATUS));
- DBWriteContactSettingByte(NULL,protocolname, "dndfirst", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DNDFIRST));
-
- return TRUE;
- }
-
- }
- break;
- }
- }
- return FALSE;
-}
-
-static BOOL CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- addgameDialog=NULL;
-
- TranslateDialogDefault(hwndDlg);
-
- //elemente erstmal abstellen
- EnableDlgItem(hwndDlg, IDC_DONTDETECT, FALSE);
- EnableDlgItem(hwndDlg, IDC_NOSTATUSMSG, FALSE);
- EnableDlgItem(hwndDlg, IDC_NOTINSTARTMENU, FALSE);
- EnableDlgItem(hwndDlg, IDC_APPLY, FALSE);
- EnableDlgItem(hwndDlg, IDC_EXTRAPARAMS, FALSE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_EDITGAME), SW_HIDE);
-
- //gamelist füllen
- SendMessage(hwndDlg,WM_FILLGAMELIST,0,0);
-
- //SendMessage(GetDlgItem(hwndDlg,IDC_CREATETXTLIST),BM_SETIMAGE,IMAGE_ICON,(WPARAM)LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS));
-
- return TRUE;
- }
- case WM_FILLGAMELIST:
- {
- //spielliste leeren
- SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_RESETCONTENT, 0, 0);
- //spiele auslesen und in die liste einfügen
- int found=DBGetContactSettingWord(NULL,protocolname,"foundgames",0);
- char temp[XFIRE_MAXSIZEOFGAMENAME];
- for(int i=0;i<found;i++)
- {
- //id auslesen
- sprintf_s(temp,XFIRE_MAXSIZEOFGAMENAME,"gameid_%d",i);
- int gameid=DBGetContactSettingWord(NULL,protocolname,temp,0);
- //spielnamen auslesen
- xgamelist.getGamename(gameid,temp,XFIRE_MAXSIZEOFGAMENAME);
- //eintrag einfügen
- int idx=SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_ADDSTRING, 0, (LPARAM)temp);
- //id an das element übergeben
- SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_SETITEMDATA, idx, gameid);
- }
- return TRUE;
- }
- case WM_COMMAND:
- {
- if(LOWORD(wParam)==IDC_REMOVE)
- {
- int idx=SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_GETCURSEL, 0, 0);
-
- //was ausgewählt in der liste?
- if(idx!=LB_ERR) {
- //user fragen ob er das game wirklich löschen will
- if(MessageBox(hwndDlg,Translate("Are you sure you want to remove this game?"),Translate("XFire Options"),MB_YESNO|MB_ICONQUESTION)==IDYES) {
- //gameliste blocken
- xgamelist.Block(TRUE);
- //spielid auslesen
- int gameid=SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_GETITEMDATA, idx, 0);
- //spiel per gameid entfernen
- xgamelist.Removegame(gameid);
- //db säubern
- xgamelist.clearDatabase(TRUE);
- //derzeitige gameliste in die datenbank eintragen
- xgamelist.writeDatabase();
- //startmenu leeren
- xgamelist.clearStartmenu();
- //startmenu neuerzeugen
- xgamelist.createStartmenu();
- //gameliste unblocken
- xgamelist.Block(FALSE);
- //gamelist neu füllen
- SendMessage(hwndDlg,WM_FILLGAMELIST,0,0);
- //erstes vorauswählen
- SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_SETCURSEL, 0, 0);
- //liste refresh
- SendMessage(hwndDlg,WM_COMMAND,MAKELONG(IDC_LGAMELIST,LBN_SELCHANGE),0);
- }
- }
- else
- MessageBox(hwndDlg,Translate("Please select a game."),Translate("XFire Options"),MB_OK|MB_ICONEXCLAMATION);
-
- }
- else
- if(LOWORD(wParam)==IDC_ADDGAME)
- {
- //gameliste blocken
- xgamelist.Block(TRUE);
- //if(DialogBox(hinstance,MAKEINTRESOURCE(IDD_ADDGAME),hwndDlg,DlgAddGameProc)) {
- AddGameDialog(hwndDlg);
- //gameliste unblocken
- xgamelist.Block(FALSE);
- //gamelist neu füllen
- SendMessage(hwndDlg,WM_FILLGAMELIST,0,0);
- }
- //copy gamelist to clipboard button entfernt
- /*else if(LOWORD(wParam)==IDC_CREATETXTLIST) //gameliste als textform für debugging erstellen
- {
- //gameliste blocken
- xgamelist.Block(TRUE);
-
- //alle games durchgehen
- Xfire_game* nextgame;
- //output string
- char* out=new char[10];
- xgamelist.setString("Xfire-gamelist:\r\n",&out);
- while(xgamelist.getnextGame(&nextgame))
- {
- if(nextgame->name)
- {
- xgamelist.appendString("\r\nName: ",&out);
- xgamelist.appendString(nextgame->name,&out);
- }
- if(nextgame->path)
- {
- xgamelist.appendString("\r\nPath: ",&out);
- xgamelist.appendString(nextgame->path,&out);
- }
- if(nextgame->launchparams)
- {
- xgamelist.appendString("\r\nLaunch: ",&out);
- xgamelist.appendString(nextgame->launchparams,&out);
- }
-
- char temp[10];
- _itoa(nextgame->id,temp,10);
- xgamelist.appendString("\r\nId: ",&out);
- xgamelist.appendString(temp,&out);
-
- _itoa(nextgame->send_gameid,temp,10);
- xgamelist.appendString("\r\nSend-Id: ",&out);
- xgamelist.appendString(temp,&out);
-
- if(nextgame->skip)
- {
- xgamelist.appendString("\r\nThis game will be skipped in game detection!",&out);
- }
-
- xgamelist.appendString("\r\n",&out);
- }
-
- if(OpenClipboard(NULL))
- {
- HGLOBAL clipbuffer;
- char* buffer;
-
- EmptyClipboard();
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(out)+1);
- buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(out));
- GlobalUnlock(clipbuffer);
-
- SetClipboardData(CF_TEXT, clipbuffer);
- CloseClipboard();
- }
-
- if(out!=NULL) delete[] out;
-
- //gameliste unblocken
- xgamelist.Block(FALSE);
- }*/
- else if(LOWORD(wParam)==IDC_EDITGAME) {
- int idx=SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_GETCURSEL, 0, 0);
-
- //was ausgewählt in der liste?
- if(idx!=LB_ERR) {
- //gameliste blocken
- xgamelist.Block(TRUE);
- //gameid der aktuellen auswahl auslesen
- int gameid=SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_GETITEMDATA, idx, 0);
- //spielobject holen
- Xfire_game* tempgame=xgamelist.getGamebyGameid(gameid);
- //gültiger verweis?
- if(tempgame) {
- //editmodus des addgamedialog
- AddGameDialog(hwndDlg,tempgame);
- //elemente wieder unsichtbar machen
- EnableDlgItem(hwndDlg, IDC_DONTDETECT, FALSE);
- EnableDlgItem(hwndDlg, IDC_NOSTATUSMSG, FALSE);
- EnableDlgItem(hwndDlg, IDC_NOTINSTARTMENU, FALSE);
- EnableDlgItem(hwndDlg, IDC_APPLY, FALSE);
- EnableDlgItem(hwndDlg, IDC_EXTRAPARAMS, FALSE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_EDITGAME), SW_HIDE);
- }
- else
- MessageBox(hwndDlg,Translate("Error unknown game id."),Translate("XFire Options"),MB_OK|MB_ICONEXCLAMATION);
- //gameliste unblocken
- xgamelist.Block(FALSE);
- //gamelist neu füllen
- SendMessage(hwndDlg,WM_FILLGAMELIST,0,0);
- }
- else
- MessageBox(hwndDlg,Translate("Please select a game."),Translate("XFire Options"),MB_OK|MB_ICONEXCLAMATION);
- }else //wurde ein spiel aus der liste gewählt?
- if(HIWORD(wParam)==LBN_SELCHANGE && LOWORD(wParam)==IDC_LGAMELIST)
- {
- int idx=SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_GETCURSEL, 0, 0);
- //es wurde was ausgewählt?
- if(idx!=LB_ERR)
- {
- //textlänge auslesen
- int size=SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_GETTEXTLEN, idx, 0);
- //textbuffer anlegen
- char* text=new char[size+1];
- SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_GETTEXT, idx, (LPARAM)text);
- SetDlgItemText(hwndDlg,IDC_GAMENAME,text);
- //textbuffer löschen
- if(text!=NULL)
- {
- delete text;
- text=NULL;
- }
- //id des spielsbekommen
- int gameid=SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_GETITEMDATA, idx, 0);
-
- HICON hicon=xgamelist.iconmngr.getGameIcon(gameid);
- //iconhandle holen und setzen
- if(hicon)
- SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)hicon,0);
- else
- SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,0,0);
-
- //elemente aktivieren
- EnableDlgItem(hwndDlg, IDC_DONTDETECT, TRUE);
- EnableDlgItem(hwndDlg, IDC_NOSTATUSMSG, TRUE);
- EnableDlgItem(hwndDlg, IDC_APPLY, TRUE);
- EnableDlgItem(hwndDlg, IDC_NOTINSTARTMENU, TRUE);
- EnableDlgItem(hwndDlg, IDC_EXTRAPARAMS, TRUE);
-
- Xfire_game* xgtemp = xgamelist.getGamebyGameid(gameid);
- if(xgtemp && xgtemp->custom)
- {
- ShowWindow(GetDlgItem(hwndDlg,IDC_MANADDED),SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_EDITGAME), SW_SHOW);
- }
- else
- {
- ShowWindow(GetDlgItem(hwndDlg,IDC_MANADDED),SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_EDITGAME), SW_HIDE);
- }
-
- //gameskip wert setzen
- char temp[64]="";
- sprintf_s(temp,64,"gameskip_%d",gameid);
- CheckDlgButton(hwndDlg,IDC_DONTDETECT,DBGetContactSettingByte(NULL,protocolname,temp,0));
- sprintf_s(temp,64,"gamenostatus_%d",gameid);
- CheckDlgButton(hwndDlg,IDC_NOSTATUSMSG,DBGetContactSettingByte(NULL,protocolname,temp,0));
- sprintf_s(temp,64,"notinstartmenu_%d",gameid);
- CheckDlgButton(hwndDlg,IDC_NOTINSTARTMENU,DBGetContactSettingByte(NULL,protocolname,temp,0));
-
- //extra parameter auslesen, aber nur, wenn das spiel auch sowas unterstützt
- if(xgtemp && xgtemp->haveExtraGameArgs())
- {
- EnableDlgItem(hwndDlg, IDC_EXTRAPARAMS, TRUE);
- sprintf_s(temp,64,"gameextraparams_%d",gameid);
- DBVARIANT dbv;
- if(!DBGetContactSetting(NULL,protocolname,temp,&dbv))
- {
- SetDlgItemText(hwndDlg,IDC_EXTRAPARAMS,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- else
- SetDlgItemText(hwndDlg,IDC_EXTRAPARAMS,"");
- }
- else
- {
- EnableDlgItem(hwndDlg, IDC_EXTRAPARAMS, FALSE);
- SetDlgItemText(hwndDlg,IDC_EXTRAPARAMS,Translate("Not supported"));
- }
- }
- }
- else if(LOWORD(wParam)==IDC_APPLY)
- {
- //auswahl speichern
- int idx=SendDlgItemMessage(hwndDlg, IDC_LGAMELIST, LB_GETCURSEL, 0, 0);
- //es wurde was ausgewählt?
- if(idx!=LB_ERR)
- {
- int gameid=SendDlgItemMessage( (HWND)hwndDlg, IDC_LGAMELIST, LB_GETITEMDATA, idx, 0);
- int dbid;
-
- //gamelist blocken
- xgamelist.Block(TRUE);
-
- if(xgamelist.Gameinlist(gameid,&dbid))
- {
- Xfire_game* game=xgamelist.getGame(dbid);
- if(game)
- {
- game->skip=(BYTE)IsDlgButtonChecked(hwndDlg, IDC_DONTDETECT);
- game->noicqstatus=(BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOSTATUSMSG);
- game->notinstartmenu=(BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTINSTARTMENU);
-
- //extra parameter auslesen und das gameobj schreiben
- char str[128]="";
- GetDlgItemText(hwndDlg,IDC_EXTRAPARAMS,str,sizeof(str));
- if(str[0]!=0)
- {
- //extra parameter sind gesetzt, zuweisen
- game->setString(str,&game->extraparams);
- }
- else
- {
- //extra parameter leer, wenn gesetzt entfernen/freigeben
- if(game->extraparams)
- {
- delete[] game->extraparams;
- game->extraparams=NULL;
- }
- }
-
-
- game->refreshMenuitem();
- game->writeToDB(dbid);
-
- SetDlgItemText(hwndDlg,IDC_TEXTSTATUS,Translate("Configuration saved!"));
- }
- else
- {
- SetDlgItemText(hwndDlg,IDC_TEXTSTATUS,Translate("Game not found?!"));
- }
- }
- else
- {
- SetDlgItemText(hwndDlg,IDC_TEXTSTATUS,Translate("Game not found?!"));
- }
-
- //gamelist unblocken
- xgamelist.Block(FALSE);
- }
- }
- break;
- }
-
- case WM_NOTIFY:
- {
- break;
- }
- }
- return FALSE;
-}
-
-static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- case WM_INITDIALOG:
- {
- HWND hwndTab,hPage;
- TCITEMA tci = {0};
- int iTotal;
- RECT rcClient;
-
- hwndTab = GetDlgItem(hwndDlg, IDC_OPTIONSTAB);
- TabCtrl_DeleteAllItems(hwndTab);
- GetClientRect(GetParent(hwndTab), &rcClient);
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_OPTLOGIN), hwndDlg, DlgProcOpts2);
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("Account");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 6, rcClient.bottom - 28, 1);
- iTotal++;
-
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_OPTFEAT), hwndDlg, DlgProcOpts3);
- ShowWindow(hPage,FALSE);
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("Features");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 6, rcClient.bottom - 28, 1);
- iTotal++;
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_OPTFEAT2), hwndDlg, DlgProcOpts4);
- ShowWindow(hPage,FALSE);
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("Blocklist / Games");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 6, rcClient.bottom - 28, 1);
- iTotal++;
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_OPTFEAT3), hwndDlg, DlgProcOpts5);
- ShowWindow(hPage,FALSE);
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("StatusMsg");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 6, rcClient.bottom - 28, 1);
- iTotal++;
-
- hPage=CreateDialog(hinstance, MAKEINTRESOURCE(IDD_OPTFEAT4), hwndDlg, DlgProcOpts6);
- ShowWindow(hPage,FALSE);
- iTotal = TabCtrl_GetItemCount(hwndTab);
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)hPage;
- tci.pszText = Translate("Games");
- SendMessageA(hwndTab, TCM_INSERTITEMA, iTotal, (WPARAM)&tci);
- MoveWindow(hPage, 3, 24, rcClient.right - 6, rcClient.bottom - 28, 1);
- iTotal++;
-
- TabCtrl_SetCurSel(hwndTab, 0);
-
- return TRUE;
- }
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->idFrom)
- {
- case 0:
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- TCITEM tci;
- int i,count;
-
- tci.mask = TCIF_PARAM;
- count = TabCtrl_GetItemCount(GetDlgItem(hwndDlg,IDC_OPTIONSTAB));
- for (i=0; i<count; i++)
- {
- TabCtrl_GetItem(GetDlgItem(hwndDlg,IDC_OPTIONSTAB),i,&tci);
- SendMessage((HWND)tci.lParam,WM_NOTIFY,0,lParam);
- }
- break;
- }
- }
- break;
-
- case IDC_OPTIONSTAB:
- {
- HWND hTabCtrl = GetDlgItem(hwndDlg, IDC_OPTIONSTAB);
-
- switch (((LPNMHDR)lParam)->code)
- {
- case TCN_SELCHANGING:
- {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(hTabCtrl, TabCtrl_GetCurSel(hTabCtrl), &tci);
- ShowWindow((HWND)tci.lParam, SW_HIDE);
- }
- break;
-
- case TCN_SELCHANGE:
- {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(hTabCtrl, TabCtrl_GetCurSel(hTabCtrl), &tci);
- ShowWindow((HWND)tci.lParam,SW_SHOW);
- }
- break;
- }
- break;
- }
- }
- break;
- }
-
- return FALSE;
-}
-
-int OptInit(WPARAM wParam,LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp;
-
- ghwndDlg2=NULL;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- //odp.position=-790000000;
- odp.hInstance=hinstance;
- odp.pszTemplate=MAKEINTRESOURCE(IDD_OPT);
- odp.pszTitle=Translate("XFire");
- odp.pszGroup = Translate("Network");
- odp.flags=ODPF_BOLDGROUPS;
- //odp.nIDBottomSimpleControl=IDC_GROUPMAIN;
- odp.pfnDlgProc=DlgProcOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
-
- return 0;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.cpp
deleted file mode 100644
index d0d16fb41e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "otherloginpacket.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- void OtherLoginPacket::parseContent(char *buf, int length, int numberOfAtts) {
- XINFO(("Someone login in with the same account that we have\n"));
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.h
deleted file mode 100644
index 4f1168e427..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/otherloginpacket.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __OTHERLOGINPACKET_H
-#define __OTHERLOGINPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-#define XFIRE_OTHER_LOGIN 145
-
-namespace xfirelib {
-
- class OtherLoginPacket : public XFireRecvPacketContent {
- public:
- XFirePacketContent* newPacket() { return new OtherLoginPacket(); }
-
- int getPacketId() { return XFIRE_OTHER_LOGIN; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/packetlistener.h b/plugins/!NotAdopted/Xfire/xfiretest/packetlistener.h
deleted file mode 100644
index 5702affcff..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/packetlistener.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __PACKETLISTENER_H
-#define __PACKETLISTENER_H
-
-#include "xfirepacket.h"
-
-
-namespace xfirelib {
- struct XFirePacket;
-
- class PacketListener {
- public:
- virtual ~PacketListener() { }
- virtual void receivedPacket(XFirePacket *packet) = 0;
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/packetreader.cpp b/plugins/!NotAdopted/Xfire/xfiretest/packetreader.cpp
deleted file mode 100644
index d06c480a6e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/packetreader.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "packetreader.h"
-
-#include <iostream>
-#include "xfirepacket.h"
-
-#include "clientinformationpacket.h"
-#include "authpacket.h"
-#include "loginfailedpacket.h"
-#include "loginsuccesspacket.h"
-#include "buddylistonlinepacket.h"
-#include "buddylistnamespacket.h"
-#include "clanbuddylistnamespacket.h"
-#include "xfireclanpacket.h"
-#include "buddylistgamespacket.h"
-#include "buddylistgames2packet.h"
-#include "messagepacket.h"
-#include "otherloginpacket.h"
-#include "invitebuddypacket.h"
-#include "inviterequestpacket.h"
-#include "recvremovebuddypacket.h"
-#include "recvstatusmessagepacket.h"
-#include "recvoldversionpacket.h"
-#include "recvdidpacket.h"
-#include "recvprefspacket.h"
-#include "gameinfopacket.h"
-#include "claninvitationpacket.h"
-#include "xfirefoundbuddys.h"
-#include "buddyinfo.h"
-#include "friendsoffriendlist.h"
-#include "recvbuddychangednick.h"
-
-#include "xdebug.h"
-//#include "packetlistener.h"
-
-namespace xfirelib {
- using namespace std;
-
- PacketReader::PacketReader(Socket *socket) {
- this->socket = socket;
- this->packetListeners = new vector<PacketListener *>();
-
- initPackets();
- }
- void PacketReader::setSocket(Socket *socket) {
- this->socket = socket;
- }
- PacketReader::~PacketReader() {
- // TODO: delete each packetListener ..
- delete packetListeners;
-
- while(!packets->empty()) { delete packets->at(packets->size()-1); packets->pop_back(); }
- delete packets;
- }
-
- void PacketReader::initPackets() {
- packets = new vector <XFirePacketContent *>();
- packets->push_back( new ClientInformationPacket() );
- packets->push_back( new AuthPacket() );
- packets->push_back( new LoginFailedPacket() );
- packets->push_back( new LoginSuccessPacket() );
- packets->push_back( new MessagePacket() );
- packets->push_back( new BuddyListOnlinePacket() );
- packets->push_back( new BuddyListNamesPacket() );
- packets->push_back( new BuddyListGamesPacket() );
- packets->push_back( new BuddyListGames2Packet() );
- packets->push_back( new OtherLoginPacket() );
- packets->push_back( new InviteBuddyPacket() );
- packets->push_back( new InviteRequestPacket() );
- packets->push_back( new RecvRemoveBuddyPacket() );
- packets->push_back( new RecvDidPacket() );
- packets->push_back( new RecvStatusMessagePacket() );
- packets->push_back( new RecvOldVersionPacket() );
- packets->push_back( new RecvPrefsPacket() );
- //neue packetklassen hinzugefügt - dufte
- packets->push_back( new FriendsBuddyListNamesPacket() );
- packets->push_back( new ClanBuddyListNamesPacket() );
- packets->push_back( new XFireClanPacket() );
- packets->push_back( new GameInfoPacket() );
- packets->push_back( new ClanInvitationPacket() );
- packets->push_back( new XFireFoundBuddys() );
- packets->push_back( new BuddyInfoPacket() );
- packets->push_back( new RecvBuddyChangedNick() );
- }
-
-
- void *muh(void *ptr);
-
- /* I moved thread starting to Client
-
- void PacketReader::startListening() {
- PacketReader *myself = this;
- void* (*func)(void*) = &xfirelib::PacketReader::thread_start;
- XINFO(("About to start thread\n"));
- int ret = pthread_create( &readthread, NULL, func, (void*)myself );
- XDEBUG(("ret: %d\n",ret));
- }
- */
-
- void PacketReader::run() {
- // start receiving on socket...
- XDEBUG(("Starting run() method .... \n"));
- while(socket != NULL) {
- string str;
- //int b = socket->recv(str);
- XFirePacket *packet = new XFirePacket(this);
- XDEBUG(("Waiting for next packet ... \n"));
- if(packet==NULL) continue;
- packet->recvPacket( socket );
- XINFO(("Received packet\n"));
- if(packet->getContent() != NULL) {
- fireListeners( packet );
- } else {
- XDEBUG(("Packet Content was NULL ... Unknown Packet Id ??\n"));
- }
- XDEBUG(("Notified Listeners\n"));// << b << "bytes: " << str << endl;
- delete packet->getContent();
- delete packet;
- }
- }
-
- void PacketReader::fireListeners( XFirePacket *packet ) {
- for(vector<PacketListener *>::iterator it = packetListeners->begin() ;
- it != packetListeners->end() ; ++it) {
- (*it)->receivedPacket( packet );
- }
- }
-
- XFirePacketContent *PacketReader::getPacketContentClass(int packetId) {
- XDEBUG(("Searching for a content class...\n"));
- for(uint i = 0 ; i < packets->size() ; i++)
- if(packets->at(i)->getPacketId() == packetId) return packets->at(i);
- XDEBUG(("None Found\n"));
- return NULL;
- }
-
- void PacketReader::addPacketListener( PacketListener *listener ) {
- packetListeners->push_back( listener );
- }
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/packetreader.h b/plugins/!NotAdopted/Xfire/xfiretest/packetreader.h
deleted file mode 100644
index 6108500565..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/packetreader.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "socket.h"
-
-#ifndef __PACKETREADER_H
-#define __PACKETREADER_H
-
-#include <vector>
-#include "xfirepacketcontent.h"
-#include "packetlistener.h"
-
-namespace xfirelib {
- struct PacketListener;
- struct XFirePacket;
-
-class PacketReader {
- public:
- PacketReader(Socket *socket);
- ~PacketReader();
-
- void setSocket(Socket *socket);
- void startListening();
- XFirePacketContent *getPacketContentClass(int packetId);
- void addPacketListener( PacketListener *listener );
- void run();
- private:
- void initPackets();
- void fireListeners( XFirePacket *packet );
-
- Socket *socket;
- std::vector <XFirePacketContent *> *packets;
- std::vector <PacketListener *> *packetListeners;
-};
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp b/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp
deleted file mode 100644
index 7b2202c24f..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//fürs passwort dialog - dufte
-
-#include "stdafx.h"
-#include "passworddialog.h"
-
-static char nick[255];
-BOOL usenick=FALSE;
-
-BOOL CALLBACK DlgPWProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static char* pw[255];
- switch (msg)
- {
- case WM_CLOSE:
- {
- GetDlgItemTextA(hwndDlg,IDC_PWSTRING,(LPSTR)pw,254);
- if(usenick)
- GetDlgItemTextA(hwndDlg,IDC_PWNICK,(LPSTR)nick,254);
- EndDialog(hwndDlg,(INT_PTR)pw);
- break;
- }
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- //passwort und nick leeren
- pw[0]=0;
- nick[0]=0;
- SendMessage(hwndDlg,WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
- if(!usenick)
- EnableWindow(GetDlgItem(hwndDlg,IDC_PWNICK),FALSE);
-
- return TRUE;
- }
- case WM_COMMAND:
- {
- if(LOWORD(wParam) == IDC_BTN4) {
- SendMessage(hwndDlg,WM_CLOSE,0,0);
- }
- break;
- }
- }
- return FALSE;
-}
-
-void ShowPasswordDialog(char*pw,char*mynick) {
- if(mynick!=NULL)
- {
- usenick=TRUE;
- }
- else
- usenick=FALSE;
-
- char* npw = (char*)DialogBox(hinstance,MAKEINTRESOURCE(IDD_PWDLG),NULL,DlgPWProc);
- strcpy(pw,npw);
- if(mynick)
- {
- strcpy(mynick,(char*)nick);
- }
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.h b/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.h
deleted file mode 100644
index 4078c766df..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "baseProtocol.h"
-#include "resource.h"
-
-void ShowPasswordDialog(char*pw,char*mynick=NULL); \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.cpp b/plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.cpp
deleted file mode 100644
index f60d69ef5f..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "stdafx.h"
-#include "processbuddyinfo.h"
-
-#include <sys\stat.h>
-
-
-/*
-DBWriteContactSettingTString(xsa->hContact, "ContactPhoto", "Backup", av.backup);
-DBWriteContactSettingTString(xsa->hContact, "ContactPhoto", "File", av.file);
-DBWriteContactSettingTString(xsa->hContact, "ContactPhoto", "RFile", av.rfile);
-DBWriteContactSettingWord(xsa->hContact, "ContactPhoto", "Format", av.type);
-*/
-
-extern HANDLE XFireAvatarFolder;
-
-//vom Yahoo plugin
-/*int avt_hash(const char *key, DWORD ksize)
-{
- const char *p = key;
- int h = *p;
- long l = 1;
-
- if (h)
- for (p += 1; l < ksize; p++, l++)
- h = (h << 5) - h + *p;
-
- return h;
-}*/
-
-void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,HANDLE hcontact,char* username) {
- char temp[512]="";
- char filename[512];
- BOOL dl=FALSE;
- int type;
-
- //versuche doppeltes laden zuvermeiden
- if(hcontact) //avatar von freunden
- {
- if(DBGetContactSettingDword(hcontact, "ContactPhoto", "XFireAvatarId", 0)==buddyinfo->avatarid &&
- DBGetContactSettingByte(hcontact, "ContactPhoto", "XFireAvatarMode", 0)==buddyinfo->avatarmode)
- return;
- }
- else //eigeneder avatar
- {
- if(DBGetContactSettingDword(hcontact, protocolname, "XFireAvatarId", 0)==buddyinfo->avatarid &&
- DBGetContactSettingByte(hcontact, protocolname, "XFireAvatarMode", 0)==buddyinfo->avatarmode)
- return;
-
- //alten dateipfad des avatars löschen, wenn sichw as geändert hat
- DBDeleteContactSetting(NULL,protocolname, "MyAvatarFile");
- }
-
- FoldersGetCustomPath( XFireAvatarFolder, filename, 1024, 'A' );
- strcat(filename,"\\");
-
- switch(buddyinfo->avatarmode) {
- case 1:
- strcat(filename,username);
- strcat(filename,".gif");
- type=PA_FORMAT_GIF;
-
- sprintf(temp,"/xfire/xf/images/avatars/gallery/default/%03d.gif",buddyinfo->avatarid);
-
- dl=GetWWWContent("media.xfire.com",temp,filename,FALSE);
- break;
- case 2:
- strcat(filename,username);
- strcat(filename,".jpg");
- type=PA_FORMAT_JPEG;
-
- sprintf(temp,"/avatar/100/%s.jpg?%d",username,buddyinfo->avatarid);
-
- dl=GetWWWContent("screenshot.xfire.com",temp,filename,FALSE);
- break;
- case 3:
- type=PA_FORMAT_GIF;
- strcat(filename,"xfire.gif");
-
- sprintf(temp,"/xfire/xf/images/avatars/gallery/default/xfire.gif",buddyinfo->avatarid);
-
- dl=GetWWWContent("media.xfire.com",temp,filename,TRUE);
- break;
- default:
- return;
- }
-
-
- if(dl!=FALSE)
- {
- if(hcontact) //buddyavatar setzen
- {
- DBWriteContactSettingDword(hcontact, "ContactPhoto", "XFireAvatarId", buddyinfo->avatarid);
- DBWriteContactSettingByte(hcontact, "ContactPhoto", "XFireAvatarMode", buddyinfo->avatarmode);
- PROTO_AVATAR_INFORMATION AI;
- AI.cbSize = sizeof(AI);
- AI.format = type;
- AI.hContact = hcontact;
- lstrcpy(AI.filename,filename);
- ProtoBroadcastAck(protocolname, hcontact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS,(HANDLE) &AI, 0);
- }
- else //eigenen avatar setzen
- {
- DBWriteContactSettingDword(NULL, protocolname, "XFireAvatarId", buddyinfo->avatarid);
- DBWriteContactSettingByte(NULL, protocolname, "XFireAvatarMode", buddyinfo->avatarmode);
- //neuen avatarfilepath eintragen
- DBWriteContactSettingTString(NULL,protocolname, "MyAvatarFile",filename);
- //beshceid geben, avatar hat sich geändert
- CallService(MS_AV_REPORTMYAVATARCHANGED,(WPARAM)protocolname,0);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.h b/plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.h
deleted file mode 100644
index 0964ef983b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/processbuddyinfo.h
+++ /dev/null
@@ -1,7 +0,0 @@
-//funktion soll avatar runterladen und dem buddy zuordnen
-#include "baseProtocol.h"
-#include "resource.h"
-#include "getbuddyinfo.h"
-#include "buddyinfo.h"
-
-void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,HANDLE hcontact,char* username); \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp b/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp
deleted file mode 100644
index e2668b96d7..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//fürs nick - dialog
-
-#include "stdafx.h"
-#include "pwd_dlg.h"
-
-char password[256]="";
-
-BOOL CALLBACK DlgPwProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- SetWindowText(hwndDlg, "Please enter server password ...");
- TranslateDialogDefault(hwndDlg);
- SendMessage(hwndDlg,WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
- return TRUE;
- }
- case WM_COMMAND:
- {
- if(LOWORD(wParam) == IDOK)
- {
- GetDlgItemText(hwndDlg,IDC_NICKNAME,password,sizeof(password));
- EndDialog(hwndDlg,TRUE);
- return TRUE;
- }
- else if(LOWORD(wParam) == IDCANCEL)
- {
- EndDialog(hwndDlg,FALSE);
- return FALSE;
- }
- }
- }
- return FALSE;
-}
-
-BOOL ShowPwdDlg(char* pw) {
- //kein gültiges ziel für das eingegebene passwort
- if(&pw==NULL)
- return FALSE;
-
- if(DialogBox(hinstance,MAKEINTRESOURCE(IDD_SETNICKNAME),NULL,DlgPwProc))
- {
- //passwort kopieren
- if(*password == 0)
- return FALSE;
-
- strcpy_s(pw,255,password);
- return TRUE;
- }
-
- return FALSE;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.h b/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.h
deleted file mode 100644
index 022c63de9f..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "baseProtocol.h"
-#include "resource.h"
-
-BOOL ShowPwdDlg(char* pw); \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.cpp b/plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.cpp
deleted file mode 100644
index f48b8da043..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "recvbuddychangednick.h"
-#include "variablevalue.h"
-
-//packet liest neue nicks ein
-
-namespace xfirelib {
- using namespace std;
-
- void RecvBuddyChangedNick::parseContent(char *buf, int length, int numberOfAtts) {
- VariableValue val;
- int index = 0;
- index +=2; // Ignore 02 01 02 ??
- index += val.readValue(buf,index,4);
- userid = val.getValueAsLong();
- index +=2; // Ignore 0d 01
- int l = (unsigned char)buf[index++];
- index++;
- index += val.readValue(buf,index,l);
- string stringvalue = string(val.getValue(),l);
- this->newnick=stringvalue;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.h b/plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.h
deleted file mode 100644
index 6c3ae08e05..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvbuddychangednick.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __RECVBUDDYCHANGEDNICK_H
-#define __RECVBUDDYCHANGEDNICK_H
-
-//packet liest neue nicks ein
-
-#include "xfirerecvpacketcontent.h"
-#include <string>
-
-#define XFIRE_RECVBUDDYCHANGEDNICK 161
-
-namespace xfirelib {
- class RecvBuddyChangedNick : public XFireRecvPacketContent {
- public:
- virtual ~RecvBuddyChangedNick() { }
- int getPacketId() { return XFIRE_RECVBUDDYCHANGEDNICK; }
-
- XFirePacketContent *newPacket() { return new RecvBuddyChangedNick(); }
- void parseContent(char *buf, int length, int numberOfAtts);
-
- long userid;
-
- std::string newnick;
- void* entry; // handle eingefügt, damit ich schnell den buddy killen kann - dufte
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.cpp
deleted file mode 100644
index ee0925c724..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "recvdidpacket.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
-
- void RecvDidPacket::parseContent(char *buf, int length, int numberOfAtts) {
- XDEBUG(("This is the useles DID packet, its realy useless\n"));
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.h
deleted file mode 100644
index 92e09ff2f3..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvdidpacket.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __RECVDIDPACKET_H
-#define __RECVDIDPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-
-#define XFIRE_RECVDIDPACKET 144
-
-namespace xfirelib {
- class RecvDidPacket : public XFireRecvPacketContent {
- public:
- virtual ~RecvDidPacket() { }
- int getPacketId() { return XFIRE_RECVDIDPACKET; }
-
- XFirePacketContent *newPacket() { return new RecvDidPacket(); }
- void parseContent(char *buf, int length, int numberOfAtts);
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.cpp
deleted file mode 100644
index 635d69352a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "recvoldversionpacket.h"
-
-#include "variablevalue.h"
-#include "xdebug.h"
-#include <vector>
-#include <string>
-
-namespace xfirelib {
- class RecvOldVersionPacket;
-
- RecvOldVersionPacket::RecvOldVersionPacket() : XFireRecvPacketContent() {
- }
-
- void RecvOldVersionPacket::parseContent(char *buf, int length, int numberOfAtts) {
- //aktuelle version
- this->newversion=buf[12];
- }
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.h
deleted file mode 100644
index 46bc1d6ccc..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvoldversionpacket.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __RECVOLDVERSIONPACKET_H
-#define __RECVOLDVERSIONPACKET_H
-
-#define XFIRE_RECV_OLDVERSION_PACKET_ID 134
-
-#include "xfirerecvpacketcontent.h"
-
-namespace xfirelib {
-
- class RecvOldVersionPacket : public XFireRecvPacketContent {
- public:
- RecvOldVersionPacket();
- virtual ~RecvOldVersionPacket() { }
- XFirePacketContent *newPacket() { return new RecvOldVersionPacket; }
- int getPacketId() { return XFIRE_RECV_OLDVERSION_PACKET_ID; }
-
- void parseContent(char *buf, int length, int numberOfAtts);
-
- char newversion;
-
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.cpp
deleted file mode 100644
index faad9ce964..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "recvprefspacket.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
-
- void RecvPrefsPacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
-
- memset(&this->config,0,sizeof(xfire_prefitem)*XFIRE_RECVPREFSPACKET_MAXCONFIGS);
-
- XDEBUG("This packet gives us the preferences that you can set with the official client.\n");
-
- //skip 4c,09
- index+=2;
-
- //anzahl an konfigurationen welche abgestellt wurden
- int anz=buf[index];
- XDEBUG2("%d disabled Configs\n",anz);
-
- index++;
-
- for(int i=0;i<anz;i++)
- {
- int kid=buf[index];
- XDEBUG2("Konfigid: %d\n",kid);
-
- if(kid<XFIRE_RECVPREFSPACKET_MAXCONFIGS&&kid>0)
- {
- config[kid].wasset=1;
- for(int j=0;j<4;j++)
- {
- index++;
- config[kid].data[j]=buf[index];
- }
- }
-
- XDEBUG2("Konfigval: %d\n",buf[index]);
- index++;
- }
-
-
- }
-
- //prefences packet vorbereiten
- int PrefsPacket::getPacketContent(char *buf) {
- int index = 0;
-
- buf[index++]=5;
- buf[index++]='p';
- buf[index++]='r';
- buf[index++]='e';
- buf[index++]='f';
- buf[index++]='s';
-
- buf[index++]=9;
-
- //anzahlindex zwischenspeichern
- int anzindex=index;
- index++;
-
- int anz=0;
- for(int j=0;j<XFIRE_RECVPREFSPACKET_MAXCONFIGS;j++)
- {
- if(this->config[j].wasset==1)
- {
- buf[index++]=j;
- buf[index++]=this->config[j].data[0];
- buf[index++]=this->config[j].data[1];
- buf[index++]=this->config[j].data[2];
- buf[index++]=this->config[j].data[3];
- anz++;
- }
- }
-
- buf[anzindex]=anz;
-
- return index;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.h b/plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.h
deleted file mode 100644
index 24683f870b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvprefspacket.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __RECVPREFSPACKET_H
-#define __RECVPREFSPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include "xfiresendpacketcontent.h"
-
-#define XFIRE_RECVPREFSPACKET 141
-#define XFIRE_SENDPREFSPACKET 0xa
-
-#define XFIRE_RECVPREFSPACKET_MAXCONFIGS 32
-#define XFIRE_RECVPREFSPACKET_SUPPORTEDONFIGS 7
-
-//zum zwischenspeichern, wird später benötigt zum versenden
-struct xfire_prefitem {
- unsigned char data[4];
- unsigned char wasset;
-};
-
-//für die optionen
-struct xfireconfigitem {
- unsigned long id;
- char xfireconfigid;
- char dbentry[256];
-};
-
-namespace xfirelib {
-
- //packet mit den preferences
- class RecvPrefsPacket : public XFireRecvPacketContent {
- public:
- virtual ~RecvPrefsPacket() { }
- int getPacketId() { return XFIRE_RECVPREFSPACKET; }
-
- XFirePacketContent *newPacket() { return new RecvPrefsPacket(); }
- void parseContent(char *buf, int length, int numberOfAtts);
-
- //array vorbereiten, eventuell auf 32 bytes aufstocken, man weis ja nie was kommt
- xfire_prefitem config[XFIRE_RECVPREFSPACKET_MAXCONFIGS];
- };
-
- //packet zum setzen neuer preferences
- class PrefsPacket : public XFireSendPacketContent {
- public:
- virtual ~PrefsPacket() { }
-
- XFirePacketContent *newPacket() { return new PrefsPacket; }
- int getPacketId() { return XFIRE_SENDPREFSPACKET; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 1; }
- int getPacketSize() { return 1024; }
-
- xfire_prefitem config[XFIRE_RECVPREFSPACKET_MAXCONFIGS];
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.cpp
deleted file mode 100644
index 1e9b14d939..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "recvremovebuddypacket.h"
-#include "variablevalue.h"
-
-namespace xfirelib {
-
- void RecvRemoveBuddyPacket::parseContent(char *buf, int length, int numberOfAtts) {
- VariableValue val;
- int index = 0;
- index += val.readName(buf,index);
- index ++; // Ignore 02 ??
- index += val.readValue(buf,index,4);
- userid = val.getValueAsLong();
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.h b/plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.h
deleted file mode 100644
index 87c75c0012..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvremovebuddypacket.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __RECVREMOVEBUDDYPACKET_H
-#define __RECVREMOVEBUDDYPACKET_H
-
-#include "xfirerecvpacketcontent.h"
-#include <string>
-
-#define XFIRE_RECVREMOVEBUDDYPACKET 139
-
-namespace xfirelib {
- class RecvRemoveBuddyPacket : public XFireRecvPacketContent {
- public:
- virtual ~RecvRemoveBuddyPacket() { }
- int getPacketId() { return XFIRE_RECVREMOVEBUDDYPACKET; }
-
- XFirePacketContent *newPacket() { return new RecvRemoveBuddyPacket(); }
- void parseContent(char *buf, int length, int numberOfAtts);
-
- long userid;
-
- /**
- * I've added this attribute altough it is not part of the actual packet
- * because by the time the packet content reaches the client
- * application the user will no longer be in the BuddyList .. so no
- * way for the client application to know which buddy was just removed.
- * (it will be set by the BuddyList, not when parsing the packet)
- */
- std::string username;
- void* handle; // handle eingefügt, damit ich schnell den buddy killen kann - dufte
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.cpp
deleted file mode 100644
index 38387f424d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "recvstatusmessagepacket.h"
-
-#include "variablevalue.h"
-#include "xdebug.h"
-#include <vector>
-#include <string>
-
-namespace xfirelib {
- RecvStatusMessagePacket::RecvStatusMessagePacket() {
- centries=0;
- }
-
- void RecvStatusMessagePacket::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
- int numberOfIds = 0;
- VariableValue val;
- index += val.readName(buf,index);
- index ++; // ignore 03 ??
- index ++; // jump to counter
- numberOfIds = (unsigned char) buf[index];
- index ++; // Ignore 00 ??
- index ++;
- sids = new std::vector<char *>;
- for(int i = 0 ; i < numberOfIds ; i++) {
- index += val.readValue(buf,index,16);
- char *sid = new char[16];
- memcpy(sid,val.getValue(),16);
- sids->push_back(sid);
- }
-
- index += val.readName(buf,index);
- XDEBUG(( "valname %s\n", val.getName().c_str() ));
- index ++; // Ignore 04 ??
- msgs = new std::vector<std::string>;
- index = readStrings(msgs,buf,index);
-
- }
-
-
-int RecvStatusMessagePacket::readStrings(std::vector<std::string> *strings, char *buf, int index) {
- VariableValue friends;
- index += friends.readValue(buf,index);
- index ++; // Ignore 00
- int numberOfStrings = friends.getValueAsLong();
- XDEBUG3( "name: %s numberOfStrings: %d\n", friends.getName().c_str(), numberOfStrings );
- for(int i = 0 ; i < numberOfStrings ; i++) {
- int length = (unsigned char)buf[index++];
- index++;
- index += friends.readValue(buf,index,length);
- std::string stringvalue = std::string(friends.getValue(),length);
- strings->push_back(stringvalue);
- XDEBUG3( "String length: %2d : %s\n", length, stringvalue.c_str() );
- }
- return index;
- }
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.h
deleted file mode 100644
index 95e61fab12..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/recvstatusmessagepacket.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __RECVMESSAGEPACKET_H
-#define __RECVMESSAGEPACKET_H
-
-#define XFIRE_RECV_STATUSMESSAGE_PACKET_ID 154
-
-#include "xfirerecvpacketcontent.h"
-#include "buddylist.h"
-#include <string>
-#include <vector>
-
-namespace xfirelib {
-
- class RecvStatusMessagePacket : public XFireRecvPacketContent {
- public:
- RecvStatusMessagePacket();
- virtual ~RecvStatusMessagePacket() { }
- XFirePacketContent *newPacket() { return new RecvStatusMessagePacket; }
- int getPacketId() { return XFIRE_RECV_STATUSMESSAGE_PACKET_ID; }
-
- void parseContent(char *buf, int length, int numberOfAtts);
- char * getSid(int i){ return sids->at(i); }
-
- std::vector<char *> *sids;
- std::vector<std::string> *msgs;
- BuddyListEntry** entries;
- int centries;
-
- private:
- int readStrings(std::vector<std::string> *strings, char *buf, int index);
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/resource.h b/plugins/!NotAdopted/Xfire/xfiretest/resource.h
deleted file mode 100644
index 5d2cbd8a4e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/resource.h
+++ /dev/null
@@ -1,173 +0,0 @@
-#define IDC_APPLY 1331
-#define ID_OP 13
-#define IDI_TM 14
-#define IDC_STC1 1
-#define IDC_NICK 2
-#define IDC_GRP1 11
-#define IDC_NOAV 12
-#define IDC_NOMSG 3
-#define IDC_GRP2 3
-#define IDC_GRP3 4
-#define IDC_GRP4 17
-#define IDC_SETUPGAMES 10551
-#define IDC_STC2 1
-#define IDC_STC3 2
-#define IDC_STC4 5
-#define IDC_GAME 6
-#define IDC_GRP5 88
-#define IDC_STC6 77
-#define IDC_STC8 55
-#define IDC_STC5 7
-#define IDC_GIP 8
-#define IDC_STC7 9
-#define IDC_GPORT 10
-#define IDC_VNAME 11
-#define IDC_STC10 12
-#define IDC_STC11 13
-#define IDC_VIP 14
-#define IDC_STC13 15
-#define IDC_VPORT 16
-#define IDC_DNICK 18
-#define IDC_DUSERNAME 19
-#define IDC_GAMEICO 100
-#define IDC_VOICEICO 200
-#define IDC_COPYGAME 1001
-#define IDC_COPYVOICE 1002
-#define IDC_STATIC -1
-#define IDI_ONLINE 104
-#define IDI_OFFLINE 105
-#define IDI_AWAY 128
-#define IDC_NOIPPORT 1007
-#define IDC_ONINAFK 1008
-#define IDI_TEST 10
-#define IDC_CHKI 1072
-#define IDD_OPT 102
-#define IDD_UD 1000
-#define IDD_UD2 1001
-#define IDC_CBGICO 1013
-#define IDC_CBVICO 1015
-#define IDC_GROUPCONFIG 1000
-#define IDC_GROUPMAIN 1002
-#define IDC_KEEPALIVE 1011
-#define IDC_PASSWORD 1020
-#define IDC_LOGIN 1022
-#define IDC_SERVER 1171
-#define IDC_SERVERPORT 1174
-#define IDC_STATIC -1
-#define IDC_STATIC -1
-#define IDC_STC9 1001
-#define IDC_NOCLANGROUP 5001
-#define IDC_BTN1 5002
-#define IDC_GRP6 1202
-#define IDC_PROFILIMG 1601
-#define IDC_SCANALWAYS 1621
-#define IDC_STC12 1702
-#define IDC_STC14 1804
-#define IDC_CHKG 1071
-#define IDC_GAMEINFOLIST 1992
-#define IDC_GRP7 19901
-#define IDC_FINDFILES 1234
-#define IDD_GAMELIST 1009
-#define IDC_LST1 1001
-#define IDC_NEVERD 1004
-#define IDC_RBN2 1005
-#define IDC_MANUAL 1006
-#define IDC_GAMEPATH 1007
-#define IDC_BTN2 1009
-#define IDC_GSQP 1991
-#define IDC_BTN3 1044
-#define IDC_LAUNCH 3002
-#define IDC_STC15 3003
-#define IDC_NOCUSTOMAWAY 91231
-#define IDC_TREE 1921
-#define DM_REBUILD_TREE 87714
-#define IDC_GRP8 10241
-#define IDC_BLOCKUSER 61002
-#define IDC_REMUSER 61003
-#define IDC_INSTALLTYPE 871002
-#define IDC_INSTALLTYPES 1707
-#define IDC_STC16 31001
-#define IDC_PVER 91002
-#define IDD_PWDLG 991000
-#define IDC_STC17 41901
-#define IDC_PWSTRING 1902
-#define IDC_BTN4 12903
-#define IDC_LASTGAME 19901
-#define IDI_JOIN 8888
-#define IDI_COPYGAME 8889
-#define IDI_JOINV 8890
-#define IDI_COPYVOICE 8891
-#define IDC_STC18 1001
-#define IDC_PWNICK 9502
-#define IDC_OPTIONSTAB 9503
-#define IDD_OPTLOGIN 9504
-#define IDD_OPTFEAT 9505
-#define IDD_OPTFEAT2 9506
-#define IDC_URLNEWACC 9507
-#define IDC_FILESSHOULDBE 9508
-#define IDC_PIP 9509
-#define IDC_PPORT 9510
-#define IDC_USEPROXY 9511
-#define IDD_OPTFEAT3 9512
-#define IDC_ENABLESTSMSG 9511
-#define IDC_STATUSMSG 9512
-#define IDD_SETNICKNAME 9513
-#define IDC_NICKNAME 9514
-#define IDC_CHGSTATUS 9515
-#define IDD_SEARCHING 9516
-#define IDC_SEARCHINGLABL 9517
-#define IDC_CURRENTGAME 9518
-#define IDC_LOSTPW 9519
-#define IDC_CLANGROUP 9520
-#define IDC_SCANUPDATECB 9521
-#define IDC_LGAMELIST 9522
-#define IDD_OPTFEAT4 9523
-#define IDC_DONTDETECT 9524
-#define IDC_GAMENAME 9525
-#define IDC_NOSTATUSMSG 9526
-#define IDC_TEXTSTATUS 9527
-#define IDC_KONFIG_1 9528
-#define IDC_KONFIG_2 9529
-#define IDC_KONFIG_3 9530
-#define IDC_KONFIG_4 9531
-#define IDC_KONFIG_5 9532
-#define IDC_KONFIG_6 9533
-#define IDC_KONFIG_7 9534
-#define IDC_FOFGROUP 9535
-#define IDC_WEBC 9536
-#define IDD_UPDATE 9537
-#define IDC_UPDATEGAMES 9538
-#define IDD_ADDGAME 9539
-#define IDC_ADDGAME 9540
-#define IDC_GAMELIST 9541
-#define IDC_PROGRESS 9542
-#define IDC_SEARCH 9543
-#define IDC_REMOVE 9544
-#define IDC_NOTINSTARTMENU 9545
-#define IDC_MANADDED 9546
-#define IDC_DNDFIRST 9547
-#define IDC_EXTRAPARAMS 9548
-#define IDD_ADDGAMEMAIN 9549
-#define IDD_ADDGAME2 9550
-#define IDC_ADD_NAME 9551
-#define IDC_ADD_DETECTEXE 9552
-#define IDC_ADD_BROWSEDETECT 9553
-#define IDC_ADD_LAUNCHEREXE 9554
-#define IDC_ADD_BROWSELAUNCHER 9555
-#define IDC_GAMEIDHELP 9556
-#define IDC_ADD_ID 9557
-#define IDC_ADD_SENDID 9558
-#define IDC_SENDIDHELP 9559
-#define IDC_ADD_STATUSMSG 9560
-#define IDC_EDITGAME 9561
-#define IDC_CREATETXTLIST 9562
-#define IDC_TESTBUTTON 9563
-#define IDC_CUSTOM 9564
-#define IDC_ADD_CUSTOMPARAMS 9565
-#define WM_SETPROFIMAGE WM_USER+10
-#define WM_FILLGAMELIST WM_USER+20
-#define WM_EDITGAMEDLG WM_USER+30
-
-/*
- end of resource.h
-*/ \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/resource.rc b/plugins/!NotAdopted/Xfire/xfiretest/resource.rc
deleted file mode 100644
index 10825a1f15..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/resource.rc
+++ /dev/null
@@ -1,300 +0,0 @@
-#define IDC_STC23 1002
-#define IDC_EDT1 1006
-#define IDC_GRP9 1002
-#define IDC_CHK1 1001
-#define IDC_EDT2 1004
-#define IDC_SCANUPDATE 1003
-#define IDC_STC40 1010
-#define IDC_STC41 1011
-#define IDC_EDT3 1009
-#define IDC_EDT4 1006
-#define IDC_STC22 1001
-#define IDC_GRP12 1009
-#define IDC_GRP13 1004
-#define IDC_GRP14 1003
-#define IDC_STC25 1001
-#define IDC_STC26 1002
-#define IDC_STC33 1004
-#define IDC_STC9 1001
-#define IDC_STC19 1002
-#define IDC_STC20 1003
-#define IDC_STC21 1004
-#define IDC_STC24 1005
-#define IDC_STC28 1002
-#define IDC_STC29 1003
-#define IDC_STC30 1005
-#define IDC_STC31 1001
-#define IDC_STC32 1004
-#define IDC_GRP10 1001
-#define IDC_STC27 1002
-#define IDC_GRP11 1005
-#define IDC_STC15 1003
-#define IDC_STC34 1001
-#define IDC_IMG2 1002
-#define IDC_STC35 1003
-#define IDC_STC14 1001
-#define IDC_STC36 1001
-#define IDC_STC37 1003
-#define IDC_STC38 1005
-#define IDC_STC39 1008
-#define IDC_STC42 1002
-#define IDC_STC43 1004
-#define IDC_STC44 1006
-#define IDC_IMG1 1002
-
-#include "resource.h"
-#include "windows.h"
-
-ID_OP ICON DISCARDABLE "x_fire16x16.ico"
-IDI_TM ICON DISCARDABLE "d_xfire.ico"
-IDI_ONLINE ICON DISCARDABLE "xfire online.ico"
-IDI_OFFLINE ICON DISCARDABLE "xfire offline.ico"
-IDI_AWAY ICON DISCARDABLE "xfire away.ico"
-
-IDD_OPT DIALOGEX 0,0,318,252
-FONT 8,"MS Shell Dlg",0,0,1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_OPTIONSTAB,"SysTabControl32",WS_VISIBLE|WS_TABSTOP,1,1,316,250
-END
-
-IDD_OPTLOGIN DIALOGEX 0,0,304,235
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_LOGIN,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,66,12,100,13,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PASSWORD,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_PASSWORD,66,31,100,13,WS_EX_CLIENTEDGE
- CONTROL "Password:",IDC_STATIC,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,8,33,56,9
- CONTROL "Loginname:",IDC_STATIC,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,16,14,48,9
- CONTROL "XFire",IDC_GROUPMAIN,"Button",WS_CHILD|WS_VISIBLE|WS_GROUP|BS_GROUPBOX,2,1,300,46
- CONTROL "Nick:",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE|WS_GROUP|SS_RIGHT,8,88,58,9
- CONTROL "",IDC_NICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,68,86,100,13,WS_EX_CLIENTEDGE
- CONTROL "Current Protocolversion:",IDC_STC16,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT|0x00000800,178,217,94,11
- CONTROL "",IDC_PVER,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY,274,217,24,11,WS_EX_CLIENTEDGE
- CONTROL "",IDC_LASTGAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL|ES_CENTER,2,51,298,11
- CONTROL "Note: You can only change these settings, if you are connected to Xfire.",IDC_STC22,"Static",WS_CHILD|WS_VISIBLE,6,73,290,11
- CONTROL "Create a new Xfire account on website",IDC_URLNEWACC,"Hyperlink",WS_CHILD|WS_VISIBLE|WS_TABSTOP,170,14,126,9
- CONTROL "Lost Password?",IDC_LOSTPW,"Hyperlink",WS_CHILD|WS_VISIBLE|WS_TABSTOP,170,33,124,9
- CONTROL "Account options",IDC_GRP12,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,62,300,170
- CONTROL "Show my friends",IDC_KONFIG_1,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,114,282,9
- CONTROL "Game Status",IDC_GRP13,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,6,103,292,57
- CONTROL "Show on my profile and miniprofile",IDC_KONFIG_2,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,125,282,9
- CONTROL "Show my game server data",IDC_KONFIG_3,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,136,282,9
- CONTROL "Other Activity",IDC_GRP14,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,6,162,292,35
- CONTROL "Show my voice chat server to my friends",IDC_KONFIG_5,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,173,282,9
- CONTROL "Show people when I type to them",IDC_KONFIG_6,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,184,282,9
- CONTROL "Show nicknames when available",IDC_KONFIG_4,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,170,88,128,9
- CONTROL "Show friends of my friends",IDC_KONFIG_7,"Button",WS_CHILD|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|BS_AUTOCHECKBOX,10,147,282,9
-END
-
-IDD_OPTFEAT DIALOGEX 0,0,304,235
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Options",IDC_GRP1,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,1,300,133
- CONTROL "More options",IDC_GRP5,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,136,300,98
- CONTROL "Gameicon:",IDC_STC6,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,4,203,144,11
- CONTROL "",IDC_CBGICO,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,203,106,301
- CONTROL "Voiceicon:",IDC_STC8,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,4,217,144,11
- CONTROL "",IDC_CBVICO,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,217,106,301
- CONTROL "Display Error and Infomessage:",IDC_STC12,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,190,144,9
- CONTROL "",IDC_NOMSG,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,188,106,61
- CONTROL "Tree1",IDC_TREE,"SysTreeView32",WS_VISIBLE|WS_BORDER|WS_TABSTOP|TVS_FULLROWSELECT|TVS_SHOWSELALWAYS|TVS_DISABLEDRAGDROP|TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS,6,11,292,120
- CONTROL "Main group for clan groups:",IDC_STC25,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,175,144,9
- CONTROL "",IDC_CLANGROUP,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,173,106,61
- CONTROL "Automatically scan for games:",IDC_STC26,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,145,144,9
- CONTROL "",IDC_SCANUPDATECB,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,144,106,61
- CONTROL "",IDC_FOFGROUP,"ComboBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,152,158,106,61
- CONTROL "Main group for Friends of Friends:",IDC_STC33,"Static",WS_CHILD|WS_VISIBLE|SS_RIGHT,4,160,144,9
-END
-
-IDD_OPTFEAT2 DIALOGEX 0,0,304,242
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Files",IDC_GRP6,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,94,300,102
- CONTROL "xfire_games.ini",IDC_CHKG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,105,80,9
- CONTROL "icons.dll",IDC_CHKI,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,8,136,80,9
- CONTROL "Blocked User List",IDC_GRP8,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,1,300,91
- CONTROL "",IDC_BLOCKUSER,"ListBox",WS_CHILD|WS_VISIBLE|WS_TABSTOP|LBS_NOINTEGRALHEIGHT|LBS_HASSTRINGS|LBS_NOTIFY,6,11,128,78,WS_EX_CLIENTEDGE
- CONTROL "",IDC_REMUSER,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|0x00000040,138,42,16,15
- CONTROL "This list contains all your blocked Xfire users. You can remove one, if you wanna allow him to send you a friend request.",IDC_STC9,"Static",WS_CHILD|WS_VISIBLE,160,12,136,74
- CONTROL "You can simply block someone, if you right click on his friend request in clist and choose Block User ...",IDC_STC19,"Static",WS_CHILD|WS_VISIBLE,160,48,130,39
- CONTROL "This file is used for the game search, game detection and gameid resolving. It contains all xfire supported games.",IDC_STC20,"Static",WS_CHILD|WS_VISIBLE,92,105,206,28
- CONTROL "This file contains all original game icons. You can also activate the option for icon downloading, if you dont have it.",IDC_STC21,"Static",WS_CHILD|WS_VISIBLE,92,136,206,26
- CONTROL "Be sure you put these files in following folder:",IDC_STC24,"Static",WS_CHILD|WS_VISIBLE,8,168,290,9
- CONTROL "",IDC_FILESSHOULDBE,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY,8,179,290,13,WS_EX_CLIENTEDGE
-END
-
-IDD_OPTFEAT3 DIALOGEX 0,0,304,235
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Status Message",IDC_GRP1,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,1,300,214
- CONTROL "Enable",IDC_ENABLESTSMSG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,10,14,132,9
- CONTROL "With this feature, following status message will be set on your other protocol plugins, if you are ingame. So your other buddy's can also see what you play. It will also change the status to occupied, if this option is enabled.",IDC_STC28,"Static",WS_CHILD|WS_VISIBLE,10,38,286,24
- CONTROL "Following Variables are available: %myxfiregame%, %myxfirevoice%, %myxfireserverip%, %myxfirevoiceip%",IDC_STC29,"Static",WS_CHILD|WS_VISIBLE,10,96,286,19
- CONTROL "",IDC_STATUSMSG,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_MULTILINE,8,131,286,70,WS_EX_CLIENTEDGE
- CONTROL "Status message:",IDC_STC30,"Static",WS_CHILD|WS_VISIBLE,10,118,94,9
- CONTROL "",IDC_STC31,"Static",WS_CHILD|WS_VISIBLE,6,203,134,9
- CONTROL "Change the status to occupied or dnd",IDC_CHGSTATUS,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,14,154,9
- CONTROL "The status message and status will be reset, if you close the game.",IDC_STC32,"Static",WS_CHILD|WS_VISIBLE,10,72,286,20
- CONTROL "Prefer dnd when it is available",IDC_DNDFIRST,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,25,154,9
-END
-
-IDD_OPTFEAT4 DIALOGEX 0,0,304,235
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "",IDC_LGAMELIST,"ListBox",WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LBS_NOINTEGRALHEIGHT|LBS_HASSTRINGS|LBS_SORT|LBS_NOTIFY,6,11,128,200,WS_EX_CLIENTEDGE
- CONTROL "Games",IDC_GRP10,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,0,300,233
- CONTROL "Game:",IDC_STC27,"Static",WS_CHILD|WS_VISIBLE,162,11,136,9
- CONTROL "",IDC_GAMENAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,162,20,136,11
- CONTROL "Dont detect this game as running",IDC_DONTDETECT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,55,152,9
- CONTROL "",IDC_GAMEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,138,11,22,19
- CONTROL "Options",IDC_GRP11,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,138,40,160,187
- CONTROL "Apply",IDC_APPLY,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,206,72,17
- CONTROL "Dont set status message for other protocols",IDC_NOSTATUSMSG,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,68,152,9
- CONTROL "",IDC_TEXTSTATUS,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL|ES_CENTER,142,192,152,11
- CONTROL "Add new game",IDC_ADDGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,6,212,66,15
- CONTROL "Remove",IDC_REMOVE,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,74,212,60,15
- CONTROL "Dont show in start menu",IDC_NOTINSTARTMENU,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,142,81,152,9
- CONTROL "(manual added)",IDC_MANADDED,"Static",NOT WS_VISIBLE|WS_CHILD,162,31,134,9
- CONTROL "Extra Command Line Parameters:",IDC_STC15,"Static",WS_CHILD|WS_VISIBLE,142,99,150,9
- CONTROL "",IDC_EXTRAPARAMS,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,142,110,152,13,WS_EX_CLIENTEDGE
- CONTROL "Edit ...",IDC_EDITGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,222,206,72,17
-END
-
-IDD_UD DIALOGEX 0,0,223,159
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Username:",IDC_STC2,"Static",WS_CHILD|WS_VISIBLE,8,18,36,9
- CONTROL "Nick:",IDC_STC3,"Static",WS_CHILD|WS_VISIBLE,8,9,32,9
- CONTROL "Game",IDC_GRP2,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,44,220,32
- CONTROL "Voicechat",IDC_GRP3,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,77,220,33
- CONTROL "Name:",IDC_STC4,"Static",WS_CHILD|WS_VISIBLE,30,53,36,9
- CONTROL "Unreal Tournament 2004",IDC_GAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,53,134,9
- CONTROL "IP:",IDC_STC5,"Static",WS_CHILD|WS_VISIBLE,30,64,18,9
- CONTROL "255.255.255.255",IDC_GIP,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,64,54,9
- CONTROL "Port:",IDC_STC7,"Static",WS_CHILD|WS_VISIBLE,134,64,16,9
- CONTROL "27770",IDC_GPORT,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,150,64,70,9
- CONTROL "Unreal Tournament 2004",IDC_VNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,88,132,9
- CONTROL "Name:",IDC_STC10,"Static",WS_CHILD|WS_VISIBLE,30,88,22,9
- CONTROL "IP:",IDC_STC11,"Static",WS_CHILD|WS_VISIBLE,30,99,18,9
- CONTROL "255.255.255.255",IDC_VIP,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,54,99,54,9
- CONTROL "Port:",IDC_STC13,"Static",WS_CHILD|WS_VISIBLE,134,99,16,9
- CONTROL "27770",IDC_VPORT,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,150,99,70,9
- CONTROL "Userdetails",IDC_GRP4,"Button",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,2,0,112,44
- CONTROL "dufte",IDC_DNICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,46,9,64,9
- CONTROL "dufte",IDC_DUSERNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_READONLY|ES_AUTOHSCROLL,46,18,66,9
- CONTROL "",IDC_GAMEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,6,53,22,19
- CONTROL "",IDC_VOICEICO,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,6,88,22,19
- CONTROL "Copy",IDC_COPYGAME,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,190,49,30,11
- CONTROL "Copy",IDC_COPYVOICE,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,190,83,30,11
- CONTROL "",IDC_PROFILIMG,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_BITMAP,0,112,222,44
- CONTROL "",IDC_GAMEINFOLIST,"SysListView32",WS_CHILD|WS_VISIBLE|LVS_REPORT,116,1,106,43,WS_EX_CLIENTEDGE
-END
-
-IDD_PWDLG DIALOGEX 6,5,204,38
-CAPTION "Enter Password"
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-EXSTYLE WS_EX_TOPMOST
-BEGIN
- CONTROL "Password:",IDC_STC17,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,0,12,34,11
- CONTROL "",IDC_PWNICK,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,38,0,166,11,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PWSTRING,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,38,12,166,11,WS_EX_CLIENTEDGE
- CONTROL "Join",IDC_BTN4,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,144,25,60,11
- CONTROL "Nick:",IDC_STC18,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_RIGHT,0,0,34,11
-END
-
-IDD_SETNICKNAME DIALOGEX 0,0,187,42
-CAPTION "Set Nickname"
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-BEGIN
- CONTROL "",IDC_NICKNAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,5,5,177,12,WS_EX_CLIENTEDGE
- CONTROL "OK",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,36,23,50,14
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,102,23,50,14
-END
-
-IDD_UPDATE DIALOGEX 0,0,188,107
-CAPTION "New xfire_games.ini"
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-BEGIN
- CONTROL "There is a new XFire Gamelist online, do you want to update now?",IDC_STC34,"Static",WS_CHILD|WS_VISIBLE,30,5,154,19
- CONTROL 14,IDC_IMG2,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,4,3,22,19
- CONTROL "New supported Games:",IDC_STC35,"Static",WS_CHILD|WS_VISIBLE,6,29,124,9
- CONTROL "Update",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,36,88,50,15
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,102,88,50,15
- CONTROL "",IDC_UPDATEGAMES,"Edit",WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|ES_READONLY|ES_AUTOVSCROLL|ES_MULTILINE,6,40,178,44,WS_EX_CLIENTEDGE
-END
-
-IDD_ADDGAME DIALOGEX 0,0,196,205
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Add Game",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,4,186,50,15
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,186,50,15
- CONTROL "",IDC_GAMELIST,"ListBox",WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LBS_NOINTEGRALHEIGHT|LBS_HASSTRINGS|LBS_SORT|LBS_NOTIFY,4,33,186,148,WS_EX_CLIENTEDGE
- CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_CHILD|WS_VISIBLE,6,96,184,13
- CONTROL "",IDC_SEARCH,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,4,14,186,13,WS_EX_CLIENTEDGE
- CONTROL "Search:",IDC_STC14,"Static",WS_CHILD|WS_VISIBLE,4,3,186,9
- CONTROL "Custom ...",IDC_CUSTOM,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,56,186,50,15
-END
-
-IDD_ADDGAME2 DIALOGEX 0,0,196,205
-FONT 8,"MS Sans Serif",0,0,1
-STYLE WS_CHILD|WS_VISIBLE|DS_FIXEDSYS|DS_SETFONT
-EXSTYLE WS_EX_CONTROLPARENT
-BEGIN
- CONTROL "Add Game",IDOK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,4,186,50,15
- CONTROL "Cancel",IDCANCEL,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,186,50,15
- CONTROL "Game name:",IDC_STC36,"Static",WS_CHILD|WS_VISIBLE,4,3,188,9
- CONTROL "",IDC_ADD_NAME,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,4,14,186,13,WS_EX_CLIENTEDGE
- CONTROL "",IDC_ADD_DETECTEXE,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,4,42,136,13,WS_EX_CLIENTEDGE
- CONTROL "Game exe:",IDC_STC37,"Static",WS_CHILD|WS_VISIBLE,4,31,188,9
- CONTROL "Browse ...",IDC_ADD_BROWSEDETECT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,144,42,48,14
- CONTROL "Launcher exe (optional):",IDC_STC38,"Static",WS_CHILD|WS_VISIBLE,4,59,188,9
- CONTROL "",IDC_ADD_LAUNCHEREXE,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,4,70,136,13,WS_EX_CLIENTEDGE
- CONTROL "Browse ...",IDC_ADD_BROWSELAUNCHER,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,144,70,48,14
- CONTROL "Game id:",IDC_STC39,"Static",WS_CHILD|WS_VISIBLE,4,86,52,9
- CONTROL "",IDC_ADD_ID,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,4,97,36,13,WS_EX_CLIENTEDGE
- CONTROL "?",IDC_GAMEIDHELP,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,42,97,14,13
- CONTROL "Send game id:",IDC_STC42,"Static",WS_CHILD|WS_VISIBLE,60,86,50,9
- CONTROL "",IDC_ADD_SENDID,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,60,97,36,13,WS_EX_CLIENTEDGE
- CONTROL "?",IDC_SENDIDHELP,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,98,97,14,13
- CONTROL "Statusmessage for Xfire, if this game will be started:",IDC_STC43,"Static",WS_CHILD|WS_VISIBLE,4,114,188,9
- CONTROL "",IDC_ADD_STATUSMSG,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_MULTILINE,4,125,188,56,WS_EX_CLIENTEDGE
- CONTROL "Parameter:",IDC_STC44,"Static",WS_CHILD|WS_VISIBLE,116,86,74,9
- CONTROL "",IDC_ADD_CUSTOMPARAMS,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL,116,97,76,13,WS_EX_CLIENTEDGE
-END
-
-IDD_ADDGAMEMAIN DIALOGEX 0,0,199,219
-CAPTION "Add a new game"
-FONT 8,"MS Shell Dlg",0,0,1
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_MODALFRAME|DS_SETFONT|DS_FIXEDSYS
-BEGIN
- CONTROL "",IDC_OPTIONSTAB,"SysTabControl32",WS_VISIBLE|WS_TABSTOP,1,1,198,218
-END
-
-IDD_SEARCHING DIALOGEX 6,5,198,41
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-STYLE WS_POPUP|WS_VISIBLE|WS_BORDER|DS_CENTER
-EXSTYLE WS_EX_TOPMOST
-BEGIN
- CONTROL "Searching games ...",IDC_SEARCHINGLABL,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_CENTER,0,0,196,41
- CONTROL 14,IDC_IMG1,"Static",WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE|SS_ICON,2,1,46,37
- CONTROL "",IDC_CURRENTGAME,"Static",WS_CHILD|WS_VISIBLE,44,29,150,9
-END
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.cpp b/plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.cpp
deleted file mode 100644
index 716d88438c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "searchbuddy.h"
-#include <string.h>
-#include <iostream>
-
-namespace xfirelib {
- using namespace std;
-
- int SearchBuddy::getPacketContent(char *packet) {
- int index = 0;
-
- // name
- VariableValue val;
- val.setName( "name" );
- index += val.writeName( packet, index );
-
- packet[index++] = 0x01;
-
- val.setValue((char*)searchstring.c_str(),searchstring.size());
- packet[index++] = searchstring.size()%256;
- packet[index++] = (int)searchstring.size()/256;
- index += val.writeValue(packet,index);
-
- val.setName( "fname" );
- index += val.writeName( packet, index );
-
- packet[index++] = 0x01;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
-
- val.setName( "lname" );
- index += val.writeName( packet, index );
-
- packet[index++] = 0x01;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
-
- val.setName( "email" );
- index += val.writeName( packet, index );
-
- packet[index++] = 0x01;
- packet[index++] = 0x00;
- packet[index++] = 0x00;
-
- length = index;
- return index;
- }
-
- int SearchBuddy::getPacketAttributeCount() {
- return 4;
- }
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.h b/plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.h
deleted file mode 100644
index 79c474d06c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/searchbuddy.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//packet, welches bei der buddysuche versendet wird, um neue freund zu finden
-
-#ifndef __SEARCHBUDDY_H
-#define __SEARCHBUDDY_H
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-
-#include <string>
-
-namespace xfirelib {
-
- class SearchBuddy : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new SearchBuddy(); }
-
- int getPacketId() { return 0xC; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 1000; };
- void parseContent(char *buf, int length, int numberOfAtts) { };
- void searchfor(std::string s) { searchstring=s; }
-
- private:
- int length;
- std::string searchstring;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/searching4games.cpp b/plugins/!NotAdopted/Xfire/xfiretest/searching4games.cpp
deleted file mode 100644
index 4cc8eed062..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/searching4games.cpp
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-#include "stdafx.h"
-#include "baseProtocol.h"
-#include "Xfire_gamelist.h"
-
-#include <string>
-using std::string;
-
-extern int foundgames;
-extern HANDLE XFireAvatarFolder;
-extern HANDLE XFireWorkingFolder;
-extern int StartGame(WPARAM wParam,LPARAM lParam,LPARAM fParam);
-extern Xfire_gamelist xgamelist;
-
-//versucht die * in den pfaden der ini mit dem korrekten eintrag zu ersetzen
-BOOL CheckPath(char*ppath,char*pathwildcard=NULL)
-{
- char* pos=0;
- char* pos2=0;
-
- pos = strchr(ppath,'*');
- if(pos)
- {
- HANDLE fHandle;
- WIN32_FIND_DATA wfd;
- BOOL weiter=TRUE;
-
- if(pathwildcard)
- {
- strcpy_s(pathwildcard,XFIRE_MAX_STATIC_STRING_LEN,ppath);
- }
-
- pos++;
- *pos=0;
- pos++;
-
- //versuch die exe zu finden
- fHandle=FindFirstFile(ppath,&wfd); // . skippen
- FindNextFile(fHandle,&wfd); // .. auch skippen
-
- while ((FindNextFile(fHandle,&wfd)&&weiter==TRUE)) // erstes file
- {
- if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) // nur verzeichnisse sind interessant
- {
- char temp[XFIRE_MAX_STATIC_STRING_LEN];
-
- strcpy(temp,ppath);
- *(temp+strlen(temp)-1)=0;
- strcat(temp,wfd.cFileName);
- strcat(temp,"\\");
- strcat(temp,pos);
-
- if(GetFileAttributes(temp)!=0xFFFFFFFF) { //exe vorhanden???? unt hint?
- //gefundenes in path kopieren
- FindClose(fHandle);
- strcpy(ppath,temp);
- return TRUE;
- }
- }
- }
- FindClose(fHandle);
- }
- else
- {
- if(GetFileAttributes(ppath)!=0xFFFFFFFF) { //exe vorhanden???? unt hint?
- //gefundenes in path kopieren
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-BOOL CALLBACK DlgSearchDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-void ShowSearchDialog(LPVOID lparam)
-{
- HWND* hwnd=(HWND*)lparam;
- HWND myhwnd=CreateDialog(hinstance,MAKEINTRESOURCE(IDD_SEARCHING),NULL,DlgSearchDialogProc);
-
- if(myhwnd==NULL)
- return;
-
- *hwnd=myhwnd;
-
- ShowWindow(myhwnd,SW_SHOW);
-
- //nachrichten schleife
- MSG msg;
- while (GetMessage(&msg,myhwnd,0,0))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-}
-
-void Scan4Games( LPVOID lparam )
-{
- int i=2;
- unsigned int i2=1;
- BOOL split=FALSE;
- int notfound=0;
- char* pos=0;
- char* pos2=0;
- char *cutforlaunch = 0;
- char temp[10]="";
- char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
- char ret[XFIRE_MAX_STATIC_STRING_LEN]="";
- char gamename[XFIRE_MAX_STATIC_STRING_LEN]="";
- char ret2[XFIRE_MAX_STATIC_STRING_LEN]="";
- char gamelist[XFIRE_MAX_STATIC_STRING_LEN]="";
- BOOL multiexe=FALSE;
- BOOL somethingfound=TRUE;
- int i3=0;
- CLISTMENUITEM mi = { 0 };
- DWORD gpps=1;
- DWORD last_gpps=0;
- static BOOL searching=FALSE;
-
- //ich suche schon,also raushier
- if(searching)
- {
- MSGBOX("Game searching is already running!");
- return;
- }
- if(xgamelist.Ingame())
- {
- MSGBOX("A game is currently running, please close the game.");
- return;
- }
-
- //gamelist blocken, damit nur 1 thread es ausführt/nutzt
- xgamelist.Block(TRUE);
-
- searching=TRUE;
-
- //säubert die gameliste für eine neuauslesung
- xgamelist.clearGamelist();
-
- //prüfe ob schon gescannt wurde, dann das aus der db nehmen, beschleunigt den start
- foundgames=DBGetContactSettingWord(NULL, protocolname, "foundgames",-1);
-
- //um bei einer neuen version einen rescan zuforcen, bei bestimmten wert found auf 0 resetten
- if(DBGetContactSettingWord(NULL, protocolname, "scanver",0)!=XFIRE_SCAN_VAL)
- foundgames=-1;
-
- BOOL loadgamesfromdb=FALSE;
- if(DBGetContactSettingByte(NULL,protocolname,"scanalways",0)==0)
- loadgamesfromdb=TRUE;
- else
- {
- if(DBGetContactSettingByte(NULL,protocolname,"scanalways",0)==2)
- {
- time_t zeit;
- struct tm *t;
- time(&zeit);
- t = localtime(&zeit);
-
- if(t!=NULL)
- {
- if(t->tm_yday!=DBGetContactSettingWord(NULL,protocolname,"scanalways_t",0))
- {
- DBWriteContactSettingWord(NULL,protocolname,"scanalways_t",t->tm_yday);
- }
- else
- loadgamesfromdb=TRUE;
- }
- }
- }
-
- //spiele von db laden
- if(loadgamesfromdb)
- if(foundgames>0)
- {
- //spieliste einlesen
- xgamelist.readGamelist(foundgames);
- //menüpunkte anlegen
- xgamelist.createStartmenu();
-
- //gamelist unblocken
- xgamelist.Block(FALSE);
-
- searching=FALSE;
- return;
- }
- else if(foundgames==0)
- {
- searching=FALSE;
- //dummymenü punkt entfernen
- //CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )dummymenu, 0 );
-
- //gamelist unblocken
- xgamelist.Block(FALSE);
-
- return;
- }
- else
- foundgames=0;
- else
- foundgames=0;
-
- HWND hwnd=NULL;
-
- //suche dialog anzeigen
- if(!DBGetContactSettingByte(NULL,protocolname,"dontdissstatus",0))
- {
- mir_forkthread(ShowSearchDialog,&hwnd);
- }
-
- FoldersGetCustomPath( XFireWorkingFolder, inipath, 1024, 'W' );
- strcat(inipath,"\\");
- strcat(inipath,"xfire_games.ini");
-
- //erstmal db säubern
- xgamelist.clearDatabase();
-
- //maximal 200 notfounds, um die nicht belegten id's zu überspringen
- while(notfound<200)
- {
- //2 gameids?
- if(split)
- sprintf(temp,"%i_%i",i,i2);
- else
- sprintf(temp,"%i",i);
-
- //MessageBoxA(0,temp,temp,0);
-
- //letztes ergeniss sichern
- last_gpps=gpps;
-
- //las ma mal suchen ....
- gpps=xfire_GetPrivateProfileString(temp, "LongName", "", gamename, 255, inipath);
-
- char entrytype[100]="";
- if(gpps!=NULL) xfire_GetPrivateProfileString(temp, "SoftwareType", "", entrytype, 100, inipath);
-
- //kein eintrag? voicechat? musiapplicationen? schon in der gameliste?
- if(gpps!=NULL && strcmp(entrytype,"Music")!=0 && strcmp(entrytype,"VoiceChat")!=0 && !xgamelist.Gameinlist(i)) //was gefunden und noch nicht eintragen?
- {
- BOOL MatchExe=FALSE;
- //MatchExe Games in der automatischen Suche skippen
- if(xfire_GetPrivateProfileString(temp, "MatchExe", "", ret, 255, inipath))
- MatchExe=TRUE;
-
- //Registryschlüssel auslesen und pfad auf exe prüfen
- xfire_GetPrivateProfileString(temp, "LauncherDirKey", "", ret, 255, inipath);
- strcpy(ret2,ret);
-
- //ersten part des registry schlüssel raustrennen
- pos=strchr(ret2,'\\');
- if(!MatchExe && pos!=0)
- {
- HKEY hkey,hsubk;
-
- *pos=0; //string trennen
- pos++;
-
- pos2=strrchr(pos,'\\'); //key trennen
- if(pos!=0)
- {
- *pos2=0;
- pos2++;
-
- //HKEY festlegen
- switch(*(ret2+6))
- {
- case 'L':
- hkey = HKEY_CLASSES_ROOT;
- break;
- case 'U':
- hkey = HKEY_CURRENT_USER;
- break;
- case 'O':
- hkey = HKEY_LOCAL_MACHINE;
- break;
- default:
- hkey = NULL;
- }
- }
- else
- hkey = NULL;
-
- if(hkey) //nur wenn der key erkannt wurde
- {
- if(RegOpenKeyA(hkey,pos,&hsubk) == ERROR_SUCCESS) //key versuchen zu "öffnen"
- {
- char path[XFIRE_MAX_STATIC_STRING_LEN]="";
- char path_r[XFIRE_MAX_STATIC_STRING_LEN]="";
- DWORD size=sizeof(path);
-
- //key lesen
- if(RegQueryValueEx(hsubk,pos2,NULL,NULL,(LPBYTE)path,&size)== ERROR_SUCCESS)
- {
- //zusätzlichen pfad anhängen
- if(xfire_GetPrivateProfileString(temp, "LauncherDirAppend", "", ret2, 255, inipath))
- {
- if(*(path+strlen(path)-1)=='\\'&&*(ret2)=='\\')
- strcat(path,(ret2+1));
- else
- strcat(path,ret2);
- }
-
- if(xfire_GetPrivateProfileString(temp, "LauncherDirTruncAt", "", ret2, 255, inipath))
- {
- //mögliches erstes anführungszeichen entfernen
- if(*(path)=='"')
- {
- pos2=path;
- pos2++;
-
- strcpy(path,pos2);
- }
-
- //mögliche weitere anführungszeichen entfernen
- pos=strchr(path,'"');
- if(pos!=0)
- *pos=0;
-
- if(*(path+strlen(path)-1)!='\\')
- *(path+strlen(path)-strlen(ret2))=0;
- }
-
- if(*(path+strlen(path)-1)!='\\')
- strcat(path,"\\");
-
-
- //dateiname auslesen
- if(xfire_GetPrivateProfileString(temp, "InstallHint", "", ret2, 255, inipath))
- {
- char pathtemp[XFIRE_MAX_STATIC_STRING_LEN];
- strcpy(pathtemp,path);
- strcat(pathtemp,ret2);
-
- if(CheckPath(pathtemp))
- {
- if(xfire_GetPrivateProfileString(temp, "DetectExe", "", ret, 255, inipath))
- {
- cutforlaunch=path+strlen(path);
- strcpy(pathtemp,path);
-
- //wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
- if(ret[0]=='\\')
- {
- strcat(pathtemp,(char*)&ret[1]);
- }
- else
- {
- strcat(pathtemp,ret);
- }
-
- if(CheckPath(pathtemp))
- {
- strcpy(path, pathtemp);
- }
- else
- {
- *(path)=0;
- }
- }
- else if(xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
- {
- cutforlaunch=path+strlen(path);
- strcat(path,ret2);
- }
- }
- else
- {
- *(path)=0;
- }
- }
- else if(xfire_GetPrivateProfileString(temp, "DetectExe[0]", "", ret2, 255, inipath))
- {
- cutforlaunch=path+strlen(path);
- strcat(path,ret2);
- multiexe=TRUE;
- if(!CheckPath(path,path_r))
- {
- *(path)=0;
- }
- }
- else if(xfire_GetPrivateProfileString(temp, "DetectExe", "", ret2, 255, inipath))
- {
- cutforlaunch=path+strlen(path);
-
- //wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
- if(ret2[0]=='\\')
- {
- strcat(path,(char*)&ret2[1]);
- }
- else
- {
- strcat(path,ret2);
- }
-
- if(!CheckPath(path,path_r))
- {
- *(path)=0;
- }
- }
- else if(xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
- {
- cutforlaunch=path+strlen(path);
- strcat(path,ret2);
- }
-
-
- //prüfe ob existent, dann ist das spiel installiert
- if(path[0]!=0 && GetFileAttributes(path)!=0xFFFFFFFF)
- {
- Xfire_game* newgame=new Xfire_game();
- newgame->id=i;
-
- //8.3 pfade umwandeln
- //GetLongPathNameA(path,path,sizeof(path));
-
- //lowercase pfad
- for(unsigned int ii=0;ii<strlen(path);ii++)
- path[ii]=tolower(path[ii]);
-
- if(path_r[0]==0)
- newgame->setString(path,&newgame->path);
- else
- {
- //lowercase wildcard pfad
- for(unsigned int ii=0;ii<strlen(path_r);ii++)
- path_r[ii]=tolower(path_r[ii]);
- newgame->setString(path_r,&newgame->path);
- }
-
- //spiel mit mehreren exefiles
- if(multiexe)
- {
- multiexe=FALSE;
- for(int i=1;i<9;i++)
- {
- sprintf(ret,"DetectExe[%d]",i);
- if(xfire_GetPrivateProfileString(temp, ret, "", ret2, 512, inipath))
- {
- char* pos=strrchr(path,'\\');
- if(pos!=0)
- {
- pos++;
- *pos=0;
- }
- strcat(path,ret2);
- if(!CheckPath(path))
- {
- *(path)=0;
- }
- else
- {
- for(unsigned int i2=0;i2<strlen(path);i2++)
- path[i2]=tolower(path[i2]);
-
- char* mpathtemp=new char[strlen(path)+1];
- strcpy(mpathtemp,path);
- newgame->mpath.push_back(mpathtemp);
- }
- }
- }
- }
-
- //für launcherstring anpassen
- char* pos=strrchr(path,'\\');
- if(pos!=0)
- {
- pos++;
- *pos=0;
- }
- xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath); // anfügen
- if(cutforlaunch!=0) *cutforlaunch=0;
-
- //pfad aufbereiten
- char launchpath[XFIRE_MAX_STATIC_STRING_LEN]="";
- strcpy(launchpath,path);
- //letzten backslash entfernen
- if(launchpath[strlen(launchpath)-1]=='\\') launchpath[strlen(launchpath)-1]=0;
-
- strcat(path,ret2);
-
- newgame->setString(path,&newgame->launchparams);
- newgame->appendString(" ",&newgame->launchparams);
-
- xfire_GetPrivateProfileString(temp, "Launch", "", ret2, 512, inipath);
- str_replace(ret2,"%UA_LAUNCHER_EXE_DIR%",launchpath);
- str_replace(ret2,"%UA_LAUNCHER_EXE_PATH%",""); //erstmal unwichtige sachen entfernen
- //str_replace(ret2,"%UA_LAUNCHER_EXTRA_ARGS%",""); // - auch entfernen
- str_replace(ret2,"%UA_LAUNCHER_LOGIN_ARGS%",""); // - auch entfernen
-
- newgame->appendString(ret2,&newgame->launchparams);
-
- /*if(xfire_GetPrivateProfileString(temp, "LauncherLoginArgs", "", ret2, 512, inipath))
- {
- str_replace(xf[foundgames].launchparams,"%UA_LAUNCHER_LOGIN_ARGS%",ret2); // - auch entfernen
- }
- else*/
- // str_replace(xf[foundgames].launchparams,"%UA_LAUNCHER_LOGIN_ARGS%",""); // - auch entfernen
-
- if(xfire_GetPrivateProfileString(temp, "LauncherPasswordArgs", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->pwparams);
-
- if(xfire_GetPrivateProfileString(temp, "LauncherNetworkArgs", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->networkparams);
-
- if(xfire_GetPrivateProfileString(temp, "CommandLineMustContain[0]", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->mustcontain);
-
- if(xfire_GetPrivateProfileString(temp, "XUSERSendId", "", ret2, 512, inipath))
- newgame->send_gameid=atoi(ret2);
-
- if(xfire_GetPrivateProfileString(temp, "XUSERSetStatusMsg", "", ret2, 512, inipath))
- newgame->setstatusmsg=atoi(ret2);
-
- //launcherurl?
- if(xfire_GetPrivateProfileString(temp, "LauncherUrl", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->launchparams);
-
- //soll alle string, welche nicht in der commandline eines spiels sein soll in einen string pakcen semikolon getrennt
- sprintf(ret,"CommandLineMustNotContain[0]");
- int i=0;
-
- while(xfire_GetPrivateProfileString(temp, ret, "", ret2, 512, inipath))
- {
- if(!newgame->notcontain) newgame->setString("",&newgame->notcontain);
- if(i>0)
- newgame->appendString(";",&newgame->notcontain);
- newgame->appendString(ret2,&newgame->notcontain);
-
- i++;
- sprintf(ret,"CommandLineMustNotContain[%d]",i);
- }
-
- newgame->setNameandIcon();
-
- strcat(gamelist,gamename);
- strcat(gamelist,", ");
- if(foundgames%2==1)
- strcat(gamelist,"\r\n");
-
- xgamelist.Addgame(newgame);
-
- foundgames++;
-
- split=FALSE;
- }
-
- }
-
- RegCloseKey(hsubk);
- }
- }
-
- }
- else if(!MatchExe && xfire_GetPrivateProfileString(temp, "LauncherDirDefault", "", ret2, 255, inipath))
- {
- if(xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret, 255, inipath))
- {
- strcat(ret2,"\\");
- strcat(ret2,ret);
- }
-
- str_replace(ret2,"%WINDIR%",getenv("WINDIR"));
- str_replace(ret2,"%ProgramFiles%",getenv("ProgramFiles"));
-
- //prüfe ob existent, dann ist das spiel installiert
- if(GetFileAttributes(ret2)!=0xFFFFFFFF)
- {
-
- Xfire_game* newgame=new Xfire_game();
-
- newgame->id=i;
-
- //8.3 pfade umwandeln
- //GetLongPathNameA(ret2,ret2,sizeof(ret2));
-
- //lowercase pfad
- for(unsigned int i=0;i<strlen(ret2);i++)
- ret2[i]=tolower(ret2[i]);
-
- newgame->setString(ret2,&newgame->path);
-
- //launch parameterstring
-
- //pfad aufbereiten
- char launchpath[XFIRE_MAX_STATIC_STRING_LEN]="";
- strcpy(launchpath,ret2);
- if(strrchr(launchpath,'\\')!=0)
- {
- *(strrchr(launchpath,'\\'))=0;
- }
-
- newgame->setString(ret2,&newgame->launchparams);
- newgame->appendString(" ",&newgame->launchparams);
-
- xfire_GetPrivateProfileString(temp, "Launch", "", ret2, 512, inipath);
-
- str_replace(ret2,"%UA_LAUNCHER_EXE_DIR%",launchpath);
-
- str_replace(ret2,"%UA_LAUNCHER_EXE_PATH%",""); //unwichtige sachen entfernen
- //str_replace(ret2,"%UA_LAUNCHER_EXTRA_ARGS%",""); // - auch entfernen
- str_replace(ret2,"%UA_LAUNCHER_LOGIN_ARGS%",""); // - auch entfernen
-
- newgame->appendString(ret2,&newgame->launchparams);
-
- if(xfire_GetPrivateProfileString(temp, "LauncherPasswordArgs", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->pwparams);
-
- if(xfire_GetPrivateProfileString(temp, "LauncherNetworkArgs", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->networkparams);
-
- if(xfire_GetPrivateProfileString(temp, "CommandLineMustContain[0]", "", ret2, 512, inipath))
- newgame->setString(ret2,&newgame->mustcontain);
-
- if(xfire_GetPrivateProfileString(temp, "XUSERSendId", "", ret2, 512, inipath))
- newgame->send_gameid=atoi(ret2);
-
- if(xfire_GetPrivateProfileString(temp, "XUSERSetStatusMsg", "", ret2, 512, inipath))
- newgame->setstatusmsg=atoi(ret2);
-
- //soll alle string, welche nicht in der commandline eines spiels sein soll in einen string pakcen semikolon getrennt
- sprintf(ret,"CommandLineMustNotContain[0]");
- int i=0;
-
- while(xfire_GetPrivateProfileString(temp, ret, "", ret2, 512, inipath))
- {
- if(!newgame->notcontain) newgame->setString("",&newgame->notcontain);
- if(i>0)
- newgame->appendString(";",&newgame->notcontain);
- newgame->appendString(ret2,&newgame->notcontain);
-
- i++;
- sprintf(ret,"CommandLineMustNotContain[%d]",i);
- }
-
- newgame->setNameandIcon();
-
- strcat(gamelist,gamename);
- strcat(gamelist,", ");
- if(foundgames%2==1)
- strcat(gamelist,"\r\n");
-
- xgamelist.Addgame(newgame);
-
- foundgames++;
-
- split=FALSE;
- }
-
- }
-
- if(split)
- i2++;
- else
- i++;
- notfound=0;
- }
- else if(split==FALSE) // nichts gefunden, dann die 2. gameid probieren (games die zb über steam und normal installiert werden können, haben eine 2. id)
- {
- i2=1;
- split=TRUE;
- }
- else if(split==TRUE&&last_gpps!=NULL) // keine weiteren einträge mit der 2. id gefunden, also wieder mit der normalen weitersuchen
- {
- split=FALSE;
- i++;
- i2=0;
- }
- else if(split==TRUE&&last_gpps==NULL) // überhaupt nix gefunden, vllt nicht belegete id's, überspringen und "notfound" hochsetzen
- {
- split=FALSE;
- i2=0;
- if(i==35) //großer sprung unbenutzer id's
- i+=4000;
- i++;
- notfound++;
- }
- }
-
- if(hwnd)SetDlgItemText(hwnd,IDC_CURRENTGAME,Translate("Write to database ..."));
-
- //gefundene games in db eintragen
- xgamelist.writeDatabase();
-
- //scanversion setzen, um ungewollten rescan zu vermeiden
- DBWriteContactSettingWord(NULL, protocolname, "scanver", XFIRE_SCAN_VAL);
-
- EndDialog(hwnd,0);
-
- if(!DBGetContactSettingByte(NULL,protocolname,"dontdisresults",0))
- {
- int p=strlen(gamelist)-2;
- if(p>-1)
- gamelist[p]=0; //letztes koma killen
- sprintf(ret,Translate("Games found:%s%s"),"\r\n\r\n",gamelist);
- MSGBOX(ret);
- }
-
- searching=FALSE;
-
- xgamelist.createStartmenu();
-
- //gamelist unblocken
- xgamelist.Block(FALSE);
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.cpp
deleted file mode 100644
index ece6c0bc3a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendacceptinvitationpacket.h"
-
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
-
- int SendAcceptInvitationPacket::getPacketContent(char *buf) {
- VariableValue val;
- val.setName( "name" );
- val.setValue( name.c_str() );
- int index = 0;
- index += val.writeName(buf, index);
- buf[index++] = 01;
- buf[index++] = name.length();
- buf[index++] = 00;
- index += val.writeValue(buf, index);
-
- return index;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.h
deleted file mode 100644
index 9bc2c4769b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendacceptinvitationpacket.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __SENDACCEPTINVITATION_H
-#define __SENDACCEPTINVITATION_H
-
-#include "xfiresendpacketcontent.h"
-#include <string>
-
-
-#define XFIRE_ACCEPT_INVITATION_PACKET 07
-
-namespace xfirelib {
- class SendAcceptInvitationPacket : public XFireSendPacketContent {
- public:
- virtual ~SendAcceptInvitationPacket() { }
- int getPacketId() { return XFIRE_ACCEPT_INVITATION_PACKET; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 3; }
- int getPacketSize() { return 1024; }
-
- std::string name;
- private:
-
- };
-
-};
-
-
-#endif
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.cpp
deleted file mode 100644
index f122c91ce4..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "senddenyinvitationpacket.h"
-
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.h
deleted file mode 100644
index 10cf6a3a80..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/senddenyinvitationpacket.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __SENDDENYINVITATIONPACKET_H
-#define __SENDDENYINVITATIONPACKET_H
-
-#include "sendacceptinvitationpacket.h"
-
-#define XFIRE_DENY_INVITATION_PACKET 8
-
-namespace xfirelib {
-
- class SendDenyInvitationPacket : public SendAcceptInvitationPacket {
- public:
- virtual ~SendDenyInvitationPacket() { }
- int getPacketId() { return XFIRE_DENY_INVITATION_PACKET; }
-
- private:
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.cpp
deleted file mode 100644
index 2f65e1578b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendgameserverpacket.h"
-#include "variablevalue.h"
-#include <iostream>
-
-namespace xfirelib {
-
- 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;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.h
deleted file mode 100644
index d9f8dfc8b4..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendgameserverpacket.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef _SENDGAMESERVERPACKET_H_
-#define _SENDGAMESERVERPACKET_H_
-
-#include "xfiresendpacketcontent.h"
-
-#define XFIRE_GAME_SERVER_PACKET 04
-
-namespace xfirelib {
- class SendGameServerPacket : public XFireSendPacketContent {
- public:
- virtual ~SendGameServerPacket() { }
- int getPacketId() { return XFIRE_GAME_SERVER_PACKET; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 3; }
- int getPacketSize() { return 1024; }
-
- long port;
- char ip[4];
- private:
-
- };
-
-};
-
-#endif //_SENDGAMESERVERPACKET_H_
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.cpp
deleted file mode 100644
index 8859e004cb..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "stdafx.h"
-
-#include "sendgamestatus2packet.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-#include <windows.h>
-
-//packet vervollständigt
-
-namespace xfirelib {
-
- SendGameStatus2Packet::SendGameStatus2Packet() {
- ip[0] = ip[1] = ip[2] = ip[3] = 0;
- port = 0;
- }
-
- int SendGameStatus2Packet::getPacketContent(char *buf) {
-
- VariableValue val;
-
- val.setName( getGameAttributeName() );
-
- val.setValueFromLong(gameid,4);
-
- int index = 0;
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
-
- 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;
- }
-
-
-};
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.h b/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.h
deleted file mode 100644
index cad9d0108b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatus2packet.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef _SENDGAMESTATUS2PACKET_H_
-#define _SENDGAMESTATUS2PACKET_H_
-
-#include "sendgamestatuspacket.h"
-
-#define XFIRE_GAME_STATUS2_PACKET 15
-
-namespace xfirelib {
-
- class SendGameStatus2Packet : public SendGameStatusPacket {
- public:
- virtual ~SendGameStatus2Packet() { }
- SendGameStatus2Packet();
- int getPacketId() { return XFIRE_GAME_STATUS2_PACKET; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 3; }
- int getPacketSize() { return 1024; }
-
- //gamestatus2 packet ready gemacht
- long gameid;
- char ip[4];
- long port;
-
- protected:
- virtual std::string getGameAttributeName() { return "vid"; }
- virtual std::string getIPAttributeName() { return "vip"; }
- virtual std::string getPortAttributeName() { return "vport"; }
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.cpp
deleted file mode 100644
index fe3ae43e5a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "stdafx.h"
-
-#include "sendgamestatuspacket.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-#include <windows.h>
-
-namespace xfirelib {
-
- SendGameStatusPacket::SendGameStatusPacket() {
- ip[0] = ip[1] = ip[2] = ip[3] = 0;
- port = 0;
- }
-
- int SendGameStatusPacket::getPacketContent(char *buf) {
-
- VariableValue val;
-
- val.setName( getGameAttributeName() );
-
- val.setValueFromLong(gameid,4);
-
- int index = 0;
- index += val.writeName(buf, index);
- buf[index++] = 02;
- index += val.writeValue(buf, index);
-
- 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;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.h
deleted file mode 100644
index 57bec411ee..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendgamestatuspacket.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef _SENDGAMESTATUSPACKET_H_
-#define _SENDGAMESTATUSPACKET_H_
-
-#include "xfiresendpacketcontent.h"
-#include <string>
-
-#define XFIRE_GAME_STATUS_PACKET 04
-
-namespace xfirelib {
- class SendGameStatusPacket : public XFireSendPacketContent {
- public:
- SendGameStatusPacket();
- virtual ~SendGameStatusPacket() { }
- int getPacketId() { return XFIRE_GAME_STATUS_PACKET; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 3; }
- int getPacketSize() { return 1024; }
-
- long gameid;
- char ip[4];
- long port;
-
- protected:
- virtual std::string getGameAttributeName() { return "gameid"; }
- virtual std::string getIPAttributeName() { return "gip"; }
- virtual std::string getPortAttributeName() { return "gport"; }
- private:
-
- };
-
-};
-#endif //_SENDGAMESTATUSPACKET_H_
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.cpp
deleted file mode 100644
index 242ba88214..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendkeepalivepacket.h"
-#include "variablevalue.h"
-#include <string.h>
-
-namespace xfirelib {
-
- int SendKeepAlivePacket::getPacketContent(char *buf) {
- int index = 0;
-
- VariableValue val;
- val.setName("value");
-
- index += val.writeName(buf,index);
- buf[index++] = 2;
- buf[index++] = 0;
- buf[index++] = 0;
- buf[index++] = 0;
- buf[index++] = 0;
-
- val.setName("stats");
-
- index += val.writeName(buf,index);
- buf[index++] = 4;
- buf[index++] = 2;
- buf[index++] = 0;
- buf[index++] = 0;
-
- return index;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.h
deleted file mode 100644
index 5d81785998..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendkeepalivepacket.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __SENDKEEPALIVEPACKET_H
-#define __SENDKEEPALIVEPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include <string>
-
-#define XFIRE_SEND_KEEPALIVE_PACKET_ID 13;
-
-namespace xfirelib {
- using namespace std;
-
- class SendKeepAlivePacket : public XFireSendPacketContent {
- public:
- virtual ~SendKeepAlivePacket() { }
- int getPacketId() { return XFIRE_SEND_KEEPALIVE_PACKET_ID; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 2; }
- int getPacketSize() { return 26; }
-
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.cpp
deleted file mode 100644
index a0f7e4e3d0..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendmessagepacket.h"
-#include "xfireutils.h"
-#include <string.h>
-#include <iostream>
-#include "xdebug.h"
-
-#include "sendmessagepacket.h"
-#include "xfireutils.h"
-#include <string.h>
-#include <iostream>
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- std::map<std::string,int> SendMessagePacket::imindexes;
-
- void SendMessagePacket::init(Client *client, string username, string message) {
- BuddyListEntry *entry = client->getBuddyList()->getBuddyByName(username);
- if(entry) {
- setSid(entry->sid);
- }
- this->message = message;
- initIMIndex();
- }
-
- void SendMessagePacket::initIMIndex() {
- string str_sid(sid);
- if( imindexes.count( str_sid ) < 1 )
- imindex = imindexes[str_sid] = 1;
- else
- imindex = ++imindexes[str_sid];
- }
-
- void SendMessagePacket::setSid(const char *sid) {
- memcpy(this->sid,sid,16);
- }
-
- int SendMessagePacket::getPacketContent(char *buf) {
- if( imindex == 0 ) initIMIndex();
-
- int index = 0;
- VariableValue val;
- val.setName("sid");
- val.setValue(sid,16);
-
- index += val.writeName(buf,index);
- buf[index++] = 3;
- index += val.writeValue(buf,index);
-
- val.setName("peermsg");
- index += val.writeName(buf,index);
- buf[index++] = 5;
- //buf[index++] = 7;
- buf[index++] = 3;
-
- val.setName("msgtype");
- val.setValueFromLong(0,4);
- index += val.writeName(buf,index);
- buf[index++] = 2;
- index += val.writeValue(buf,index);
-
- val.setName("imindex");
- val.setValueFromLong(imindex,4);
- index += val.writeName(buf,index);
- buf[index++] = 02;
- index += val.writeValue(buf,index);
-
- val.setName("im");
- val.setValue((char*)message.c_str(),message.size());
- index += val.writeName(buf,index);
- buf[index++] = 01;
- buf[index++] = message.size()%256;
- buf[index++] = (int)message.size()/256;
- index += val.writeValue(buf,index);
-
- return index;
- }
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.h
deleted file mode 100644
index f54efd778c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendmessagepacket.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __SENDMESSAGEPACKET_H
-#define __SENDMESSAGEPACKET_H
-
-
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-#include <string.h>
-#include "client.h"
-
-namespace xfirelib {
-
- class SendMessagePacket : public XFireSendPacketContent {
- public:
- SendMessagePacket() {
- imindex = 0;
- }
- virtual ~SendMessagePacket() { }
-
- void init(Client *client, string username, string message);
- void setSid(const char *sid);
-
- XFirePacketContent* newPacket() { return new SendMessagePacket(); }
-
- int getPacketId() { return 2; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount() {return 2;};
- int getPacketSize() { return 5024; };
-
- /**
- * SID of the user to who the message should be sent.
- */
- char sid[16];
- /**
- * A running counter for each buddy. (will be initialized to 0 by default.. and..
- * shouldn't be a problem to leave it 0)
- */
- long imindex;
- /**
- * Message body to be sent.
- */
- std::string message;
-
- protected:
- void initIMIndex();
-
- static std::map<std::string,int> imindexes;
-
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.cpp
deleted file mode 100644
index 57d38ac50d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendnickchangepacket.h"
-#include "variablevalue.h"
-#include <string.h>
-
-namespace xfirelib {
-/*TODO: this packet is outdated, sniff with official client and change it to a correct implementation*/
- int SendNickChangePacket::getPacketContent(char *buf) {
- int index = 0;
-
- VariableValue val;
- val.setName("nick");
- val.setValue((char*)nick.c_str(),nick.size());
-
- index += val.writeName(buf,index);
- buf[index++] = 1;
- buf[index++] = nick.size();
- buf[index++] = 0;
-
- index += val.writeValue(buf,index);
-
- return index;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.h
deleted file mode 100644
index 940bac032d..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendnickchangepacket.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __SENDNICKCHANGEPACKET_H
-#define __SENDNICKCHANGEPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include <string>
-
-#define XFIRE_SEND_NICKCHANGE_PACKET_ID 14;
-
-namespace xfirelib {
- using namespace std;
-
- class SendNickChangePacket : public XFireSendPacketContent {
- public:
- virtual ~SendNickChangePacket() { }
-
- XFirePacketContent *newPacket() { return new SendNickChangePacket; }
- int getPacketId() { return XFIRE_SEND_NICKCHANGE_PACKET_ID; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 1; }
- int getPacketSize() { return 1024; }
-
- string nick;
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.cpp
deleted file mode 100644
index a49b3f38ed..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendremovebuddypacket.h"
-
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
-
- int SendRemoveBuddyPacket::getPacketContent(char *buf) {
- int index = 0;
- VariableValue val;
- val.setName("userid");
- XDEBUG2( "Creating packet to remove userid %ld\n", userid );
- index += val.writeName(buf,index);
- val.setValueFromLong(userid,4);
- buf[index++] = 2;
- index += val.writeValue(buf,index);
-
- return index;
- }
-
-};
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.h
deleted file mode 100644
index 6a27728300..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendremovebuddypacket.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __SENDREMOVEBUDDYPACKET_H
-#define __SENDREMOVEBUDDYPACKET_H
-
-#include "xfiresendpacketcontent.h"
-
-#define XFIRE_SENDREMOVEBUDDYPACKET 9
-
-namespace xfirelib {
-
- class SendRemoveBuddyPacket : public XFireSendPacketContent {
- public:
- virtual ~SendRemoveBuddyPacket() { }
- int getPacketId() { return XFIRE_SENDREMOVEBUDDYPACKET; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 1; }
- int getPacketSize() { return 1024; }
-
- long userid;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.cpp
deleted file mode 100644
index 34c80a7ff3..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "sendsidpacket.h"
-#include <string.h>
-#include <iostream>
-
-/*
- whois packet von xfire, für z.b. friends of friends
-*/
-
-namespace xfirelib {
- using namespace std;
-
- int SendSidPacket::getPacketContent(char *packet) {
- int index = 0;
-
- XERROR("Send Sid Packet!\n");
-
- packet[index++] = 0x03;
- packet[index++] = 's';
- packet[index++] = 'i';
- packet[index++] = 'd';
- packet[index++] = 4;
- packet[index++] = 3;
- XDEBUG2("Sids: %d\n",sids->size());
- packet[index++] = sids->size();
- packet[index++] = 0;
-
- for(uint i = 0 ; i < sids->size() ; i++) {
- XDEBUG2("Sid%d:",i);
- char* sid=sids->at(i);
- for(int u = 0; u <16 ; u++)
- {
- XDEBUG2("%x,",sid[u]);
- packet[index++] = sid[u];
- }
- XDEBUG("\n");
- }
-
- length = index;
- return index;
- }
-
- int SendSidPacket::getPacketAttributeCount() {
- return 1;
- }
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.h
deleted file mode 100644
index ffffad2071..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendsidpacket.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//mit diesem packet kann man sids welche man nicht zuordnen kann, erfragen wer sich dahinter verbirgt
-//eine art whois, wahrscheinlich
-
-#ifndef __SENDSIDPACKET_H
-#define __SENDSIDPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-
-#include <vector>
-#include <string>
-
-namespace xfirelib {
- using namespace std;
-
- class SendSidPacket : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new SendSidPacket(); }
-
- int getPacketId() { return 0x5; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 1000; };
- void parseContent(char *buf, int length, int numberOfAtts) { };
-
- vector<char *> *sids;
-
- private:
- int length;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.cpp
deleted file mode 100644
index 6495515119..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "sendstatusmessagepacket.h"
-
-#include <string.h>
-
-namespace xfirelib {
-
- int SendStatusMessagePacket::getPacketContent(char *buf) {
- int index = 0;
- buf[index++] = 0x2e;
- buf[index++] = 0x01;
- buf[index++] = awaymsg.length();
- buf[index++] = 0x00;
- memcpy(buf+index,awaymsg.c_str(),awaymsg.length());
- index+=awaymsg.length();
- return index;
- }
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.h
deleted file mode 100644
index 3c4106e260..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendstatusmessagepacket.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __SENDSTATUSMESSAGEPACKET_H
-#define __SENDSTATUSMESSAGEPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include <string>
-
-#define XFIRE_SEND_STATUSMESSAGE_PACKET_ID 32
-
-namespace xfirelib {
- using namespace std;
-
- class SendStatusMessagePacket : public XFireSendPacketContent {
- public:
- ~SendStatusMessagePacket(){};
- XFirePacketContent *newPacket() { return new SendStatusMessagePacket; }
-
- int getPacketId() { return XFIRE_SEND_STATUSMESSAGE_PACKET_ID; }
-
- int getPacketContent(char *buf);
- int getPacketAttributeCount() { return 1; }
- int getPacketSize() { return 1024; }
-
-
- string awaymsg;
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.cpp
deleted file mode 100644
index 3cc09d80e9..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-#include "stdafx.h"
-
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//sendtypingklasse hinzugefügt http://xfirelib.sphene.net/board2/showThread/367 - big thx to Fl0ri4n - dufte
-
-
-#include "sendtypingpacket.h"
-#include "xfireutils.h"
-#include <string.h>
-#include <iostream>
-#include "xdebug.h"
-
-namespace xfirelib {
-using namespace std;
-
-std::map<std::string,int> SendTypingPacket::imindexes;
-
-void SendTypingPacket::init(Client *client, string username) {
-BuddyListEntry *entry = client->getBuddyList()->getBuddyByName(username);
-if(entry) {
-setSid(entry->sid);
-}
-initIMIndex();
-}
-
-void SendTypingPacket::initIMIndex() {
-string str_sid(sid);
-if( imindexes.count( str_sid ) < 1 )
-imindex = imindexes[str_sid] = 1;
-else
-imindex = ++imindexes[str_sid];
-
-}
-void SendTypingPacket::setSid(const char *sid) {
-memcpy(this->sid,sid,16);
-}
-
-int SendTypingPacket::getPacketContent(char *buf) {
-if( imindex == 0 ) initIMIndex();
-
-int index = 0;
-VariableValue val;
-val.setName("sid");
-val.setValue(sid,16);
-
-index += val.writeName(buf,index);
-buf[index++] = 3;
-index += val.writeValue(buf,index);
-
-val.setName("peermsg");
-index += val.writeName(buf,index);
-buf[index++] = 5;
-//buf[index++] = 7;
-buf[index++] = 3;
-
-val.setName("msgtype");
-val.setValueFromLong(3,4);
-index += val.writeName(buf,index);
-buf[index++] = 2;
-index += val.writeValue(buf,index);
-
-val.setName("imindex");
-val.setValueFromLong(imindex,4);
-index += val.writeName(buf,index);
-buf[index++] = 02;
-index += val.writeValue(buf,index);
-
-val.setName("typing");
-val.setValueFromLong(1,4);
-index += val.writeName(buf,index);
-buf[index++] = 02;
-index += val.writeValue(buf,index);
-
-return index;
-}
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.h
deleted file mode 100644
index d3226f3a0e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/sendtypingpacket.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-//sendtypingklasse hinzugefügt http://xfirelib.sphene.net/board2/showThread/367 - big thx to Fl0ri4n - dufte
-
-#ifndef __SENDTYPINGPACKET_H
-#define __SENDTYPINGPACKET_H
-
-
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-#include <string.h>
-#include "client.h"
-
-namespace xfirelib {
-
-class SendTypingPacket : public XFireSendPacketContent {
-public:
-SendTypingPacket() {
-imindex = 0;
-}
-virtual ~SendTypingPacket() { }
-
-void init(Client *client, string username);
-void setSid(const char *sid);
-
-XFirePacketContent* newPacket() { return new SendTypingPacket(); }
-
-int getPacketId() { return 2; }
-int getPacketContent(char *buf);
-int getPacketAttributeCount() {return 2;};
-int getPacketSize() { return 1024; };
-
-/**
-* SID of the user to who the message should be sent.
-*/
-char sid[16];
-/**
-* A running counter for each buddy. (will be initialized to 0 by default.. and..
-* shouldn't be a problem to leave it 0)
-*/
-long imindex;
-
-protected:
-void initIMIndex();
-
-static std::map<std::string,int> imindexes;
-
-};
-
-};
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/services.cpp b/plugins/!NotAdopted/Xfire/xfiretest/services.cpp
deleted file mode 100644
index 3f39200e59..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/services.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-#include "stdafx.h"
-
-#include "baseProtocol.h"
-
-BOOL IsContactMySelf(std::string buddyusername) {
- DBVARIANT dbv;
-
- //nur wenn option aktiv, sonst immer FALSE
- if(!DBGetContactSettingByte(NULL,protocolname,"skipmyself",0))
- return FALSE;
-
- if(!DBGetContactSetting(NULL,protocolname,"login",&dbv))
- {
- if(!lstrcmpiA( dbv.pszVal, buddyusername.c_str() ))
- {
- DBFreeVariant(&dbv);
- return TRUE;
- }
- DBFreeVariant(&dbv);
- }
- else
- return FALSE;
-
- return FALSE;
-}
-
-//liefert vollendateipfad vom eigenen avatar zurück, wenn definiert
-int GetMyAvatar(WPARAM wparam,LPARAM lparam) {
- DBVARIANT dbv;
-
- if(!DBGetContactSetting(NULL,protocolname,"MyAvatarFile",&dbv))
- {
- strncpy((char*)wparam, dbv.pszVal, (int)lparam);
- DBFreeVariant(&dbv);
- return 0;
- }
-
- return -1;
-}
-
-//liefert vollendateipfad vom eigenen avatar zurück, wenn definiert
-int mBotNotify(WPARAM wparam,LPARAM lparam) {
-
- if(wparam) {
- CallService(MBOT_TRIGGER,(WPARAM)"xfireingame",1);
- }
- else
- {
- CallService(MBOT_TRIGGER,(WPARAM)"xfireingame",0);
- }
-
- return 0;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/services.h b/plugins/!NotAdopted/Xfire/xfiretest/services.h
deleted file mode 100644
index af0477f1c7..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/services.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _XFIRESERVICES_H
-#define _XFIRESERVICES_H
-
-#define XFIRE_URLCALL "XFire/UrlCall"
-
-#define XFIRE_SET_NICK "XFire/SetNickname"
-
-#define XFIRE_SEND_PREFS "XFire/SendXFirePrefs"
-
-#define XFIRE_INGAMESTATUSHOOK "XFire/Gamestatus"
-
-#define MBOT_TRIGGER "MBot/Trigger"
-
-//liefert den eigenen avatar zurück
-int GetMyAvatar(WPARAM wparam,LPARAM lparam);
-int mBotNotify(WPARAM wparam,LPARAM lparam);
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/setnickname.cpp b/plugins/!NotAdopted/Xfire/xfiretest/setnickname.cpp
deleted file mode 100644
index 2062c2f487..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/setnickname.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//fürs nick - dialog
-
-#include "stdafx.h"
-#include "setnickname.h"
-
-BOOL CALLBACK DlgNickProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- SendMessage(hwndDlg,WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
-
- DBVARIANT dbv;
- if(!DBGetContactSetting(NULL,protocolname,"Nick",&dbv)) {
- SetDlgItemText(hwndDlg,IDC_NICKNAME,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- return TRUE;
- }
- case WM_COMMAND:
- {
- if(LOWORD(wParam) == IDOK)
- {
- char nick[255];
- GetDlgItemText(hwndDlg,IDC_NICKNAME,nick,sizeof(nick));
-
- CallService(XFIRE_SET_NICK,0,(LPARAM)nick);
-
- EndDialog(hwndDlg,TRUE);
- return TRUE;
- }
- else if(LOWORD(wParam) == IDCANCEL)
- {
- EndDialog(hwndDlg,FALSE);
- return FALSE;
- }
- }
- }
- return FALSE;
-}
-
-BOOL ShowSetNick() {
- return DialogBox(hinstance,MAKEINTRESOURCE(IDD_SETNICKNAME),NULL,DlgNickProc);
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/setnickname.h b/plugins/!NotAdopted/Xfire/xfiretest/setnickname.h
deleted file mode 100644
index f3d9eb552e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/setnickname.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "baseProtocol.h"
-#include "resource.h"
-
-BOOL ShowSetNick(); \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/socket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/socket.cpp
deleted file mode 100644
index d47d3c6d1b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/socket.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-// Copied from http://linuxgazette.net/issue74/tougher.html
-// (only slightly modified)
-// heavy modified (für windows umgeschrieben) - dufte
-
-// Implementation of the Socket class.
-
-
-#include "stdafx.h"
-
-#include "xdebug.h"
-#include "socket.h"
-#include "string.h"
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <iostream>
-
-/*NETLIB*****************/
-#include "newpluginapi.h"
-#include "m_netlib.h"
-extern HANDLE hNetlib;
-/*NETLIB*****************/
-
-
-using namespace std;
-
-Socket::Socket( std::string host, int port, int useproxy, std::string proxyhost , int proxyport ) :
- m_sock ( -1 )
-{
-
- memset ( &m_addr,
- 0,
- sizeof ( m_addr ) );
-
- if(!create()) {
- throw SocketException( "Could not create socket." );
- }
- if(!connect(host,port,useproxy,proxyhost,proxyport)) {
- throw SocketException( "Could not bind port." );
- }
-}
-
-Socket::~Socket()
-{
- Netlib_CloseHandle(this->netlibcon);
-}
-
-bool Socket::create()
-{
-
-/*
- m_sock = socket ( AF_INET, SOCK_STREAM, 0 );
-
-
- if ( ! is_valid() )
- return false;*/
-
-
- // TIME_WAIT - argh
-// int on = 1;
- //if ( setsockopt ( m_sock, SOL_SOCKET, SO_REUSEADDR, ( const char* ) &on, sizeof ( on ) ) == -1 )
-// return false;
-
- return true;
-
-}
-
-
-
-bool Socket::bind ( const int port )
-{
-/* if ( ! is_valid() )
- {
- return false;
- }
-
-
-
- m_addr.sin_family = AF_INET;
- m_addr.sin_addr.s_addr = INADDR_ANY;
- m_addr.sin_port = htons ( port );
-
- int bind_return = ::bind ( m_sock,
- ( struct sockaddr * ) &m_addr,
- sizeof ( m_addr ) );
-
-
- if ( bind_return == -1 )
- {
- return false;
- }
-*/
- return true;
-}
-
-
-bool Socket::listen() const
-{
- /*if ( ! is_valid() )
- {
- return false;
- }
-
- int listen_return = ::listen ( m_sock, MAXCONNECTIONS );
-
-
- if ( listen_return == -1 )
- {
- return false;
- }
-*/
- return false;
-}
-
-
-bool Socket::accept ( Socket& new_socket ) const
-{
- /*int addr_length = sizeof ( m_addr );
- new_socket.m_sock = ::accept ( m_sock, ( sockaddr * ) &m_addr, ( socklen_t * ) &addr_length );
-
- if ( new_socket.m_sock <= 0 )
- return false;
- else
- return true;*/
- return false;
-
-}
-
-bool Socket::send ( char *buf, int length ) const {
- int status = Netlib_Send(this->netlibcon,buf, length,0); //::send ( m_sock, buf, length, 0);
- if ( status == -1 )
- {
- return false;
- }
- else
- {
- return true;
- }
-}
-bool Socket::send ( const std::string s ) const
-{
- int status = Netlib_Send(this->netlibcon,s.c_str(), s.size(),0); //::send ( m_sock, s.c_str(), s.size(), 0);
- if ( status == -1 )
- {
- return false;
- }
- else
- {
- return true;
- }
-}
-
-int Socket::recv ( char *buf, int maxlen ) const {
- int status = Netlib_Recv(this->netlibcon,buf,maxlen,0); //::recv( m_sock, buf, maxlen, 0 );
-
- if ( status == -1 )
- {
- //std::cout << "status == -1 errno == " << errno << " in Socket::recv WSA:::" << ::WSAGetLastError() << "\n";
- return 0;
- }
- return status;
-}
-
-int Socket::recv ( std::string& s ) const
-{
- char buf [ MAXRECV + 1 ];
-
- s = "";
-
- memset ( buf, 0, MAXRECV + 1 );
-
- int status = Netlib_Recv(this->netlibcon,buf,MAXRECV,0);//::recv ( m_sock, buf, MAXRECV, 0 );
-
- if ( status == -1 )
- {
- //std::cout << "status == -1 errno == " << errno << " in Socket::recv\n";
- return 0;
- }
- else if ( status == 0 )
- {
- return 0;
- }
- else
- {
- s = buf;
- return status;
- }
-}
-
-
-
-bool Socket::connect ( const std::string host, const int port, int useproxy,std::string proxyhost,int proxyport)
-{
- //if ( ! is_valid() ) return false;
-
- /*m_addr.sin_family = AF_INET;
- if(useproxy)
- {
- m_addr.sin_port = htons ( proxyport );
- m_addr.sin_addr.s_addr=inet_addr(proxyhost.c_str());
- }
- else
- {
- m_addr.sin_port = htons ( port );
- m_addr.sin_addr.s_addr=inet_addr(host.c_str());
- }
- */
-
- int status = 0; //inet_pton ( AF_INET, host.c_str(), &m_addr.sin_addr );
-
- /* XDEBUG(("Is valid .. %d\n",status));
- if ( errno == EAFNOSUPPORT ) return false; */
- //status = ::connect ( m_sock, ( sockaddr * ) &m_addr, sizeof ( m_addr ) );
-
- /*if(useproxy&&status==0) {
- char temp[1024];
- this->send("CONNECT cs.xfire.com:25999 HTTP/1.1\nHost: cs.xfire.com:25999\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\n\n");
- this->recv((char*)temp,1024);
- }*/
-
- NETLIBOPENCONNECTION ncon = { 0 };
- ncon.cbSize = sizeof(ncon);
- ncon.szHost = "cs.xfire.com";
- ncon.wPort = (WORD)atol("25999");
- ncon.timeout=5;
- netlibcon = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) hNetlib, (LPARAM) & ncon);
-
-
- //std::cout << "status: " << status << std::endl;
- if ( netlibcon != NULL )
- {
- //CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) hNetlib, (LPARAM) & ncon);
- m_sock=CallService(MS_NETLIB_GETSOCKET,(WPARAM) netlibcon,0);
- return true;
- }
- else {
- int errsv = errno;
- if(errsv == SOCKET_ERROR) {
- // std::cout << "Connection refused to " << host << ":" << port << std::endl;
- throw SocketException( "Connection refused." );
- }
- //std::cout << "errno: " << errsv << std::endl;
- return false;
- }
-}
-
-void Socket::set_non_blocking ( const bool b )
-{
-/* u_long arg=0;
-
- if(b) arg=1;*/
-
- //ioctlsocket(m_sock, 0x8004667e,&arg);
-// int opts;
-
- /* opts = fcntl ( m_sock,
- F_GETFL );
-
- if ( opts < 0 )
- {
- return;
- }
-*/
- //if ( b )
- // opts = ( opts | O_NONBLOCK );
- /*else
- opts = ( opts & ~O_NONBLOCK );*/
-
- /*fcntl ( m_sock,
- F_SETFL,opts );*/
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/socket.h b/plugins/!NotAdopted/Xfire/xfiretest/socket.h
deleted file mode 100644
index 370aeb74f7..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/socket.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copied from http://linuxgazette.net/issue74/tougher.html
-// (only slightly modified)
-
-
-// Definition of the Socket class
-
-
-#ifndef Socket_class
-#define Socket_class
-
-#include "stdafx.h"
-
-#include <sys/types.h>
-//#include <netinet/in.h>
-//#include <netdb.h>
-//#include <unistd.h>
-#include <string>
-//#include <arpa/inet.h>
-#include <winsock2.h>
-
-#include "socketexception.h"
-
-
-const int MAXHOSTNAME = 200;
-const int MAXCONNECTIONS = 5;
-const int MAXRECV = 500;
-
-class Socket
-{
- public:
- //proxy hinzugefügt dufte
- Socket( std::string host, int port,int useproxy = 0,std::string proxyhost = " ", int proxyport = 0 );
- virtual ~Socket();
-
- // Server initialization
- bool create();
- bool bind ( const int port );
- bool listen() const;
- bool accept ( Socket& ) const;
-
- // Client initialization
- bool connect ( const std::string host, const int port, int useproxy,std::string proxyhost,int proxyport);
-
- // Data Transimission
- bool send ( char *buf, int length ) const;
- bool send ( const std::string ) const;
- int recv ( std::string& ) const;
- int recv ( char *buf, int maxlen ) const;
-
-
- void set_non_blocking ( const bool );
-
- bool is_valid() const { return true; }
-
- int m_sock;
-
- private:
-
-
- sockaddr_in m_addr;
- HANDLE netlibcon;
-
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/socketexception.h b/plugins/!NotAdopted/Xfire/xfiretest/socketexception.h
deleted file mode 100644
index dc506aeaf7..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/socketexception.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-// SocketException class
-
-
-#ifndef SocketException_class
-#define SocketException_class
-
-#include <string>
-
-class SocketException
-{
- public:
- SocketException ( std::string s ) : m_s ( s ) {};
- ~SocketException (){};
-
- std::string description() { return m_s; }
-
- private:
-
- std::string m_s;
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/srcheader.txt b/plugins/!NotAdopted/Xfire/xfiretest/srcheader.txt
deleted file mode 100644
index 971953ba23..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/srcheader.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/stdafx.cpp b/plugins/!NotAdopted/Xfire/xfiretest/stdafx.cpp
deleted file mode 100644
index f16632cd31..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/stdafx.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// stdafx.cpp : Quelldatei, die nur die Standard-Includes einbindet.
-// xfiretest.pch ist der vorkompilierte Header.
-// stdafx.obj enthält die vorkompilierten Typinformationen.
-
-#include "stdafx.h"
-
-// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H
-// und nicht in dieser Datei erforderlich sind.
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/stdafx.h b/plugins/!NotAdopted/Xfire/xfiretest/stdafx.h
deleted file mode 100644
index 3b6a0d7bd2..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/stdafx.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// stdafx.h : Includedatei für Standardsystem-Includedateien
-// oder häufig verwendete projektspezifische Includedateien,
-// die nur in unregelmäßigen Abständen geändert werden.
-//
-
-#pragma once
-
-#ifndef _WIN32_WINNT // Lassen Sie die Verwendung spezifischer Features von Windows XP oder später zu.
-#define _WIN32_WINNT 0x0501 // Ändern Sie dies in den geeigneten Wert für andere Versionen von Windows.
-#endif
-
-#include <stdio.h>
-#include <cstdlib>
-#include <tchar.h>
-#include <iostream>
-
-#define uint unsigned int
-#define socklen_t int
-
-#define NO_PTHREAD
-
-#pragma warning(disable:4267)
-#pragma warning(disable:4244)
-#pragma warning(disable:4312)
-#pragma warning(disable:4099)
-#pragma warning(disable:4311)
-#pragma comment(lib,"ws2_32.lib")
-
-#ifndef NO_PTHREAD
-#pragma comment(lib,"pthreads.lib")
-#endif
-
-#pragma comment(lib,"user32.lib")
-#pragma comment(lib,"gdi32.lib")
-
-// TODO: Hier auf zusätzliche Header, die das Programm erfordert, verweisen.
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/testclient/Jamfile b/plugins/!NotAdopted/Xfire/xfiretest/testclient/Jamfile
deleted file mode 100644
index 29b07b1a20..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/testclient/Jamfile
+++ /dev/null
@@ -1,5 +0,0 @@
-SubDir TOP src testclient ;
-
-LOCATE_TARGET = bin/testclient ;
-Main xfirelibtest : test.cpp ;
-LinkLibraries xfirelibtest : libxfirelib ;
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/testclient/test.cpp b/plugins/!NotAdopted/Xfire/xfiretest/testclient/test.cpp
deleted file mode 100644
index 0d4f2070ab..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/testclient/test.cpp
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "../xdebug.h"
-
-
-#include <iostream>
-#include <string>
-#include <stdexcept>
-
-#include "test.h"
-#include "../client.h"
-#include "../xfirepacket.h"
-#include "../loginfailedpacket.h"
-#include "../otherloginpacket.h"
-#include "../messagepacket.h"
-#include "../sendstatusmessagepacket.h"
-#include "../sendmessagepacket.h"
-#include "../invitebuddypacket.h"
-#include "../sendacceptinvitationpacket.h"
-#include "../senddenyinvitationpacket.h"
-#include "../sendremovebuddypacket.h"
-#include "../sendnickchangepacket.h"
-#include "../sendgamestatuspacket.h"
-#include "../sendgamestatus2packet.h"
-#include "../dummyxfiregameresolver.h"
-#include "../sendgameserverpacket.h"
-#include "../recvoldversionpacket.h"
-
-namespace xfirelibtest {
- using namespace std;
- using namespace xfirelib;
-
- XFireTestClient::XFireTestClient(string username_,string password_)
- : username(username_), password(password_) {
- client = new Client();
- client->setGameResolver( new DummyXFireGameResolver() );
- lastInviteRequest = NULL;
- }
- XFireTestClient::~XFireTestClient() {
- delete client;
- delete lastInviteRequest;
- }
-
- void XFireTestClient::run() {
- client->connect(username,password);
- client->addPacketListener(this);
- // Starting input loop ...
- string input;
- bool done = false;
- while(!done) {
- cout << "Give me Your Commands:\n>>> ";
- getline(cin,input);
- //string words[10];
- //split(input, words, 10, " ");
- vector<string> cmds = explodeString(input," ");
- //cout << "Command: " << cmds[0];
- //XDEBUG(( "Input: %s %d Command: %s\n", input.c_str(), cmds.size(), cmds[0].c_str() ));
- if(cmds.size() > 0) {
- if(cmds[0] == "help") {
- cout << "No help available right now :(" << endl;
- cout << "But a short list of available commands: " << endl;
- cout << " quit" << endl;
- cout << " buddylist" << endl;
- cout << " away" << endl;
- cout << " back" << endl;
- cout << " game <gameid>" << endl;
- cout << " game2 <game2id>" << endl;
- cout << " nick" << endl;
- cout << " invite <username>" << endl;
- cout << " accept [<username>]" << endl;
- cout << " deny [<username>]" << endl;
- cout << " remove <username>" << endl;
- cout << " send <username> <message .....>" << endl;
- } else if(cmds[0] == "quit") {
- cout << "Quitting" << endl;
- done = true;
- } else if(cmds[0] == "buddylist") {
- printBuddyList();
- } else if(cmds[0] == "away" || cmds[0] == "back") {
- SendStatusMessagePacket *packet = new SendStatusMessagePacket();
- packet->awaymsg = joinString(cmds,1);//input.substr(5);
- client->send( packet );
- delete packet;
- } else if(cmds[0] == "game" || cmds[0] == "game2") {
- int gameid = 0;
- if(cmds.size() > 1) {
- gameid = atoi(cmds[1].c_str());
- }
- SendGameStatusPacket *packet =
- (cmds[0] == "game" ? new SendGameStatusPacket() :
- new SendGameStatus2Packet());
- packet->gameid = 2;
- packet->gameid = gameid;
- char ip[] = {0,0,0,0};
- memcpy(packet->ip,ip,4);
- packet->port = 0;
- client->send( packet );
- delete packet;
- } else if(cmds[0] == "nick"){
- if(cmds.size() < 2) {
- cout << "Usage: nick <nickname>" << endl;
- continue;
- }
- SendNickChangePacket nick;
- nick.nick = joinString(cmds,1);
- client->send( &nick );
- cout << "Sent nick change." << endl;
- }else if(cmds[0] == "send"){
- if(cmds.size() < 3) {
- cout << "Usage: send <username> <message>" << endl;
- continue;
- }
- SendMessagePacket msg;
- msg.init(client, cmds[1], joinString(cmds,2));
- client->send( &msg );
- cout << "Sent message." << endl;
- } else if(cmds[0] == "invite") {
- if(cmds.size() < 3) {
- cout << "Usage: invite <username> <message>" << endl;
- } else {
- InviteBuddyPacket invite;
- invite.addInviteName( cmds[1], joinString(cmds,2) );
- client->send( &invite );
- cout << "Sent Invitation." << endl;
- }
- } else if(cmds[0] == "accept" || cmds[0] == "deny") {
- string name;
- if(cmds.size() < 2) {
- if(lastInviteRequest == 0) {
- cout << "No Invitation Request pending (try " << cmds[0] << " <username>)" << endl;
- continue;
- }
- name = string(*lastInviteRequest);
- delete lastInviteRequest;
- lastInviteRequest = 0;
- } else {
- name = cmds[1];
- }
- if(cmds[0] == "accept") {
- SendAcceptInvitationPacket accept;
- accept.name = name;
- client->send( &accept );
- cout << "Sent Accept Invitation." << endl;
- } else {
- SendDenyInvitationPacket deny;
- deny.name = name;
- client->send( &deny );
- cout << "Sent Deny Invitation." << endl;
- }
- } else if(cmds[0] == "remove") {
- if(cmds.size() < 2) {
- cout << "Usage: remove <user name>" << endl;
- continue;
- }
- string name = cmds[1];
- BuddyListEntry *entry = client->getBuddyList()->getBuddyByName( name );
- if(entry == NULL) {
- cout << "Noone with this name is in your buddy list ?" << endl;
- continue;
- }
- SendRemoveBuddyPacket removeBuddy;
- removeBuddy.userid = entry->userid;
- client->send( &removeBuddy );
- cout << "Sent Remove Buddy." << endl;
- }
-
- else {
- cout << "Unknown Command." << endl;
- }
- }
- }
- client->disconnect();
- delete client;
- client = 0;
- }
- string XFireTestClient::joinString(vector<string> s, int startindex, int endindex, string delimiter) {
- string ret;
- int max = (unsigned)endindex > s.size() || endindex < 0 ? s.size() : endindex;
- for(int i = startindex ; i < max ; i++) {
- if(i != startindex)
- ret += delimiter;
- ret += s[i];
- }
- return ret;
- }
- vector<string> XFireTestClient::explodeString(string s, string e) {
- vector<string> ret;
- int iPos = s.find(e, 0);
- int iPit = e.length();
- while(iPos > -1) {
- if(iPos != 0)
- ret.push_back(s.substr(0,iPos));
- s.erase(0,iPos+iPit);
- iPos = s.find(e,0);
- }
- if(s!="")
- ret.push_back(s);
- return ret;
- }
-
- void XFireTestClient::receivedPacket(XFirePacket *packet) {
- XFirePacketContent *content = packet->getContent();
- cout << "TestClient : Received Packet: " << content->getPacketId() << endl;
- switch(content->getPacketId()) {
- case XFIRE_LOGIN_FAILED_ID: {
- client->disconnect();
- delete client;
- client = 0;
- cout << "TestClient : Login failed." << endl;
- break;
- }
- case XFIRE_MESSAGE_ID: {
- cout << "TestClient : Got Message." << endl;
- if( (( MessagePacket*)content)->getMessageType() == 0){
- cout << "TestClient : Message is " << ((MessagePacket*)content)->getMessage() <<endl;
- BuddyListEntry *entry = client->getBuddyList()->getBuddyBySid( ((MessagePacket*)content)->getSid() );
- cout << "TestClient : from user " << entry->nick << "(" << entry->username << ")" <<endl;
- }
- break;
- }
- case XFIRE_RECV_OLDVERSION_PACKET_ID: {
- cout << "Testclient: Our protocol version is too old" << endl;
- break;
- }
- case XFIRE_PACKET_INVITE_REQUEST_PACKET: {
- cout << "Invitation Request: " << endl;
- InviteRequestPacket *invite = (InviteRequestPacket*)content;
- cout << " Name : " << invite->name << endl;
- cout << " Nick : " << invite->nick << endl;
- cout << " Message: " << invite->msg << endl;
- cout << " -- type 'accept' for accepting this request. (or 'accept "
- << invite->name << "' if you receive another invitation in the meantime." << endl;
- lastInviteRequest = new string(invite->name);
- break;
- }
- case XFIRE_OTHER_LOGIN:{
- client->disconnect();
- delete client;
- client = 0;
- cout << "TestClient : Someone loged in with our account.disconnect" << endl;
- break;
- }
- case XFIRE_BUDDYS_NAMES_ID: {
- printBuddyList();
- }
-default:
-cout << "nothing--------" << endl;
-break;
- }
-}
-
- void XFireTestClient::printBuddyList() {
- printf("Buddy List: (* marks online users)\n");
- printf("----------------- Buddy List --------------------------------------------------------\n");
- printf(" %20s | %20s | %10s | %20s | %7s | %7s\n","User Name", "Nick", "UserId", "Status Msg" ,"Gameid" ,"Gameid2" );
- vector<BuddyListEntry*> *entries = client->getBuddyList()->getEntries();
- for(uint i = 0 ; i < entries->size() ; i ++) {
- BuddyListEntry *entry = entries->at(i);
- printf("%1s %20s | %20s | %10ld | %20s | %7ld | %ld\n",
- (entry->isOnline() ? "*" : ""),
- entry->username.c_str(),
- entry->nick.c_str(),
- entry->userid,
- entry->statusmsg.c_str(),
- entry->game,
- entry->game2);
- }
- printf("-------------------------------------------------------------------------------------\n\n");
- }
-};
-
-using namespace std;
-using namespace xfirelib;
-using namespace xfirelibtest;
-
-int main(int argc, char **params) {
- if(argc < 3) {
- cout << "Usage: " << params[0] << " <username> <password>" << endl;
- return 0;
- }
- XFireTestClient *testClient = new
- XFireTestClient(string(params[1]),string(params[2]));
- try {
- testClient->run();
- } catch( exception e ) {
- cout << "Exception: " << e.what() << endl;
- }
- delete testClient;
- return 0;
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/testclient/test.h b/plugins/!NotAdopted/Xfire/xfiretest/testclient/test.h
deleted file mode 100644
index 55af5d6f4a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/testclient/test.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TEST_H
-#define __TEST_H
-
-#include <string>
-#include <vector>
-#include "../packetlistener.h"
-#include "../xfirepacket.h"
-#include "../client.h"
-#include "../inviterequestpacket.h"
-
-namespace xfirelibtest {
- using namespace std;
- using namespace xfirelib;
-
- class XFireTestClient : public PacketListener {
-
- public:
- XFireTestClient(string username, string password);
- ~XFireTestClient();
- void run();
-
- void receivedPacket(XFirePacket *packet);
-
- private:
- vector<string> explodeString(string s, string e);
- string joinString(vector<string> s, int startindex, int endindex=-1, string delimiter=" ");
- void printBuddyList();
-
- Client *client;
- string *lastInviteRequest;
-
- string username;
- string password;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp b/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp
deleted file mode 100644
index 44e755cd28..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp
+++ /dev/null
@@ -1,1077 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-#include "stdafx.h"
-
-#include <winsock2.h>
-#include "tools.h"
-#include "xdebug.h"
-
-extern HANDLE hNetlib;
-
-//convert buf to hexstring
-/*char* tohex(unsigned char*buf,int size) {
- static char buffer[1024*10]="";
-
- strcpy(buffer,"");
-
- for(int i=0;i<size;i++)
- {
- if(i%16==0&&i!=0)
- sprintf(buffer,"%s\n%02x ",buffer,buf[i]);
- else
- sprintf(buffer,"%s%02x ",buffer,buf[i]);
- }
-
- return buffer;
-}*/
-
-//von icqproto kopiert
-void EnableDlgItem(HWND hwndDlg, UINT control, int state)
-{
- EnableWindow(GetDlgItem(hwndDlg, control), state);
-}
-
-
-//eigene string replace funktion, da die von der std:string klasse immer abstürzt
-BOOL str_replace(char*src,char*find,char*rep)
-{
- string strpath = src;
- int pos = strpath.find(find);
-
- if(pos>-1)
- {
- char *temp=new char[strlen(src)+strlen(rep)+1];
-
- strcpy(temp,src);
- *(temp+pos)=0;
-
- strcat(temp,rep);
- strcat(temp,(src+pos+strlen(find)));
- strcpy(src,temp);
-
- delete temp;
-
- return TRUE;
- }
- return FALSE;
-}
-
-/* popup darstellen */
-int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hicon)
-{
- static signed char bUsePopups = -1;
- static BOOL bIconsNotLoaded = TRUE;
-
- static HICON hicNotify = NULL, hicWarning = NULL, hicError = NULL;
-
- if ((uType&MB_TYPEMASK) == MB_OK)
- {
- POPUPDATAEX ppd = {0};
-
- if (bIconsNotLoaded)
- {
- hicNotify = Skin_GetIcon("popup_notify");
- hicWarning = Skin_GetIcon("popup_warning");
- hicError = Skin_GetIcon("popup_error");
- bIconsNotLoaded = FALSE;
- }
-
- lstrcpynA(ppd.lpzContactName, lpCaption, sizeof(ppd.lpzContactName));
- lstrcpynA(ppd.lpzText, lpText, sizeof(ppd.lpzText));
-
- if ((uType&MB_ICONMASK) == MB_ICONSTOP)
- {
- ppd.lchIcon = hicError;
- ppd.colorBack = RGB(191,0,0);
- ppd.colorText = RGB(255,245,225);
- } else
- if ((uType&MB_ICONMASK) == MB_ICONWARNING)
- {
- ppd.lchIcon = hicWarning;
- ppd.colorBack = RGB(210,210,150);
- ppd.colorText = RGB(0,0,0);
- } else
- /* if ((uType&MB_ICONMASK) == MB_ICONINFORMATION) */
- {
- ppd.lchIcon = hicNotify;
- ppd.colorBack = RGB(230,230,230);
- ppd.colorText = RGB(0,0,0);
- }
-
- if(hicon!=NULL)
- ppd.lchIcon=hicon;
-
- PUAddPopUpEx(&ppd);
- }
-
- return IDOK;
-}
-
-char*menuitemtext(char*mtext)
-{
- static char temp[256]="";
- int anz=0;
- int j=0;
-
- if(!mtext)
- return NULL;
-
- int size=strlen(mtext);
-
- if(!size || size>255)
- return mtext;
-
- //alle & zeichen zählen
- for(int i=0;i<size;i++,j++)
- {
- temp[j]=mtext[i];
- if(mtext[i]=='&')
- {
- j++;
- temp[j]='&';
- }
- }
- //terminieren
- temp[j]=0;
-
- return temp;
-}
-
-void Message(LPVOID msg)
-{
- switch(DBGetContactSettingByte(NULL,protocolname,"nomsgbox",0))
- {
- case 1:
- return;
- case 2:
- displayPopup(NULL,(LPCSTR)msg,"Miranda XFire Protocol Plugin",MB_OK);
- return;
- }
-
- MSGBOXPARAMS mbp;
- mbp.cbSize=sizeof(mbp);
- mbp.hwndOwner=NULL;
- mbp.hInstance=hinstance;
- mbp.lpszText=(char*)msg;
- mbp.lpszCaption="Miranda XFire Protocol Plugin";
- mbp.dwStyle=MB_USERICON;
- mbp.lpszIcon=MAKEINTRESOURCE(IDI_TM);
- mbp.dwContextHelpId=NULL;
- mbp.lpfnMsgBoxCallback=NULL;
- mbp.dwLanguageId=LANG_ENGLISH;
- MessageBoxIndirect(&mbp);
- //MessageBoxA(0,(char*)msg,"Miranda XFire Protocol Plugin",MB_OK|MB_ICONINFORMATION);
-}
-
-void MessageE(LPVOID msg)
-{
- static BOOL already=FALSE;
- switch(DBGetContactSettingByte(NULL,protocolname,"nomsgbox",0))
- {
- case 0:
- if(!already)
- {
- already=TRUE; //keine doppelte fehlernachrichten
- Message(msg);
- already=FALSE;
- }
- break;
- case 2:
- displayPopup(NULL,(LPCSTR)msg,"Miranda XFire Protocol Plugin",MB_OK|MB_ICONSTOP);
- break;
- }
-}
-
-//funktion soll pfad erkennen und zurückgeben
-char* GetLaunchPath(char*launch)
-{
- static char temp[XFIRE_MAX_STATIC_STRING_LEN]="";
- char find[]=".exe "; //gesucht wird
- char * p = temp;
- char * f = find;
-
- if(launch==NULL)
- return temp;
-
- strcpy(temp,launch);
-
- while(*p!=0&&*f!=0)
- {
- if(tolower(*p)==*f)
- {
- f++;
- }
- else
- f=find;
-
- p++;
- }
-
- if(*f==0)
- {
- *p=0;
- }
- else
- return temp;
-
- if(strrchr(temp,'\\'))
- {
- *(strrchr(temp,'\\'))=0;
- }
-
- return temp;
-}
-//roll bits, vllt ein tickschneller als die funktionen von winsock
-unsigned short r(unsigned short data)
-{
- _asm {
- mov ax,data
- rol ax,8
- mov data,ax
- }
- return data;
-}
-
-//simple und hoffetnlich schnelle teamspeakdetection
-BOOL FindTeamSpeak(DWORD*pid,int*vid) {
- BOOL found=FALSE;
- if(pid==NULL)
- return FALSE;
-
- HANDLE hSnapShot = CreateToolhelp32Snapshot ( TH32CS_SNAPALL, 0);
- PROCESSENTRY32* processInfo = new PROCESSENTRY32;
- processInfo->dwSize = sizeof ( PROCESSENTRY32);
-
-// XFireLog("Scanning for voiceprograms ...");
-
-
- while ( Process32Next ( hSnapShot,processInfo ) != FALSE)
- {
- if(processInfo->th32ProcessID!=0) {
- int size=strlen(processInfo->szExeFile);
-
- if(size==13)
- {
- if((processInfo->szExeFile[0]=='T'||processInfo->szExeFile[0]=='t')&&
- processInfo->szExeFile[1]=='e'&&
- processInfo->szExeFile[2]=='a'&&
- processInfo->szExeFile[3]=='m'&&
- processInfo->szExeFile[4]=='S'&&
- processInfo->szExeFile[5]=='p'&&
- processInfo->szExeFile[6]=='e'&&
- processInfo->szExeFile[7]=='a'&&
- processInfo->szExeFile[8]=='k')
- {
- *pid=processInfo->th32ProcessID;
- found=TRUE;
- *vid=32;
- break;
- }
- }
- else if(size==12)
- {
- if((processInfo->szExeFile[0]=='V'||processInfo->szExeFile[0]=='v')&&
- processInfo->szExeFile[1]=='e'&&
- processInfo->szExeFile[2]=='n'&&
- processInfo->szExeFile[3]=='t'&&
- processInfo->szExeFile[4]=='r'&&
- processInfo->szExeFile[5]=='i'&&
- processInfo->szExeFile[6]=='l'&&
- processInfo->szExeFile[7]=='o')
- {
- *pid=processInfo->th32ProcessID;
- found=TRUE;
- *vid=33;
- break;
- }
- }
- else if(size==10)
- {
- if((processInfo->szExeFile[0]=='m'||processInfo->szExeFile[0]=='M')&&
- processInfo->szExeFile[1]=='u'&&
- processInfo->szExeFile[2]=='m'&&
- processInfo->szExeFile[3]=='b'&&
- processInfo->szExeFile[4]=='l'&&
- processInfo->szExeFile[5]=='e')
- {
- *pid=processInfo->th32ProcessID;
- found=TRUE;
- *vid=34;
- break;
- }
- }
- }
- }
- CloseHandle ( hSnapShot);
- return found;
-}
-
-//funktion wird in main gesetzt
-extern pGetExtendedUdpTable _GetExtendedUdpTable;
-
-
-#include <vector>
-
-#define maxuppackets 4
-
-//funktion liefer ip/port einer verbindung
-BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,char*ip2,char*ip3,char*ip4,long*port)
-{
- static std::vector<int> localport;
- static const int hdrInclude = 1;
- static int lastip=0;
- static int lastport=0;
- static int lastpid=0;
-
- //DUMP("***Suche IP/Port***","");
-
- //wenn die funktion nicht initialisiert werden konnte, könne wir nicht serverip und port rausbekommen
- if(_GetExtendedUdpTable==NULL)
- {
- XFireLog("no GetExtendedUdpTable function");
- return FALSE;
- }
-
- if(pid!=lastpid)
- {
- lastip=lastport=0;
- lastpid=pid;
- }
-
- DWORD size=0;
- MIB_UDPTABLE_OWNER_PID * ptab=NULL;
-
- _GetExtendedUdpTable(NULL,&size,FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
- ptab=(MIB_UDPTABLE_OWNER_PID*)malloc(size);
- int ret=_GetExtendedUdpTable(ptab,&size,FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
- //alle grad geöffnet updverb nach der pid vom spiel suchen, um an den port ranzukommen
- if(ret==NO_ERROR)
- {
- BOOL notfound=TRUE;
- for(unsigned int i=0;i<ptab->dwNumEntries;i++)
- {
- if(ptab->table[i].dwOwningPid==pid) //spiel gefunden
- {
- localport.push_back(ptab->table[i].dwLocalPort);
- //DUMP("Localport: %d",ptab->table[i].dwLocalPort);
- //localport=; //port wird gesichert
- //break; //wir brauchen nicht mehr suchen
- notfound=FALSE;
- }
- }
- if(notfound) //kein port gefunden
- {
- //DUMP("Kein Localport gefunden","");
- XFireLog("no local port found");
- return FALSE; //dann erstmal schluss
- }
- }
- else
- {
- XFireLog("GetExtendedUdpTable error!");
- return FALSE;
- }
-
- if(ptab) delete ptab; //speicher frei machn
-
-
- //socker erstellen
- SOCKET s;
- s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
- if(s==INVALID_SOCKET)
- {
- //DUMP("Kann Rawsocket nicht erstellen. Error: %d",WSAGetLastError());
- XFireLog("unable to create raw socket %d",WSAGetLastError());
- closesocket(s);
- return FALSE;
- }
-
- static struct sockaddr_in msockaddr;
- memset(&msockaddr,0,sizeof(msockaddr));
- msockaddr.sin_addr.s_addr = localaddr;
- msockaddr.sin_family = AF_INET;
- msockaddr.sin_port = 0;
-
- //socket an nw binden
- if (bind(s, (sockaddr *)&msockaddr, sizeof(msockaddr)) == SOCKET_ERROR)
- {
- //DUMP("Kann Rawsocket nicht binden. Error: %d",WSAGetLastError());
- XFireLog("unable to bind raw socket %d",WSAGetLastError());
- closesocket(s);
- return FALSE;
- }
-
- //wir wollen alles was da reinkommt haben
- static int I = 1;
- static DWORD b;
- if (WSAIoctl(s, _WSAIOW(IOC_VENDOR,1), &I, sizeof(I), NULL, NULL, &b, NULL, NULL) == SOCKET_ERROR)
- {
- //DUMP("IOCTL Error","");
- /*closesocket(s);
- return FALSE;*/
- XFireLog("IOCTL error %d",WSAGetLastError());
- //unter bestimmten umständen schlägt es hier fehl, dann lass trotzdem ip weiter erkennen
- }
-
- //socket soll timeout auswerfen, wenn nix kommt, damit der gamethread nicht hängt
- //DUMP("timeout>>>","");
- static int timeout=200;
- if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO,(char*)&timeout, sizeof(timeout) == SOCKET_ERROR))
- {
- XFireLog("setsockopt(SO_RCVTIMEO) error %d",WSAGetLastError());
- }
-
- //updstruct, nur mit wichtigen sachen
- struct mpacket {
- unsigned char ipv;
- char dmp[11]; //dummy
- //srcip, serverip
- unsigned char ip1;
- unsigned char ip2;
- unsigned char ip3;
- unsigned char ip4;
- //unsere nw
- unsigned int ipdst;
- char temp[1024];
- };
- struct mpacket2 {
- unsigned char ipv;
- char dmp[11]; //dummy
- //srcip, serverip
- unsigned long srcip;
- //server ip
- unsigned char ip1;
- unsigned char ip2;
- unsigned char ip3;
- unsigned char ip4;
- char temp[1024];
- };
- struct udp {
- //srcport
- u_short srcport;
- //dstport
- u_short dstport;
- };
-
- mpacket temp={0}; //empfamngsbuffer
- udp * temp2;
- char * temp3;
- mpacket2 * temp4;
-
- for (int I=0;I<maxuppackets;I++) //maximal 4 packete, das reicht
- {
- int msize=recv(s,(char*)&temp,sizeof(mpacket),0);
- if(msize) //empfangen
- {
- /*DUMP("Packet empfangen","");
- DUMP("Dump Full packet##############","");
- DUMP(tohex((unsigned char*)&temp,msize),"");
- DUMP("Dump Full packet##############","");
-
- DUMP("Headersize: %d",(temp.ipv & 0x0f)*4);*/
-
- temp3=(char*)&temp;
- temp3+=(temp.ipv & 0x0f)*4;
- temp2=(udp*)temp3;
- temp4=(mpacket2*)&temp;
-
- /*DUMP("Dump Udp##############","");
- DUMP(tohex((unsigned char*)temp2,sizeof(udp)),"");
- DUMP("Dump Udp##############","");*/
-
-
- for(unsigned int i = 0 ; i < localport.size() ; i++)
- {
- //DUMP("destport %d ==",temp2->dstport);
- //DUMP("== %d",localport.at(i));
- if(temp2->dstport==localport.at(i)/*FIX: für XP SP3 ->*/&&temp4->srcip!=localaddr) //ist das ziel des packets, gleich dem port des spiels
- {
- *port=r(temp2->srcport); //ja dann serverdaten an gamethread übermitteln
- *ip1=temp.ip1;
- *ip2=temp.ip2;
- *ip3=temp.ip3;
- *ip4=temp.ip4;
- closesocket(s); //socket zumachn
-
- //DUMP("SourceIP %d",temp4->srcip);
- //DUMP("SourcePort %d",temp2->srcport);
- if(lastip!=temp4->srcip||temp2->srcport!=lastport)
- {
- lastport=temp2->srcport; //fixed port wechsel, damit dieser auch mitgetielt wird, wenn zb vorher nur serverinfos angefordert wurden
- lastip=temp4->srcip;
- closesocket(s);
- //DUMP("IP gefunden","");
- XFireLog("got ip!");
- return TRUE;
- }
-
- XFireLog("no serverip found!");
- return FALSE;
- }
- /* else if(temp4->srcip==localaddr && temp2->srcport==localport.at(i)) //gesendete gamepackets
- {
- *port=r(temp2->dstport); //ja dann serverdaten an gamethread übermitteln
- *ip1=temp4->ip1;
- *ip2=temp4->ip2;
- *ip3=temp4->ip3;
- *ip4=temp4->ip4;
- closesocket(s); //socket zumachn
- return TRUE;
- }*/
- }
- }
- else if(msize==SOCKET_ERROR)
- {
- XFireLog("recv() error %d",WSAGetLastError());
- }
- }
- closesocket(s); //socket zumachn
- lastip=0;
- lastport=0;
- return TRUE;
-}
-
-//funktion liefert ip/port einer verbindung, dupliziert für teamspeak/ventrilo, wegen static vals
-//TODO: eventuell umbauen, damit es für beide genutzt werden kann
-BOOL GetServerIPPort2(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,char*ip2,char*ip3,char*ip4,long*port)
-{
- static std::vector<int> localport;
- static const int hdrInclude = 1;
- static int lastip=0;
- static int lastpid=0;
- static int lastport=0;
-
- //wenn die funktion nicht initialisiert werden konnte, könne wir nicht serverip und port rausbekommen
- if(_GetExtendedUdpTable==NULL)
- return FALSE;
-
- if(pid!=lastpid)
- {
- lastip=lastport=0;
- lastpid=pid;
- }
-
- DWORD size=0;
- MIB_UDPTABLE_OWNER_PID * ptab=NULL;
-
- _GetExtendedUdpTable(NULL,&size,FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
- ptab=(MIB_UDPTABLE_OWNER_PID*)malloc(size);
- int ret=_GetExtendedUdpTable(ptab,&size,FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
- //alle grad geöffnet updverb nach der pid vom spiel suchen, um an den port ranzukommen
- if(ret==NO_ERROR)
- {
- BOOL notfound=TRUE;
- for(unsigned int i=0;i<ptab->dwNumEntries;i++)
- {
- if(ptab->table[i].dwOwningPid==pid) //spiel gefunden
- {
- localport.push_back(ptab->table[i].dwLocalPort);
- //localport=; //port wird gesichert
- //break; //wir brauchen nicht mehr suchen
- notfound=FALSE;
- }
- }
- if(notfound) //kein port gefunden
- {
- if(lastip!=0)
- {
- lastip=0;
- lastport=0;
- return TRUE;
- }
- return FALSE; //dann erstmal schluss
- }
- }
- else
- return FALSE;
-
- if(ptab) delete ptab; //speicher frei machn
-
-
- //socker erstellen
- SOCKET s;
- s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
-
- static struct sockaddr_in msockaddr;
- memset(&msockaddr,0,sizeof(msockaddr));
- msockaddr.sin_addr.s_addr = localaddr;
- msockaddr.sin_family = AF_INET;
- msockaddr.sin_port = 0;
-
- //socket an nw binden
- if (bind(s, (sockaddr *)&msockaddr, sizeof(msockaddr)) == SOCKET_ERROR)
- {
- closesocket(s);
- return FALSE;
- }
-
- //wir wollen alles was da reinkommt haben
- static int I = 1;
- DWORD b;
- if (WSAIoctl(s, _WSAIOW(IOC_VENDOR,1), &I, sizeof(I), NULL, NULL, &b, NULL, NULL) == SOCKET_ERROR)
- {
- /*closesocket(s);
- return FALSE;*/
- //unter bestimmten umständen schlägt es hier fehl, dann lass trotzdem ip weiter erkennen
- }
-
- //socket soll timeout auswerfen, wenn nix kommt, damit der gamethread nicht hängt
- //DUMP("timeout>>>","");
- static int timeout=200;
- setsockopt(s, SOL_SOCKET, SO_RCVTIMEO,(char*)&timeout, sizeof(timeout));
-
- //updstruct, nur mit wichtigen sachen
- struct mpacket {
- unsigned char ipv;
- char dmp[11]; //dummy
- //srcip, serverip
- unsigned char ip1;
- unsigned char ip2;
- unsigned char ip3;
- unsigned char ip4;
- //unsere nw
- unsigned int ipdst;
- char temp[1024];
- };
- struct mpacket2 {
- unsigned char ipv;
- char dmp[11]; //dummy
- //srcip, serverip
- unsigned long srcip;
- //server ip
- unsigned char ip1;
- unsigned char ip2;
- unsigned char ip3;
- unsigned char ip4;
- char temp[1024];
- };
- struct udp {
- //srcport
- u_short srcport;
- //dstport
- u_short dstport;
- };
-
- mpacket temp={0}; //empfamngsbuffer
- udp * temp2;
- char * temp3;
- mpacket2 * temp4;
-
- for (int I=0;I<maxuppackets;I++) //maximal 4 packete, das reicht
- {
- int msize=recv(s,(char*)&temp,sizeof(mpacket),0);
- if(msize) //empfangen
- {
- temp3=(char*)&temp;
- temp3+=(temp.ipv & 0x0f)*4;
- temp2=(udp*)temp3;
- temp4=(mpacket2*)&temp;
-
- for(unsigned int i = 0 ; i < localport.size() ; i++)
- if(temp2->dstport==localport.at(i)/*FIX: für XP SP3 ->*/&&temp4->srcip!=localaddr) //ist das ziel des packets, gleich dem port des spiels
- {
- *port=r(temp2->srcport); //ja dann serverdaten an gamethread übermitteln
- *ip1=temp.ip1;
- *ip2=temp.ip2;
- *ip3=temp.ip3;
- *ip4=temp.ip4;
- closesocket(s); //socket zumachn
-
- if(lastip!=temp4->srcip||temp2->srcport!=lastport)
- {
- lastport=temp2->srcport; //fixed port wechsel, damit dieser auch mitgetielt wird, wenn zb vorher nur serverinfos angefordert wurden
- lastip=temp4->srcip;
- return TRUE;
- }
-
- return FALSE;
- }
- /* else if(temp4->srcip==localaddr && temp2->srcport==localport.at(i)) //gesendete gamepackets
- {
- *port=r(temp2->dstport); //ja dann serverdaten an gamethread übermitteln
- *ip1=temp4->ip1;
- *ip2=temp4->ip2;
- *ip3=temp4->ip3;
- *ip4=temp4->ip4;
- closesocket(s); //socket zumachn
- return TRUE;
- }*/
- }
- }
- closesocket(s); //socket zumachn
- lastip=0;
- lastport=0;
- return TRUE;
-}
-
-
-char * getItem(char * string,char delim,int count)
-{
- static char item[255];
- char i=0;
-
- while(*string!='\0'&&count>0)
- {
- if(*string==delim)
- {
- item[i]=0;
- i=0;
- count--;
- string++;
- }
- else {
- item[i]=*string;
- i++;
- string++;
- }
- }
- if(*string=='\0')
- item[i]=0;
- if(count>1)
- item[0]=0;
-
- for(unsigned int i=0;i<strlen(item);i++)
- {
- item[i]=tolower(item[i]);
- }
-
- return item;
-}
-
-// soll commandline der spiele prüfen
-//
-// TRUE bedeutet, entweder ok, oder konnte wegen systemfehler nicht geprüft werden
-// FALSE bedeutet beinhaltet nicht das, was es soll
-//
-// get process comamndline quelle hier:
-// http://forum.sysinternals.com/forum_posts.asp?TID=6510
-#define cb 1024
-
-pZwQueryInformationProcess _ZwQueryInformationProcess = NULL;
-//pZwClose _ZwClose = NULL;
-pZwReadVirtualMemory _ZwReadVirtualMemory = NULL;
-
-BOOL checkCommandLine(HANDLE hProcess,char * mustcontain,char * mustnotcontain)
-{
- WCHAR * buffer;
- char * buffer2;
- PPEB peb = NULL;
- PPROCESS_PARAMETERS proc_params = NULL;
- PVOID UserPool = (PVOID)LocalAlloc(LPTR, 8192);
- PROCESS_BASIC_INFORMATION ProcessInfo;
-
- //strings leer abbruch
- if(!mustcontain&&!mustnotcontain)
- return TRUE;
-
- //prüfe und lade nötige funktionen
- if(_ZwQueryInformationProcess==NULL)
- {
- _ZwQueryInformationProcess = (pZwQueryInformationProcess)GetProcAddress(GetModuleHandle( "ntdll.dll"), "ZwQueryInformationProcess");
- if(_ZwQueryInformationProcess==NULL)
- {
- return TRUE;
- }
- }
- if(_ZwReadVirtualMemory==NULL)
- {
- _ZwReadVirtualMemory = (pZwReadVirtualMemory)GetProcAddress(GetModuleHandle( "ntdll.dll"), "ZwReadVirtualMemory");
- if(_ZwReadVirtualMemory==NULL)
- {
- return TRUE;
- }
- }
-
- //commandline bekommen, siehe link oben
- ULONG rc = _ZwQueryInformationProcess(hProcess,ProcessBasicInformation,&ProcessInfo,sizeof(ProcessInfo),NULL);
-
- rc = _ZwReadVirtualMemory(hProcess,ProcessInfo.PebBaseAddress, UserPool, sizeof(PEB), NULL);
-
- peb = (PPEB)UserPool;
- rc = _ZwReadVirtualMemory(hProcess,peb->ProcessParameters,UserPool,sizeof(PROCESS_PARAMETERS),NULL);
-
- proc_params = (PPROCESS_PARAMETERS)UserPool;
- ULONG uSize = 0;
- LPVOID pBaseAddress = NULL;
-
- uSize = proc_params->CommandLine.Length;
- pBaseAddress = proc_params->CommandLine.Buffer;
-
- //keine commandline?!
- if(uSize==0||pBaseAddress==NULL)
- {
- LocalFree(UserPool);
- return FALSE;
- }
-
- buffer=(WCHAR*)new char[uSize];
-
- rc = _ZwReadVirtualMemory(hProcess, pBaseAddress, buffer, uSize, NULL);
-
- //in ansi umwandeln
- int correctsize=WideCharToMultiByte(CP_OEMCP, 0, buffer, -1, NULL, 0, NULL, NULL);
-
- if(correctsize==0)
- {
- LocalFree(UserPool);
- return FALSE;
- }
-
- buffer2=new char[correctsize];
- WideCharToMultiByte(CP_OEMCP, 0, buffer, -1, buffer2,correctsize,NULL,NULL);
- buffer2[correctsize-1]=0;
-
-
- for(unsigned int i=0;i<strlen(buffer2);i++)
- {
- buffer2[i]=tolower(buffer2[i]);
- }
-
- //lowercase mustcontain/mustnotcontain
- if(mustcontain)
- for(unsigned int i=0;i<strlen(mustcontain);i++)
- {
- mustcontain[i]=tolower(mustcontain[i]);
- }
- if(mustnotcontain)
- for(unsigned int i=0;i<strlen(mustnotcontain);i++)
- {
- mustnotcontain[i]=tolower(mustnotcontain[i]);
- }
-
- string cmdline=buffer2;
-
- if(mustcontain)
- if(cmdline.find(mustcontain)!=string::npos)
- {
- delete[] buffer;
- delete[] buffer2;
- LocalFree(UserPool);
- return TRUE;
- }
- else
- {
- delete[] buffer;
- delete[] buffer2;
- LocalFree(UserPool);
- return FALSE;
- }
-
- int count=1;
- if(mustnotcontain)
- {
- char*str=getItem(mustnotcontain,';',count);
- do {
- if(cmdline.find(str)!=string::npos)
- {
- delete[] buffer;
- delete[] buffer2;
- LocalFree(UserPool);
- return FALSE;
- }
- count++;
- str=getItem(mustnotcontain,';',count);
- }
- while(*str!=0);
- }
-
- //_ZwClose(hProcess);
- LocalFree(UserPool);
- delete[] buffer;
- delete[] buffer2;
-
- return TRUE;
-}
-
-#define RECV_BUFFER_SIZE 6144
-
-BOOL CheckWWWContent(char*address) {
- Netlib_Logf(hNetlib,"Check Url %s ...",address);
-
- //netlib request
- NETLIBHTTPREQUEST nlhr={0},*nlhrReply;
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType= REQUEST_HEAD;
- nlhr.flags = NLHRF_NODUMP|NLHRF_GENERATEHOST|NLHRF_SMARTAUTHHEADER;
- nlhr.szUrl = address;
-
- nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
- if(nlhrReply) {
- //nicht auf dem server
- Netlib_Logf(hNetlib,"Resultcode %d ...",nlhrReply->resultCode);
- if (nlhrReply->resultCode != 200) {
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- return FALSE;
- }
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- }
- else
- return FALSE;
-
- return TRUE;
-}
-
-
-BOOL GetWWWContent2(char*address,char*filename,BOOL dontoverwrite,char**tobuf,unsigned int* size) {
- if(dontoverwrite==TRUE)
- {
- if(GetFileAttributes(filename)!=0xFFFFFFFF)
- {
- Netlib_Logf(hNetlib,"%s already exists, no overwrite.",filename);
- return TRUE;
- }
- }
- Netlib_Logf(hNetlib,"Download Url %s ...",address);
-
- //netlib request
- NETLIBHTTPREQUEST nlhr={0},*nlhrReply;
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType= REQUEST_GET;
- nlhr.flags = NLHRF_NODUMP|NLHRF_GENERATEHOST|NLHRF_SMARTAUTHHEADER;
- nlhr.szUrl = address;
-
- nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
- if(nlhrReply) {
- //nicht auf dem server
- if (nlhrReply->resultCode != 200) {
- Netlib_Logf(hNetlib,"Bad statuscode: %d",nlhrReply->resultCode);
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- return FALSE;
- }
- //keine daten für mich
- else if (nlhrReply->dataLength < 1 || nlhrReply->pData == NULL)
- {
- Netlib_Logf(hNetlib,"No data received.");
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- return FALSE;
- }
- else
- {
- if(tobuf==NULL)
- {
- FILE * f = fopen(filename,"wb");
- if(f==NULL)
- {
- Netlib_Logf(hNetlib,"Cannot open %s for binary write mode.",filename);
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- return FALSE;
- }
- fwrite(nlhrReply->pData,nlhrReply->dataLength,1,f);
- fclose(f);
- }
- else
- {
- if(*tobuf==NULL)
- {
- *tobuf=new char[nlhrReply->dataLength+1];
- memcpy_s(*tobuf,nlhrReply->dataLength,nlhrReply->pData,nlhrReply->dataLength);
- //0 terminieren
- (*tobuf)[nlhrReply->dataLength]=0;
- //größe zurückliefern, wenn gewollt
- if(size)
- *size=nlhrReply->dataLength+1;
- }
- }
- }
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
- }
- else
- {
- Netlib_Logf(hNetlib,"No valid Netlib Request.",filename);
- return FALSE;
- }
- return TRUE;
-}
-//eigener www downloader, da winet exceptions erzeugt
-BOOL GetWWWContent(char*host,char* request,char*filename,BOOL dontoverwrite) {
- char add[1024]="http://";
- strcat(add,host);
- strcat(add,request);
-
- return GetWWWContent2(add,filename,dontoverwrite);
-}
-
-unsigned int getfilesize(char*path)
-{
- FILE * f = NULL;
- f=fopen(path,"rb");
- if(f==NULL)
- return 0;
- fseek (f, 0, SEEK_END);
- int size=ftell (f);
- fclose (f);
- return size;
-}
-
-//funktion soll erst in der userini suchen, danach in der xfire_games.ini
-DWORD xfire_GetPrivateProfileString(__in LPCTSTR lpAppName, __in LPCTSTR lpKeyName, __in LPCTSTR lpDefault, __out LPTSTR lpReturnedString, __in DWORD nSize, __in LPCTSTR lpFileName) {
- //xfire_games.ini
- int size=strlen(lpFileName);
- if(size>15)
- {
- char*file=(char*)lpFileName;
- int ret=0;
- *(file+size-14)='u';
- *(file+size-13)='s';
- *(file+size-12)='e';
- *(file+size-11)='r';
- ret = GetPrivateProfileString( lpAppName,lpKeyName,lpDefault,lpReturnedString,nSize,lpFileName);
- if(ret)
- {
- return ret;
- }
- else
- {
- *(file+size-14)='f';
- *(file+size-13)='i';
- *(file+size-12)='r';
- *(file+size-11)='e';
- return GetPrivateProfileString( lpAppName,lpKeyName,lpDefault,lpReturnedString,nSize,lpFileName);
- }
- }
- return GetPrivateProfileString( lpAppName,lpKeyName,lpDefault,lpReturnedString,nSize,lpFileName);
-}
-
-
-BOOL mySleep(int ms,HANDLE evt) {
- switch(WaitForSingleObject(evt,ms))
- {
- case WAIT_TIMEOUT:
- return FALSE;
- case WAIT_ABANDONED:
- //MessageBox(NULL,"Abbruch","Abbruch",0);
- return TRUE;
- default:
- return TRUE;
- }
-
- return FALSE;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/tools.h b/plugins/!NotAdopted/Xfire/xfiretest/tools.h
deleted file mode 100644
index ca0b906179..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/tools.h
+++ /dev/null
@@ -1,99 +0,0 @@
-
-#ifndef _TOOLS_H
-#define _TOOLS_H
-
-#include "baseProtocol.h"
-
-#include <m_popup.h>
-#include <string>
-using std::string;
-
-//****************************
-//get commandline header stuff
-//****************************
-typedef struct _UNICODE_STRING {
-USHORT Length;
-USHORT MaximumLength;
-PWSTR Buffer;
-} UNICODE_STRING;
-typedef UNICODE_STRING *PUNICODE_STRING;
-typedef enum _PROCESSINFOCLASS {
- ProcessBasicInformation
-} PROCESSINFOCLASS;
-typedef struct _PEB_LDR_DATA {
- BYTE Reserved1[8];
- PVOID Reserved2[3];
- LIST_ENTRY InMemoryOrderModuleList;
-} PEB_LDR_DATA,
- *PPEB_LDR_DATA;
-typedef struct _RTL_USER_PROCESS_PARAMETERS {
- BYTE Reserved1[16];
- PVOID Reserved2[10];
- UNICODE_STRING ImagePathName;
- UNICODE_STRING CommandLine;
-} RTL_USER_PROCESS_PARAMETERS,
- *PRTL_USER_PROCESS_PARAMETERS;
-typedef struct _PEB {
- BYTE Reserved1[2];
- BYTE BeingDebugged;
- BYTE Reserved2[1];
- PVOID Reserved3[2];
- PPEB_LDR_DATA Ldr;
- PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
- BYTE Reserved4[104];
- PVOID Reserved5[52];
- void* PostProcessInitRoutine;
- BYTE Reserved6[128];
- PVOID Reserved7[1];
- ULONG SessionId;
-} PEB,
- *PPEB;
-typedef struct
-{
-ULONG AllocationSize;
-ULONG ActualSize;
-ULONG Flags;
-ULONG Unknown1;
-UNICODE_STRING Unknown2;
-HANDLE InputHandle;
-HANDLE OutputHandle;
-HANDLE ErrorHandle;
-UNICODE_STRING CurrentDirectory;
-HANDLE CurrentDirectoryHandle;
-UNICODE_STRING SearchPaths;
-UNICODE_STRING ApplicationName;
-UNICODE_STRING CommandLine;
-PVOID EnvironmentBlock;
-ULONG Unknown[9];
-UNICODE_STRING Unknown3;
-UNICODE_STRING Unknown4;
-UNICODE_STRING Unknown5;
-UNICODE_STRING Unknown6;
-} PROCESS_PARAMETERS, *PPROCESS_PARAMETERS;
-typedef struct _PROCESS_BASIC_INFORMATION {
- PVOID Reserved1;
- PPEB PebBaseAddress;
- PVOID Reserved2[2];
- ULONG_PTR UniqueProcessId;
- PVOID Reserved3;
-} PROCESS_BASIC_INFORMATION;
-
-typedef ULONG (WINAPI *pZwQueryInformationProcess)(
- IN HANDLE ProcessHandle,
- IN PROCESSINFOCLASS ProcessInformationClass,
- OUT PVOID ProcessInformation,
- IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength OPTIONAL
-);
-typedef ULONG (WINAPI *pZwClose)(
- IN HANDLE Handle
-);
-typedef ULONG (WINAPI *pZwReadVirtualMemory)(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- OUT PULONG ReturnLength OPTIONAL
-);
-
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/true.ico b/plugins/!NotAdopted/Xfire/xfiretest/true.ico
deleted file mode 100644
index c49a58dfa5..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/true.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/userdetails.cpp b/plugins/!NotAdopted/Xfire/xfiretest/userdetails.cpp
deleted file mode 100644
index dab38f47b6..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/userdetails.cpp
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
- *
- * Copyright (C) 2010 by
- * dufte <dufte@justmail.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Based on J. Lawler - BaseProtocol
- * Herbert Poul/Beat Wolf - xfirelib
- *
- * Miranda ICQ: the free icq client for MS Windows
- * Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
- *
- */
-
-#include "stdafx.h"
-
-#include "baseProtocol.h"
-#include "Xfire_gamelist.h"
-#include <string>
-
-HWND ghwndDlg=NULL;
-extern HANDLE XFireWorkingFolder;
-extern Xfire_gamelist xgamelist;
-
-
-//als funktion, damit es per thread geladen werden kann
-void LoadProfilStatus(LPVOID lparam) {
- if(!lparam || !ghwndDlg)
- return;
-
- //dl
- char url[255]="http://miniprofile.xfire.com/bg/sh/type/1/";
- char* buf=NULL;
- unsigned int size=0;
- strcat_s(url,255,(char*)lparam);
- strcat_s(url,255,".png");
-
- //versuche das icon aus dem inet zulasen
- if(GetWWWContent2(url,NULL,FALSE,&buf,&size))
- {
- //aus dem buffer ein hicon erzeugen
- HBITMAP hbitmap=xgamelist.createHBITMAPfromdata(buf,size);
- //speicher freigeben
- delete[] buf;
- SendMessage(GetDlgItem(ghwndDlg,IDC_PROFILIMG),STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)hbitmap);
- }
- delete[] lparam;
-}
-
-void SetItemTxt(HWND hwndDlg,int feldid,char*feld,HANDLE hcontact,int type)
-{
- DBVARIANT dbv;
- if(!DBGetContactSetting(hcontact,protocolname,feld,&dbv)) {
- if(type==1)
- {
- char temp[255];
- sprintf(temp,"%i",dbv.wVal);
- SetDlgItemText(hwndDlg,feldid,temp);
- }
- else
- {
- SetDlgItemText(hwndDlg,feldid,dbv.pszVal);
- }
- DBFreeVariant(&dbv);
- EnableDlgItem(hwndDlg,feldid,TRUE);
- }
- else
- {
- SetDlgItemText(hwndDlg,feldid,Translate("<not specified>"));
- EnableDlgItem(hwndDlg,feldid,FALSE);
- }
-}
-
-static int GetIPPortUDetails(HANDLE wParam,char* feld1,char* feld2)
-{
- char temp[255];
- HGLOBAL clipbuffer;
- char* buffer;
-
- if(DBGetContactSettingWord((HANDLE)wParam, protocolname, feld2, -1)==0)
- return 0;
-
- DBVARIANT dbv;
- if(DBGetContactSettingTString((HANDLE)wParam, protocolname, feld1,&dbv))
- return 0;
-
- sprintf(temp,"%s:%d",dbv.pszVal,DBGetContactSettingWord((HANDLE)wParam, protocolname, feld2, -1));
-
- DBFreeVariant(&dbv);
-
- if(OpenClipboard(NULL))
- {
- EmptyClipboard();
-
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(temp)+1);
- buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(temp));
- GlobalUnlock(clipbuffer);
-
- SetClipboardData(CF_TEXT, clipbuffer);
- CloseClipboard();
- }
-
- return 0;
-}
-
-void addToList(HWND listbox,HANDLE hContact,char*key,char*val)
-{
- DBVARIANT dbv;
- if(!DBGetContactSetting(hContact,protocolname,val,&dbv))
- {
- LVITEM lvitem;
- memset(&lvitem,0,sizeof(lvitem));
- lvitem.mask=LVIF_TEXT;
- lvitem.cchTextMax=255;
- lvitem.iItem=0;
- lvitem.iSubItem=0;
- lvitem.pszText=key;
- SendMessageA(listbox,LVM_INSERTITEM,0,(LPARAM)&lvitem);
- lvitem.iSubItem++;
- lvitem.pszText=dbv.pszVal;
- SendMessageA(listbox,LVM_SETITEM,0,(LPARAM)&lvitem);
- DBFreeVariant(&dbv);
- }
-}
-
-void setGameInfo(HWND listbox,char *mbuf)
-{
- int ii=0;
- char temp[255];
- char mod=0;
- char item=0;
- char *mbuf2=(char*)mbuf;
- LVITEM lvitem;
- memset(&lvitem,0,sizeof(lvitem));
- lvitem.mask=LVIF_TEXT;
- lvitem.cchTextMax=255;
-
- while(*mbuf2!=0)
- {
- if(*mbuf2==1&&mod==0)
- {
- temp[ii]=0;
- mod=1;
- lvitem.iItem=item;
- lvitem.iSubItem=0;
- lvitem.pszText=temp;
- SendMessageA(listbox,LVM_INSERTITEM,0,(LPARAM)&lvitem);
- item++;
- ii=-1;
- }
- else if(*mbuf2==2&&mod==1)
- {
- temp[ii]=0;
- mod=0;
- lvitem.iSubItem++;
- lvitem.pszText=temp;
- SendMessageA(listbox,LVM_SETITEM,0,(LPARAM)&lvitem);
- ii=-1;
- }
- else
- temp[ii]=*mbuf2;
- mbuf2++;
- ii++;
- }
-}
-
-static BOOL CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static char path[XFIRE_MAX_STATIC_STRING_LEN]="";
- static WCHAR wpath[256];
- static HICON gameicon=0;
- static HICON voiceicon=0;
- static HANDLE uhandle=0;
- static HWND listbox;
- LVCOLUMN pcol;
-
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
-
- ghwndDlg=hwndDlg;
-
- listbox=GetDlgItem(hwndDlg,IDC_GAMEINFOLIST);
- pcol.mask=LVCF_WIDTH | LVCF_SUBITEM | LVCF_TEXT;
- pcol.pszText="Key";
- pcol.cx=65;
- pcol.fmt=LVCFMT_LEFT;
- SendMessageA(listbox,LVM_INSERTCOLUMNA,1,(LPARAM)&pcol);
- pcol.cx=80;
- pcol.pszText="Value";
- SendMessageA(listbox,LVM_INSERTCOLUMNA,2,(LPARAM)&pcol);
-
- HFONT hFont;
- LOGFONT lfFont;
-
- memset(&lfFont, 0x00, sizeof(lfFont));
- memcpy(lfFont.lfFaceName, TEXT("Arial"), 8);
-
- lfFont.lfHeight = 13;
- lfFont.lfWeight = FW_BOLD;
- lfFont.lfCharSet = ANSI_CHARSET;
- lfFont.lfOutPrecision = OUT_DEFAULT_PRECIS;
- lfFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
- lfFont.lfQuality = DEFAULT_QUALITY;
-
- // Create the font from the LOGFONT structure passed.
- hFont = CreateFontIndirect (&lfFont);
-
- SendMessageA(listbox,WM_SETFONT,(WPARAM)hFont,TRUE);
-
- return TRUE;
- }
- case WM_CTLCOLORSTATIC:
- {
- break;
- }
-
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->idFrom)
- {
-
- case 0:
- {
- switch (((LPNMHDR)lParam)->code)
- {
-
- case PSN_INFOCHANGED:
- {
- char* szProto;
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
- uhandle=hContact; //handle sichern
-
- if (hContact == NULL)
- szProto = protocolname;
- else
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
-
- if (szProto == NULL)
- break;
-
- //alle items aus der liste entfernen
- SendMessage(listbox,LVM_DELETEALLITEMS,0,0);
-
- if (hContact)
- {
- DBVARIANT dbv;
- if(!DBGetContactSetting(hContact,protocolname,"Username",&dbv))
- {
- int usernamesize=strlen(dbv.pszVal)+1;
- char* username=new char[usernamesize];
- if(username)
- {
- strcpy_s(username,usernamesize,dbv.pszVal);
- mir_forkthread(LoadProfilStatus,(LPVOID)username);
- }
- //LoadProfilStatus
- DBFreeVariant(&dbv);
- }
-
- if(!DBGetContactSetting(hContact,protocolname,"GameInfo",&dbv))
- {
- setGameInfo(listbox,dbv.pszVal);
- DBFreeVariant(&dbv);
- }
-
- addToList(listbox,hContact,"Servername","ServerName");
- addToList(listbox,hContact,"GameType","GameType");
- addToList(listbox,hContact,"Map","Map");
- addToList(listbox,hContact,"Players","Players");
-
- SetItemTxt(hwndDlg,IDC_DNICK,"Nick",hContact,0);
- SetItemTxt(hwndDlg,IDC_DUSERNAME,"Username",hContact,0);
-
- SetItemTxt(hwndDlg,IDC_GIP,"ServerIP",hContact,0);
- SetItemTxt(hwndDlg,IDC_VIP,"VServerIP",hContact,0);
- SetItemTxt(hwndDlg,IDC_GPORT,"Port",hContact,1);
- SetItemTxt(hwndDlg,IDC_VPORT,"VPort",hContact,1);
-
- SetItemTxt(hwndDlg,IDC_GAME,"RGame",hContact,0);
- SetItemTxt(hwndDlg,IDC_VNAME,"RVoice",hContact,0);
-
- //render icons
- {
- DBVARIANT dbv;
-
- if(!DBGetContactSetting(hContact,protocolname,"GameId",&dbv))
- {
- SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)xgamelist.iconmngr.getGameIcon(dbv.wVal),0);
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(hContact,protocolname,"VoiceId",&dbv))
- {
- SendMessage(GetDlgItem(hwndDlg,IDC_VOICEICO),STM_SETICON,(WPARAM)xgamelist.iconmngr.getGameIcon(dbv.wVal),0);
- DBFreeVariant(&dbv);
- }
-
- if(DBGetContactSetting(hContact,protocolname,"ServerIP",&dbv))
- {
- EnableWindow(GetDlgItem(hwndDlg,IDC_COPYGAME),FALSE);
- DBFreeVariant(&dbv);
- }
- if(DBGetContactSetting(hContact,protocolname,"VServerIP",&dbv))
- {
- EnableWindow(GetDlgItem(hwndDlg,IDC_COPYVOICE),FALSE);
- DBFreeVariant(&dbv);
- }
-
- //ShowWindow(GetDlgItem(hwndDlg,IDC_VOICEICO),FALSE)
- }
- }
- }
- break;
- }
- }
- break;
- }
- }
- break;
- case WM_COMMAND:
- {
- switch(wParam)
- {
- case IDC_COPYGAME:
- GetIPPortUDetails(uhandle,"ServerIP","Port");
- break;
- case IDC_COPYVOICE:
- GetIPPortUDetails(uhandle,"VServerIP","VPort");
- break;
- }
- }
- }
- return FALSE;
-}
-
-/*static BOOL CALLBACK DlgProcUserDetails2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- char profil[2056]="";
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- return TRUE;
- }
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->idFrom)
- {
- case 0:
- {
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_INFOCHANGED:
- {
- char* szProto;
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
-
- if (hContact == NULL)
- szProto = protocolname;
- else
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
-
- if (szProto == NULL)
- break;
-
- if (hContact) {
- DBVARIANT dbv;
-
- char img[256]="";
- char username[256]="";
- char nick[256]="";
- char status[256]="";
- char game[512]="";
- if(!DBGetContactSetting(hContact,"ContactPhoto","File",&dbv))
- {
- snprintf(img,256,"<img src=\"%s\">",dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(hContact,protocolname,"Username",&dbv))
- {
- snprintf(username,256,"<b>Username:</b> %s<br>",dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(hContact,protocolname,"Nick",&dbv))
- {
- snprintf(nick,256,"<b>Nick:</b> %s<br>",dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(hContact,protocolname,"XStatusMsg",&dbv))
- {
- snprintf(status,256,"<b>Status:</b> %s<br>",dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- if(!DBGetContactSetting(hContact,protocolname,"RGame",&dbv))
- {
- snprintf(game,512,"<fieldset style='border:1px solid #0091d5;background-color:#0d2c3e;margin-bottom:8px;'><legend>Spiel</legend><table><tr><td valign=top style='font-family:Arial;font-size:11px;color:#fff;'><b><u>%s</u></b></td></tr></table></fieldset>",dbv.pszVal);
- DBFreeVariant(&dbv);
- }
- snprintf(profil,2056,"mshtml:<div style='position:absolute;top:0;left:0;border:1px solid #0091d5;background-color:#000;padding:6px;width:334px;height:249px'><table><tr><td valign=top>%s</td><td valign=top style='font-family:Arial;font-size:11px;color:#fff;'>%s%s%s</td></tr><tr><td valign=top colspan=\"2\" style='font-family:Arial;font-size:11px;color:#fff;'>%s%s</td></tr></table></div>",img,username,nick,status,game);
- HWND hWnd = ::CreateWindow("AtlAxWin", profil,
- WS_CHILD|WS_VISIBLE, 0, 0, 334, 249, hwndDlg, NULL,
- ::GetModuleHandle(NULL), NULL);
- }
- }
- }
- }
- }
- }
- }
- return FALSE;
-}*/
-
-int OnDetailsInit(WPARAM wParam,LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = {0};
-
- if (!IsXFireContact((HANDLE)lParam))
- return 0;
-
- odp.cbSize = sizeof(odp);
- odp.hIcon = NULL;
- odp.hInstance = hinstance;
- odp.pfnDlgProc = DlgProcUserDetails;
- odp.position = -1900000000;
- odp.pszTemplate = MAKEINTRESOURCE(IDD_UD);
- odp.pszTitle = Translate("XFire");
- odp.pszGroup = NULL;
-
- CallService(MS_USERINFO_ADDPAGE,wParam,(LPARAM)&odp);
-
- return 0;
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/variables.cpp b/plugins/!NotAdopted/Xfire/xfiretest/variables.cpp
deleted file mode 100644
index d8479b7dc6..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/variables.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-//fürs varaibles händling - dufte
-#include "stdafx.h"
-
-#include "variables.h"
-#include <string>
-
-using namespace std;
-
-char* Varxfiregame(ARGUMENTSINFO *ai)
-{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- if(ai->fi->hContact==NULL)
- {
- //
- }
- else
- {
- char temp[256];
- DBVARIANT dbv3;
- if(!DBGetContactSetting(ai->fi->hContact,protocolname, "RGame",&dbv3))
- {
- strncpy(temp,dbv3.pszVal,255);
- DBFreeVariant(&dbv3);
- return mir_strdup(temp);
- }
- }
-
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-char* Varmyxfiregame(ARGUMENTSINFO *ai)
-{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- DBVARIANT dbv3;
- if(!DBGetContactSetting(NULL,protocolname, "currentgamename",&dbv3))
- {
- char* ret=mir_strdup(dbv3.pszVal);
- DBFreeVariant(&dbv3);
- return ret;
- }
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-char* Varxfirevoice(ARGUMENTSINFO *ai)
-{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- DBVARIANT dbv3;
- if(!DBGetContactSetting(ai->fi->hContact,protocolname, "RVoice",&dbv3))
- {
- char* ret=mir_strdup(dbv3.pszVal);
- DBFreeVariant(&dbv3);
- return ret;
- }
-
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-
-char* Varmyxfirevoiceip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- DBVARIANT dbv3;
- if(!DBGetContactSetting(NULL,protocolname, "VServerIP",&dbv3))
- {
- char* ret=mir_strdup(dbv3.pszVal);
- DBFreeVariant(&dbv3);
- return ret;
- }
-
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-char* Varmyxfireserverip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- DBVARIANT dbv3;
- if(!DBGetContactSetting(NULL,protocolname, "ServerIP",&dbv3))
- {
- char* ret=mir_strdup(dbv3.pszVal);
- DBFreeVariant(&dbv3);
- return ret;
- }
-
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-char* Varxfireserverip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- if(ai->fi->hContact==NULL)
- {
- ai->flags = AIF_FALSE;
- return mir_strdup("");
- }
- else
- {
- char temp[24];
- DBVARIANT dbv3;
- if(!DBGetContactSetting(ai->fi->hContact,protocolname, "ServerIP",&dbv3))
- {
- sprintf(temp,"%s:%d",dbv3.pszVal,DBGetContactSettingWord(ai->fi->hContact,protocolname, "Port",0));
- DBFreeVariant(&dbv3);
- return mir_strdup(temp);
- }
- ai->flags = AIF_FALSE;
- return mir_strdup("");
- }
-
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-char* Varxfirevoiceip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- if(ai->fi->hContact==NULL)
- {
- ai->flags = AIF_FALSE;
- return mir_strdup("");
- }
- else
- {
- char temp[24];
- DBVARIANT dbv3;
- if(!DBGetContactSetting(ai->fi->hContact,protocolname, "VServerIP",&dbv3))
- {
- sprintf(temp,"%s:%d",dbv3.pszVal,DBGetContactSettingWord(ai->fi->hContact,protocolname, "VPort",0));
- DBFreeVariant(&dbv3);
- return mir_strdup(temp);
- }
- ai->flags = AIF_FALSE;
- return mir_strdup("");
- }
-
- ai->flags = AIF_FALSE;
- return mir_strdup("");
-}
-
-char* Varmyxfirevoice(ARGUMENTSINFO *ai)
-{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
- return NULL;
-
- DBVARIANT dbv3;
- if(!DBGetContactSetting(NULL,protocolname, "currentvoicename",&dbv3))
- {
- char* ret=mir_strdup(dbv3.pszVal);
- DBFreeVariant(&dbv3);
- return ret;
- }
-
- return mir_strdup("");
-} \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/variables.h b/plugins/!NotAdopted/Xfire/xfiretest/variables.h
deleted file mode 100644
index 74a73b1176..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/variables.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "baseProtocol.h"
-#include "m_variables.h"
-
-char* Varxfiregame(ARGUMENTSINFO *ai);
-char* Varmyxfiregame(ARGUMENTSINFO *ai);
-char* Varmyxfirevoice(ARGUMENTSINFO *ai);
-char* Varxfireserverip(ARGUMENTSINFO *ai);
-char* Varxfirevoice(ARGUMENTSINFO *ai);
-char* Varxfirevoiceip(ARGUMENTSINFO *ai);
-char* Varmyxfirevoiceip(ARGUMENTSINFO *ai);
-char* Varmyxfireserverip(ARGUMENTSINFO *ai); \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/variablevalue.cpp b/plugins/!NotAdopted/Xfire/xfiretest/variablevalue.cpp
deleted file mode 100644
index 584f64412c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/variablevalue.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include <string>
-#include "variablevalue.h"
-#include "xdebug.h"
-
-#include "math.h" // for pow(..)
-
-namespace xfirelib {
-
-using namespace std;
-
- VariableValue::VariableValue() {
- value = 0;
- }
- VariableValue::~VariableValue() {
- if(value)
- delete[] value;
- }
-
- void VariableValue::setName(std::string name){
- this->name = name;
- }
-
- void VariableValue::setValueLength(int valueLength){
- this->valueLength = valueLength;
- }
-
- void VariableValue::setValue( char * value) {
- if(this->value) delete[] value;
- this->value = value;
- }
- void VariableValue::setValue( std::string value ) {
- const char *val = value.c_str();
- setValue( val, value.length() );
- }
- void VariableValue::setValue( const char *value, int valueLength ) {
- this->value = new char[valueLength];
- memcpy( this->value, value, valueLength );
- this->valueLength = valueLength;
- }
- void VariableValue::setValueFromLong( long value, int bytes ) {
- this->valueLength = bytes;
- this->value = new char[bytes];
- for(int i = 0 ; i < bytes ; i++) {
- this->value[i] = value % 256;
- value = value / 256;
- }
- }
-
- std::string VariableValue::getName(){
- return name;
- }
-
- int VariableValue::getValueLength(){
- return valueLength;
- }
-
- char* VariableValue::getValue(){
- return value;
- }
-
- long VariableValue::getValueAsLong() {
- long intVal = 0;
- for(int i = 0 ; i < valueLength ; i++) {
- intVal += ((unsigned char)value[i]) * myPow(256,i);
- }
- return intVal;
- }
-
- long VariableValue::myPow(int x, int y) {
- long r = 1;
- for(int i = 0 ; i < y ; i++) r *= x;
- return r;
- }
-
- int VariableValue::readName(char *packet, int index) {
- int read = 0;
- int nameLength = packet[index];
- read++;
- char* namestr=new char[nameLength+1];
- namestr[nameLength]=0;
- memcpy(namestr,packet+index+read,nameLength);
- name = string(namestr);
- read+=nameLength;
- return read;
- }
-
- int VariableValue::readValue(char *packet, int index, int length,int ignoreZeroAfterLength) {
- int read = 0;
- valueLength = length;
- if(valueLength < 0) {
- valueLength = (unsigned char)packet[index+read];read++;
- if(ignoreZeroAfterLength) read++;
- }
-
- if(value) delete[] value;
- value = new char[valueLength];
- memcpy(value,packet+index+read,valueLength);
- read+=valueLength;
-
- return read;
- }
-
-/*TODO: this cant work, attLength is always 0, needs to be fixed*/
-/* int VariableValue::readFixValue(char *packet, int index, int packetLength, int valueLength) {
- VariableValue *value = this;
- int nameLength = packet[index];
-
- int i = 1;
- int attLengthLength = 0;
- int attLength = 0;
- string name;
-
- for(; i <= nameLength;i++){
- name += packet[index+i];
- }
- value->setName(name);
- index += i;
- index++; //ignore next value
-
- value->setValueLength(valueLength);
-
- char *att = new char[attLength];
- index += i+1;
- for(i = 0; i < attLength;i++){
- att[i] = packet[index+i];
- }
- index += i;
- value->setValue(att);
- return index;
- }*/
-
-
- int VariableValue::readVariableValue(char *packet, int index, int packetLength){
- VariableValue *value = this;
- int nameLength = packet[index];
-
- int i = 1;
- int attLengthLength = 0;
- int attLength = 0;
- string name;
-
- for(; i <= nameLength;i++){
- name += packet[index+i];
- }
- value->setName(name);
-
- index += i;
- attLengthLength = packet[index];
- index++;
-
- for(i = 0; i < attLengthLength;i++){
- attLength += (unsigned char)packet[index+i];/*todo: make it work if length is longer than 1 byte*/
- }
- value->setValueLength(attLength);
-
- char *att = new char[attLength];
- index += i+1;
- for(i = 0; i < attLength;i++){
- att[i] = packet[index+i];
- }
- value->setValue(att);
- index += i;
- return index;
- }
-
-
-
-
- int VariableValue::writeName(char *buf, int index) {
- int len = name.length();
- buf[index] = len;
- memcpy(buf+index+1,name.c_str(),len);
- return len+1;
- }
- int VariableValue::writeValue(char *buf, int index) {
- memcpy(buf+index,value,valueLength);
- return valueLength;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/variablevalue.h b/plugins/!NotAdopted/Xfire/xfiretest/variablevalue.h
deleted file mode 100644
index 8282f47cbf..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/variablevalue.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <string>
-
-#ifndef __VARIABVLEVALUE_H
-#define __VARIABVLEVALUE_H
-
-namespace xfirelib {
-
-class VariableValue {
- public:
- VariableValue();
- ~VariableValue();
-
- void setName(std::string name);
- void setValueLength(int valueLength);
- void setValue( char * value );
- void setValue( std::string value );
- void setValue( const char *value, int valueLength );
- void setValueFromLong( long value, int bytes );
- std::string getName();
- int getValueLength();
- char* getValue();
-
- int readName(char *packet, int index);
- int readValue(char *packet, int index, int length = -1, int ignoreZeroAfterLength = 0);
- int readVariableValue(char *packet, int index, int packetLength);
- /*TODO: disabled because of a bug in this method*/
- //int VariableValue::readFixValue(char *packet, int index, int packetLength, int valueLength);
-
- int writeName(char *buf, int index);
- int writeValue(char *buf, int index);
-
- long getValueAsLong();
- private:
- long myPow(int x, int y);
-
- std::string name;
- char *value;
- int valueLength;
-};
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/x_fire16x16.ico b/plugins/!NotAdopted/Xfire/xfiretest/x_fire16x16.ico
deleted file mode 100644
index b93f1bef0c..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/x_fire16x16.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xdebug.h b/plugins/!NotAdopted/Xfire/xfiretest/xdebug.h
deleted file mode 100644
index ffc17b8095..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xdebug.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __XDEBUG_H
-#define __XDEBUG_H
-
-#define RESET 0
-
-#define BLACK 0
-#define RED 1
-#define GREEN 2
-#define YELLOW 3
-#define WHITE 7
-#include <stdio.h>
-//#include <pthread.h>
-
-//#define XFIRELIBDEBUG
-
-#ifndef XFIRELIBDEBUG
-
-#define XDEBUGS(args);
-#define XDEBUG(args) ;
-#define XDEBUG2(args,args2) ;
-#define XDEBUG3(args,args2,args3) ;
-#define XDEBUG4(args,args2,args3,args4) ;
-#define XDEBUG5(args,args2,args3,args4,args5) ;
-#define XDEBUG6(args,args2,args3,args4,args5,args6) ;
-#define DUMPPACKET(args) ;
-
-#define XINFO(args) ;
-#define XINFO2(args,args2) ;
-#define XINFO3(args,args2,args3) ;
-
-#define XERROR(args) ;
-#define XERROR2(args,args2) ;
-#define XERROR3(args,args2,args3) ;
-
-/*#define DUMP(args,args2) { FILE* errorfile=fopen("C:\\XFireDump.log","a"); \
- fprintf(errorfile,args,args2); \
- fprintf(errorfile,"\n",""); \
- fclose(errorfile); }\*/
-
-/*#define XFireLog(args,args2) { FILE* errorfile=fopen("C:\\XFireDump.log","a"); \
- fprintf(errorfile,args,args2); \
- fprintf(errorfile,"\n",""); \
- fclose(errorfile); }\*/
-
-/*#define XFireLog(args,args2) { \
- char temp[266]; \
- sprintf(temp,args,args2); \
- MessageBoxA(NULL,temp,temp,0); }\*/
-
-#endif
-
-#ifdef XFIRELIBDEBUG
-
-#define XDEBUGS(args) { FILE* errorfile=fopen("XFire.log","wb"); \
- fprintf(errorfile,args); \
- fclose(errorfile); }\
-
-#define DUMPPACKET(args) { FILE* dumpfile=fopen(args,"wb"); \
- fwrite(buf,length,1,dumpfile); \
- fclose(dumpfile); }\
-
-
-#define XDEBUG(args) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args); \
- fclose(errorfile); }\
-
- #define XDEBUG2(args,args2) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2); \
- fclose(errorfile); } \
-
-
- #define XDEBUG3(args,args2,args3) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2,args3); \
- fclose(errorfile); } \
-
- #define XDEBUG4(args,args2,args3,args4) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2,args3,args4); \
- fclose(errorfile); } \
-
- #define XDEBUG5(args,args2,args3,args4,args5) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2,args3,args4,args5); \
- fclose(errorfile); } \
-
- #define XDEBUG6(args,args2,args3,args4,args5,args6) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2,args3,args4,args5,args6); \
- fclose(errorfile); } \
-
-
-#define XINFO(args) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args); \
- fclose(errorfile); }\
-
- #define XINFO2(args,args2) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2); \
- fclose(errorfile); } \
-
-
- #define XINFO3(args,args2,args3) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2,args3); \
- fclose(errorfile); } \
-
-
-#define XERROR(args) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args); \
- fclose(errorfile); }\
-
- #define XERROR2(args,args2) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2); \
- fclose(errorfile); } \
-
-
- #define XERROR3(args,args2,args3) { FILE* errorfile=fopen("XFire.log","a"); \
- fprintf(errorfile,args,args2,args3); \
- fclose(errorfile); } \
-
-
-
-
-
-
-
-
-
-#endif
-#endif \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfire away.ico b/plugins/!NotAdopted/Xfire/xfiretest/xfire away.ico
deleted file mode 100644
index cf473325cf..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfire away.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfire offline.ico b/plugins/!NotAdopted/Xfire/xfiretest/xfire offline.ico
deleted file mode 100644
index 008dd67e40..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfire offline.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfire online.ico b/plugins/!NotAdopted/Xfire/xfiretest/xfire online.ico
deleted file mode 100644
index 545aca993a..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfire online.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.cpp
deleted file mode 100644
index c26577fae1..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xfireclanpacket.h"
-#include "variablevalue.h"
-#include <string>
-
-namespace xfirelib {
- using namespace std;
-
- void XFireClanPacket::parseContent(char *buf, int nlength, int numberOfAtts) {
- VariableValue val;
- int index = 0;
- int length = 0;
- string stringvalue;
-
- index += 3; // ersten 5 bytes skippen
-
- this->count=(char)buf[index];
-
- index += 2;
-
- for(int i=0;i<this->count;i++)
- {
- index += val.readValue(buf,index,2); //clanid lesen
- this->clanid[i] = val.getValueAsLong();
- index += 2;
- }
-
- index += 5; // 7 bytes skippen
-
- for(int i=0;i<this->count;i++)
- {
- length = (unsigned char)buf[index++]; //clannamen lesen
- index++;
- index += val.readValue(buf,index,length);
- stringvalue = string(val.getValue(),length);
-
- this->name[i] = stringvalue;
- }
-
- index += 5; // 5 skippen
-
- for(int i=0;i<this->count;i++)
- {
- length = (unsigned char)buf[index++]; //url anhängsel auslesen
- index++;
- index += val.readValue(buf,index,length);
- stringvalue = string(val.getValue(),length);
-
- this->url[i] = stringvalue;
- }
-
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.h
deleted file mode 100644
index 7e5b1bc843..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireclanpacket.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __XFIRECLANPACKET_H
-#define __XFIRECLANPACKET_H
-
-#include <string>
-#include "xfirerecvpacketcontent.h"
-
-#define XFIRE_CLAN_PACKET 158
-
-namespace xfirelib {
- using namespace std;
-
- /**
- * beinhaltet, clanid, name und weburl-zusatz
- *
- */
- class XFireClanPacket : public XFireRecvPacketContent {
- public:
- XFirePacketContent* newPacket() { return new XFireClanPacket(); }
-
-
- int getPacketId() { return XFIRE_CLAN_PACKET; }
- int getPacketContent(char *buf) { return 0;}
- int getPacketAttributeCount() { return 3; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- string name[10];
- string url[10];
- long clanid[10];
- int count;
-
- private:
- };
-
-};
-
-
-#endif
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.cpp
deleted file mode 100644
index dacae8f885..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include <vector>
-#include <string>
-
-#include "xfirefoundbuddys.h"
-#include "xfireparse.h"
-#include "variablevalue.h"
-#include "xdebug.h"
-
-namespace xfirelib {
- using namespace std;
-
- XFireFoundBuddys::XFireFoundBuddys() {
- usernames = 0;
- fname = 0;
- lname = 0;
- }
- XFireFoundBuddys::~XFireFoundBuddys() {
- delete usernames;
- delete fname;
- delete lname;
- }
-
- void XFireFoundBuddys::parseContent(char *buf, int length, int numberOfAtts) {
- int index = 0;
-
- VariableValue bs;
-
- XDEBUG2( "Len: %ld\n", length );
-
- XDEBUG2( "Byte1: %ld\n", (char)buf[index] );
- XDEBUG2( "Byte2: %ld\n", (char)buf[index+1] );
- XDEBUG2( "Byte3: %ld\n", (char)buf[index+2] );
-
- usernames = new vector<string>;
- index = readStrings(usernames,buf,index);
-
- fname = new vector<string>;
- index = readStrings(fname,buf,index);
-
- lname = new vector<string>;
- index = readStrings(lname,buf,index);
-
- }
-
- int XFireFoundBuddys::readStrings(vector<string> *strings, char *buf, int index) {
- VariableValue friends;
- index+=friends.readName(buf,index);
- index ++; // Ignore 04
- index ++; // Ignore 01
-
- index+=friends.readValue(buf,index,2);
-
- int numberOfStrings = friends.getValueAsLong();
- XDEBUG3( "name: %s numberOfStrings: %d\n", friends.getName().c_str(), numberOfStrings );
- for(int i = 0 ; i < numberOfStrings ; i++) {
- XDEBUG2( "Index: %ld\n", index );
- int length = (unsigned char)buf[index++];
- index++;
- index += friends.readValue(buf,index,length);
- string stringvalue = string(friends.getValue(),length);
- strings->push_back(stringvalue);
- XDEBUG3( "String length: %2d : %s\n", length, stringvalue.c_str() );
- }
- return index;
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.h b/plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.h
deleted file mode 100644
index 70d44f201b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirefoundbuddys.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//packet wird empfangen, wenn man eine buddysuche gestartet hat
-
-#ifndef __XFIREFOUNDBUDDYS_H
-#define __XFIREFOUNDBUDDYS_H
-
-#define XFIRE_FOUNDBUDDYS_ID 0x8f
-
-#include <vector>
-#include <string>
-
-#include "xfirerecvpacketcontent.h"
-#include "variablevalue.h"
-
-
-namespace xfirelib {
- using namespace std;
-
- class XFireFoundBuddys : public XFireRecvPacketContent {
- public:
- XFireFoundBuddys();
- virtual ~XFireFoundBuddys();
-
- XFirePacketContent* newPacket() { return new XFireFoundBuddys(); }
-
- int getPacketId() { return XFIRE_FOUNDBUDDYS_ID; }
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; };
- int getPacketSize() { return 1024; };
- void parseContent(char *buf, int length, int numberOfAtts);
-
- //private:
- int readStrings(vector<string> *strings, char *buf, int index);
-
- vector<string> *usernames;
- vector<string> *fname;
- vector<string> *lname;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiregame.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfiregame.cpp
deleted file mode 100644
index e9b0e869bf..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiregame.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xfiregame.h"
-
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiregame.h b/plugins/!NotAdopted/Xfire/xfiretest/xfiregame.h
deleted file mode 100644
index b8293750ad..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiregame.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef __XFIREGAME_H
-#define __XFIREGAME_H
-
-#include <string>
-
-namespace xfirelib {
-
- class XFireGame {
- public:
- virtual ~XFireGame() { }
- virtual int getGameId() = 0;
- virtual std::string getGameName() = 0;
- };
-
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.cpp
deleted file mode 100644
index af7b67f799..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xfiregameresolver.h"
-
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.h b/plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.h
deleted file mode 100644
index 1215550009..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiregameresolver.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __XFIREGAMERESOLVER_H
-#define __XFIREGAMERESOLVER_H
-
-#include "buddylistgamespacket.h"
-#include "xfiregame.h"
-#include <string>
-
-namespace xfirelib {
- /**
- * This is a virtual class which users of the library can
- * subclass so they can use their own gameid <-> XFireGame object
- * resolver (Implementors might want to consider that their application
- * also requires backward converting .. from game to gameid since
- * SendGameStatusPacket requires a gameid.
- */
- class XFireGameResolver {
- public:
- virtual ~XFireGameResolver() { }
-
- /**
- * this method should resolve the gameid
- * and return a new XFireGame object or NULL if it was not resolvable.
- * (if more information is needed, it can be taken from packet->xxx[iterator])
- */
- virtual XFireGame *resolveGame(int gameid, int iterator, BuddyListGamesPacket *packet) = 0;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.cpp
deleted file mode 100644
index 955881863f..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include <iostream>
-#include <stdlib.h>
-#include <string.h>
-#include "xfirepacket.h"
-
-#include "xdebug.h"
-
-#include "socketexception.h"
-
-namespace xfirelib {
- using namespace std;
-
- XFirePacket::XFirePacket(PacketReader *reader) {
- this->reader = reader;
- this->content = NULL;
- }
- XFirePacket::XFirePacket(XFirePacketContent *content) {
- this->content = content;
- this->reader = NULL;
- }
-
- XFirePacket::~XFirePacket() {
- }
-
-
- void XFirePacket::recvPacket(Socket *socket) {
- char buf[5];
- //char temp[255];
- int nlen=0;
- //FILE* f2;
-
- if(socket==NULL) return;
-
- int r = socket->recv( buf, 5 );
- int missingbytes=5-r;
- if(missingbytes != 0) {
- XERROR3("Returned only %d bytes try last %d bytes again ?!: \n",r,missingbytes);
- r+= socket->recv( &buf[r], missingbytes );
- }
- if(r != 5) {
- XERROR2("Returned less than 5 ?!: %d\n",r);
- throw SocketException("Connection Closed ?");
- }
- XDEBUG2("Read %d bytes ...\n", r );
- unsigned int len = ((unsigned char)buf[0]) + (((unsigned char)buf[1]) * 256);
-
- int packetid = buf[2];
- int numberOfAtts = (unsigned char)buf[4];
-
- char* contentbuf=new char[len-5];
- XDEBUG2("calling socket->recv(contentbuf,%d)\n",len-5);
- int r2 = socket->recv( contentbuf, len-5 );
-
-
- char* ncontentbuf=contentbuf+r2;
- int nsize=len-5-r2;
- int dummyi=0;
- //packet solang auslesen, bis fertig - dufte
- while(nsize>0)
- {
- dummyi++;
- XDEBUG2("nsize: %d\n", nsize);
- r2=socket->recv( ncontentbuf, nsize );
- ncontentbuf=ncontentbuf+r2;
- nsize-=r2;
- XDEBUG5("packetid: %d numberOfAtts: %d length: %d Got: %d\n", (unsigned char)packetid,numberOfAtts,len-5,len-5-nsize);
- }
-
- XDEBUG5("packetid: %d numberOfAtts: %d length: %d Got: %d\n", (unsigned char)packetid,numberOfAtts,len-5,r2);
-
- if(r2 < 1) return;
-
- /*if((unsigned char)packetid==131)
- {
- sprintf(temp,"packet%d_%d.dmp",(unsigned char)packetid,rand());
- f2=fopen(temp,"wb");
- fwrite(contentbuf,1,len-5,f2);
- fclose(f2);
- }*/
-
- XFirePacketContent *contentClass = reader->getPacketContentClass( (unsigned char)packetid );
-
- //sprintf(temp,"packet%d.dmp",(unsigned char)packetid);
-
- if(contentClass == NULL) {
- /*sprintf(temp,"packet%d.dmp",(unsigned char)packetid);
- f2=fopen(temp,"wb");
- fwrite(contentbuf,1,len-5,f2);
- fclose(f2);*/
- XERROR2("NO SUCH CONTENT PACKET (%d) :(\n", (unsigned char)packetid);
- return;
- }
- XDEBUG(("Creating ContentClass Instance\n"));
- content = contentClass->newPacket();
-
- XDEBUG(("Parse Content\n"));
- //statt r2 wird jetzt die komplette länge des packets genommen, also len-5 dufte
- content->parseContent(contentbuf, len-5, numberOfAtts);
- }
-
- void XFirePacket::sendPacket(Socket *socket) {
- int size = content->getPacketSize();
- char *buf = (char*)malloc(size * sizeof(char));
- XDEBUG3("Allocated %d characters (%d)\n", size, sizeof(char));
- int rsize = content->getPacketContent( buf );
- XDEBUG2("Real Size: %d\n", rsize);
- int realsize = rsize + 5;
- char *sendbuf = (char*)malloc(realsize * sizeof(char));
- sendbuf[0] = realsize % 256;
- sendbuf[1] = (int)realsize / 256;
- sendbuf[2] = content->getPacketId();
- XDEBUG2("Send Content Id: %d\n", content->getPacketId());
- sendbuf[3] = 0;
- sendbuf[4] = content->getPacketAttributeCount();
- memcpy( sendbuf + 5, buf, rsize );
-
- socket->send( sendbuf, realsize );
-
- free(buf); free(sendbuf);
- }
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.h b/plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.h
deleted file mode 100644
index c7b938e2f9..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacket.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __XFIREPACKET_H
-#define __XFIREPACKET_H
-
-#include "packetreader.h"
-#include "xfirepacketcontent.h"
-
-namespace xfirelib {
- struct PacketReader;
- struct XFirePacketContent;
-
- class XFirePacket {
- public:
- XFirePacket(PacketReader *reader);
- XFirePacket(XFirePacketContent *content);
- ~XFirePacket();
-
- int getSendBuffer(void *buf);
- void recvPacket(Socket *socket);
- void sendPacket(Socket *socket);
- void sendPacket2(Socket *socket);
-
- XFirePacketContent *getContent() { return content; }
- private:
- PacketReader *reader;
-
- XFirePacketContent *content;
- };
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.cpp
deleted file mode 100644
index 87a7778357..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "stdafx.h"
-
-#include "xfirepacketcontent.h"
-
-namespace xfirelib {
- XFirePacketContent::XFirePacketContent() : MonitoredObj( ) {
- }
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.h b/plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.h
deleted file mode 100644
index abb894f5fc..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirepacketcontent.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __XFIREPACKETCONTENT_H
-#define __XFIREPACKETCONTENT_H
-
-#include "monitoredobj.h"
-
-namespace xfirelib {
- struct Client;
-
- class XFirePacketContent : public MonitoredObj {
- public:
- XFirePacketContent();
- virtual ~XFirePacketContent() { }
- virtual XFirePacketContent* newPacket() = 0;
-
- virtual int getPacketContent(char *buf) = 0;
- virtual int getPacketId() = 0;
- virtual int getPacketAttributeCount() = 0;
- virtual int getPacketSize() = 0;
- virtual void parseContent(char *buf, int length, int numberOfAtts) = 0;
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireparse.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfireparse.cpp
deleted file mode 100644
index e286e14df0..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireparse.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xfireparse.h"
-namespace xfirelib {
-
-using namespace std;
-
-XFireParse::XFireParse() {
-}
-
-
-/*void XFireParse::readVariableAttribut( char *value, char *packet, char *attr,int packet_length,int attr_length, int start,int max_length ) {
-int length_index = findString2(packet,attr, packet_length,strlen(attr),start)+attr_length+1;
-
- unsigned int length = xfire_hex_to_intC(packet[length_index]);
-
- if(max_length >= length){
- memcpy(value,packet+length_index+2,length);
- }
- if(max_length > length){
- memset(value+length,0,1);
- }
- return length_index+2+length;
-}*/
-
-
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireparse.h b/plugins/!NotAdopted/Xfire/xfiretest/xfireparse.h
deleted file mode 100644
index e03e814a6e..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireparse.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#ifndef __XFIREPARSE_H
-#define __XFIREPARSE_H
-#include "variablevalue.h"
-namespace xfirelib {
-
-class XFireParse {
- public:
- XFireParse();
-};
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.cpp
deleted file mode 100644
index 6afc613fed..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-#include "xfireprefpacket.h"
-#include <string.h>
-#include <iostream>
-
-namespace xfirelib {
- using namespace std;
-
- int XFirePrefPacket::getPacketContent(char *packet) {
- int index = 0;
-
- VariableValue val;
- val.setName( "prefs" );
- index += val.writeName( packet, index );
- packet[index++] = 0x09;
- packet[index++] = 0x00;
-
- length = index;
- return index;
- }
-
- int XFirePrefPacket::getPacketAttributeCount() {
- return 1;
- }
-
-}
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.h b/plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.h
deleted file mode 100644
index f4e1709357..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireprefpacket.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * dufte <dufte@justmail.de>
- *
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//prefrencespacket, steuert wohl die persönlichen einstellungen
-
-#ifndef __XFIREPREFPACKET_H
-#define __XFIREPREFPACKET_H
-
-#include "xfiresendpacketcontent.h"
-#include "variablevalue.h"
-
-#include <string>
-
-namespace xfirelib {
-
- class XFirePrefPacket : public XFireSendPacketContent {
- public:
- XFirePacketContent* newPacket() { return new XFirePrefPacket(); }
-
- int getPacketId() { return 10; }
- int getPacketContent(char *buf);
- int getPacketAttributeCount();
- int getPacketSize() { return 1000; };
- void parseContent(char *buf, int length, int numberOfAtts) { };
- private:
- int length;
- };
-
-};
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.cpp
deleted file mode 100644
index 5abc70aa6b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xfirerecvpacketcontent.h"
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.h b/plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.h
deleted file mode 100644
index 2ca2aca424..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfirerecvpacketcontent.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef __XFIRERECVPACKETCONTENT_H
-#define __XFIRERECVPACKETCONTENT_H
-
-#include "xfirepacketcontent.h"
-
-namespace xfirelib {
-
- class XFireRecvPacketContent : public XFirePacketContent {
- public:
- XFireRecvPacketContent() : XFirePacketContent() { }
- virtual ~XFireRecvPacketContent() { }
-
- int getPacketContent(char *buf) { return 0; }
- int getPacketAttributeCount() { return 0; }
- int getPacketSize() { return 0; }
- };
-
-};
-
-
-#endif
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.cpp
deleted file mode 100644
index b743092973..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xfiresendpacketcontent.h"
-
-
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.h b/plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.h
deleted file mode 100644
index 7ce106d295..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiresendpacketcontent.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __XFIRESENDPACKETCONTENT_H
-#define __XFIRESENDPACKETCONTENT_H
-
-#include "xfirepacketcontent.h"
-
-namespace xfirelib {
-
- class XFireSendPacketContent : public XFirePacketContent {
- public:
- /**
- * This method is not needed for outgoing packets.. since this method is only
- * used for parsing .. so return null
- */
- XFirePacketContent *newPacket() { return 0; }
- void parseContent(char *buf, int length, int numberOfAtts) { }
- };
-
-};
-
-
-#endif
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcproj b/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcproj
deleted file mode 100644
index c3fcf1f205..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcproj
+++ /dev/null
@@ -1,963 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8,00"
- Name="xfire"
- ProjectGUID="{E4CD8BBA-B580-4584-AC3E-B4E9915026AE}"
- RootNamespace="xfiretest"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="D:\Programme\Miranda IM 7.12\Plugins"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="-D_SCL_SECURE_NO_WARNINGS"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;PTW32_STATIC_LIB"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="kernel32.lib $(NoInherit)"
- OutputFile="$(OutDir)\XFire.dll"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="D:\Programme\Miranda IM 7.12\Plugins"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="0"
- WholeProgramOptimization="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- UseUnicodeResponseFiles="false"
- AdditionalOptions="-D_SCL_SECURE_NO_WARNINGS"
- Optimization="3"
- FavorSizeOrSpeed="1"
- WholeProgramOptimization="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PTW32_STATIC_LIB;_CRT_SECURE_NO_WARNINGS"
- ExceptionHandling="1"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- FloatingPointModel="2"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="1"
- ErrorReporting="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- UseUnicodeResponseFiles="false"
- AdditionalDependencies="kernel32.lib $(NoInherit)"
- OutputFile="$(OutDir)\XFire.dll"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- GenerateMapFile="true"
- MapExports="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- BaseAddress=""
- ImportLibrary="$(TargetDir)$XFire.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\resource.rc"
- >
- </File>
- </Filter>
- <Filter
- Name="Miranda Plugin"
- >
- <File
- RelativePath=".\Export.def"
- >
- </File>
- <Filter
- Name="Xfire_class"
- >
- <Filter
- Name="source"
- >
- <File
- RelativePath=".\Xfire_avatar_loader.cpp"
- >
- </File>
- <File
- RelativePath=".\Xfire_base.cpp"
- >
- </File>
- <File
- RelativePath=".\Xfire_game.cpp"
- >
- </File>
- <File
- RelativePath=".\Xfire_gamelist.cpp"
- >
- </File>
- <File
- RelativePath=".\Xfire_icon_mng.cpp"
- >
- </File>
- <File
- RelativePath=".\Xfire_voicechat.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="headers"
- >
- <File
- RelativePath=".\Xfire_avatar_loader.h"
- >
- </File>
- <File
- RelativePath=".\Xfire_base.h"
- >
- </File>
- <File
- RelativePath=".\Xfire_game.h"
- >
- </File>
- <File
- RelativePath=".\Xfire_gamelist.h"
- >
- </File>
- <File
- RelativePath=".\Xfire_icon_mng.h"
- >
- </File>
- <File
- RelativePath=".\Xfire_voicechat.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="plugin"
- >
- <Filter
- Name="sources"
- >
- <File
- RelativePath=".\addgamedialog.cpp"
- >
- </File>
- <File
- RelativePath=".\all_statusmsg.cpp"
- >
- </File>
- <File
- RelativePath=".\iniupdater.cpp"
- >
- </File>
- <File
- RelativePath=".\main.cpp"
- >
- </File>
- <File
- RelativePath=".\options.cpp"
- >
- </File>
- <File
- RelativePath=".\passworddialog.cpp"
- >
- </File>
- <File
- RelativePath=".\processbuddyinfo.cpp"
- >
- </File>
- <File
- RelativePath=".\pwd_dlg.cpp"
- >
- </File>
- <File
- RelativePath=".\searching4games.cpp"
- >
- </File>
- <File
- RelativePath=".\services.cpp"
- >
- </File>
- <File
- RelativePath=".\setnickname.cpp"
- >
- </File>
- <File
- RelativePath=".\tools.cpp"
- >
- </File>
- <File
- RelativePath=".\userdetails.cpp"
- >
- </File>
- <File
- RelativePath=".\variables.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="headers"
- >
- <File
- RelativePath=".\addgamedialog.h"
- >
- </File>
- <File
- RelativePath=".\all_statusmsg.h"
- >
- </File>
- <File
- RelativePath=".\baseProtocol.h"
- >
- </File>
- <File
- RelativePath=".\iniupdater.h"
- >
- </File>
- <File
- RelativePath=".\m_assocmgr.h"
- >
- </File>
- <File
- RelativePath=".\m_extraicons.h"
- >
- </File>
- <File
- RelativePath=".\m_folders.h"
- >
- </File>
- <File
- RelativePath=".\m_updater.h"
- >
- </File>
- <File
- RelativePath=".\m_variables.h"
- >
- </File>
- <File
- RelativePath=".\passworddialog.h"
- >
- </File>
- <File
- RelativePath=".\processbuddyinfo.h"
- >
- </File>
- <File
- RelativePath=".\pwd_dlg.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath=".\services.h"
- >
- </File>
- <File
- RelativePath=".\setnickname.h"
- >
- </File>
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
- <File
- RelativePath=".\tools.h"
- >
- </File>
- <File
- RelativePath=".\variables.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="m8"
- >
- <File
- RelativePath=".\m8.h"
- >
- </File>
- </Filter>
- <Filter
- Name="proxy"
- >
- <File
- RelativePath=".\Xfire_proxy.cpp"
- >
- </File>
- <File
- RelativePath=".\Xfire_proxy.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="XFirelib"
- >
- <Filter
- Name="sources"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\authpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\buddyinfo.cpp"
- >
- </File>
- <File
- RelativePath=".\buddylist.cpp"
- >
- </File>
- <File
- RelativePath=".\buddylistgames2packet.cpp"
- >
- </File>
- <File
- RelativePath=".\buddylistgamespacket.cpp"
- >
- </File>
- <File
- RelativePath=".\buddylistnamespacket.cpp"
- >
- </File>
- <File
- RelativePath=".\buddylistonlinepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\clanbuddylistnamespacket.cpp"
- >
- </File>
- <File
- RelativePath=".\claninvitationpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\client.cpp"
- >
- </File>
- <File
- RelativePath=".\clientinformationpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\clientloginpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\clientversionpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\dummyxfiregameresolver.cpp"
- >
- </File>
- <File
- RelativePath=".\friendsoffriendlist.cpp"
- >
- </File>
- <File
- RelativePath=".\gameinfopacket.cpp"
- >
- </File>
- <File
- RelativePath=".\getbuddyinfo.cpp"
- >
- </File>
- <File
- RelativePath=".\invitebuddypacket.cpp"
- >
- </File>
- <File
- RelativePath=".\inviterequestpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\loginfailedpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\loginsuccesspacket.cpp"
- >
- </File>
- <File
- RelativePath=".\messageackpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\messagepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\monitoredobj.cpp"
- >
- </File>
- <File
- RelativePath=".\otherloginpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\packetreader.cpp"
- >
- </File>
- <File
- RelativePath=".\recvbuddychangednick.cpp"
- >
- </File>
- <File
- RelativePath=".\recvdidpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\recvoldversionpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\recvprefspacket.cpp"
- >
- </File>
- <File
- RelativePath=".\recvremovebuddypacket.cpp"
- >
- </File>
- <File
- RelativePath=".\recvstatusmessagepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\searchbuddy.cpp"
- >
- </File>
- <File
- RelativePath=".\sendacceptinvitationpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\senddenyinvitationpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendgameserverpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendgamestatus2packet.cpp"
- >
- </File>
- <File
- RelativePath=".\sendgamestatuspacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendkeepalivepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendmessagepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendnickchangepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendremovebuddypacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendsidpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendstatusmessagepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\sendtypingpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\SHA1.cpp"
- >
- </File>
- <File
- RelativePath=".\socket.cpp"
- >
- </File>
- <File
- RelativePath=".\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\variablevalue.cpp"
- >
- </File>
- <File
- RelativePath=".\xfireclanpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\xfirefoundbuddys.cpp"
- >
- </File>
- <File
- RelativePath=".\xfiregame.cpp"
- >
- </File>
- <File
- RelativePath=".\xfiregameresolver.cpp"
- >
- </File>
- <File
- RelativePath=".\xfirepacket.cpp"
- >
- </File>
- <File
- RelativePath=".\xfirepacketcontent.cpp"
- >
- </File>
- <File
- RelativePath=".\xfireparse.cpp"
- >
- </File>
- <File
- RelativePath=".\xfireprefpacket.cpp"
- >
- </File>
- <File
- RelativePath=".\xfirerecvpacketcontent.cpp"
- >
- </File>
- <File
- RelativePath=".\xfiresendpacketcontent.cpp"
- >
- </File>
- <File
- RelativePath=".\xfiretest.cpp.old"
- >
- </File>
- <File
- RelativePath=".\xfireutils.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="headers"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\authpacket.h"
- >
- </File>
- <File
- RelativePath=".\buddyinfo.h"
- >
- </File>
- <File
- RelativePath=".\buddylist.h"
- >
- </File>
- <File
- RelativePath=".\buddylistgames2packet.h"
- >
- </File>
- <File
- RelativePath=".\buddylistgamespacket.h"
- >
- </File>
- <File
- RelativePath=".\buddylistnamespacket.h"
- >
- </File>
- <File
- RelativePath=".\buddylistonlinepacket.h"
- >
- </File>
- <File
- RelativePath=".\clanbuddylistnamespacket.h"
- >
- </File>
- <File
- RelativePath=".\claninvitationpacket.h"
- >
- </File>
- <File
- RelativePath=".\client.h"
- >
- </File>
- <File
- RelativePath=".\clientinformationpacket.h"
- >
- </File>
- <File
- RelativePath=".\clientloginpacket.h"
- >
- </File>
- <File
- RelativePath=".\clientversionpacket.h"
- >
- </File>
- <File
- RelativePath=".\dummyxfiregameresolver.h"
- >
- </File>
- <File
- RelativePath=".\friendsoffriendlist.h"
- >
- </File>
- <File
- RelativePath=".\gameinfopacket.h"
- >
- </File>
- <File
- RelativePath=".\getbuddyinfo.h"
- >
- </File>
- <File
- RelativePath=".\invitebuddypacket.h"
- >
- </File>
- <File
- RelativePath=".\inviterequestpacket.h"
- >
- </File>
- <File
- RelativePath=".\loginfailedpacket.h"
- >
- </File>
- <File
- RelativePath=".\loginsuccesspacket.h"
- >
- </File>
- <File
- RelativePath=".\messageackpacket.h"
- >
- </File>
- <File
- RelativePath=".\messagepacket.h"
- >
- </File>
- <File
- RelativePath=".\monitoredobj.h"
- >
- </File>
- <File
- RelativePath=".\otherloginpacket.h"
- >
- </File>
- <File
- RelativePath=".\packetlistener.h"
- >
- </File>
- <File
- RelativePath=".\packetreader.h"
- >
- </File>
- <File
- RelativePath=".\recvbuddychangednick.h"
- >
- </File>
- <File
- RelativePath=".\recvdidpacket.h"
- >
- </File>
- <File
- RelativePath=".\recvoldversionpacket.h"
- >
- </File>
- <File
- RelativePath=".\recvprefspacket.h"
- >
- </File>
- <File
- RelativePath=".\recvremovebuddypacket.h"
- >
- </File>
- <File
- RelativePath=".\recvstatusmessagepacket.h"
- >
- </File>
- <File
- RelativePath=".\searchbuddy.h"
- >
- </File>
- <File
- RelativePath=".\sendacceptinvitationpacket.h"
- >
- </File>
- <File
- RelativePath=".\senddenyinvitationpacket.h"
- >
- </File>
- <File
- RelativePath=".\sendgameserverpacket.h"
- >
- </File>
- <File
- RelativePath=".\sendgamestatus2packet.h"
- >
- </File>
- <File
- RelativePath=".\sendgamestatuspacket.h"
- >
- </File>
- <File
- RelativePath=".\sendkeepalivepacket.h"
- >
- </File>
- <File
- RelativePath=".\sendmessagepacket.h"
- >
- </File>
- <File
- RelativePath=".\sendnickchangepacket.h"
- >
- </File>
- <File
- RelativePath=".\sendremovebuddypacket.h"
- >
- </File>
- <File
- RelativePath=".\sendsidpacket.h"
- >
- </File>
- <File
- RelativePath=".\sendstatusmessagepacket.h"
- >
- </File>
- <File
- RelativePath=".\sendtypingpacket.h"
- >
- </File>
- <File
- RelativePath=".\SHA1.h"
- >
- </File>
- <File
- RelativePath=".\socket.h"
- >
- </File>
- <File
- RelativePath=".\socketexception.h"
- >
- </File>
- <File
- RelativePath=".\variablevalue.h"
- >
- </File>
- <File
- RelativePath=".\xdebug.h"
- >
- </File>
- <File
- RelativePath=".\xfireclanpacket.h"
- >
- </File>
- <File
- RelativePath=".\xfirefoundbuddys.h"
- >
- </File>
- <File
- RelativePath=".\xfiregame.h"
- >
- </File>
- <File
- RelativePath=".\xfiregameresolver.h"
- >
- </File>
- <File
- RelativePath=".\xfirepacket.h"
- >
- </File>
- <File
- RelativePath=".\xfirepacketcontent.h"
- >
- </File>
- <File
- RelativePath=".\xfireparse.h"
- >
- </File>
- <File
- RelativePath=".\xfireprefpacket.h"
- >
- </File>
- <File
- RelativePath=".\xfirerecvpacketcontent.h"
- >
- </File>
- <File
- RelativePath=".\xfiresendpacketcontent.h"
- >
- </File>
- <File
- RelativePath=".\xfireutils.h"
- >
- </File>
- </Filter>
- </Filter>
- <File
- RelativePath=".\ReadMe.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj b/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj
deleted file mode 100644
index f0fc8a1fe8..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj
+++ /dev/null
@@ -1,282 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xfire</ProjectName>
- <ProjectGuid>{E4CD8BBA-B580-4584-AC3E-B4E9915026AE}</ProjectGuid>
- <RootNamespace>xfiretest</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalOptions>-D_SCL_SECURE_NO_WARNINGS %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;PTW32_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalDependencies>kernel32.lib</AdditionalDependencies>
- <OutputFile>$(OutDir)XFire.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalOptions>-D_SCL_SECURE_NO_WARNINGS %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Full</Optimization>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;PTW32_STATIC_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>Sync</ExceptionHandling>
- <BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <BufferSecurityCheck>true</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>OldStyle</DebugInformationFormat>
- <ErrorReporting>None</ErrorReporting>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>kernel32.lib</AdditionalDependencies>
- <OutputFile>$(OutDir)XFire.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>true</GenerateMapFile>
- <MapExports>true</MapExports>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>
- </BaseAddress>
- <ImportLibrary>$(TargetDir)$XFire.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ResourceCompile Include="resource.rc" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Export.def" />
- <None Include="xfiretest.cpp.old" />
- <None Include="ReadMe.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Xfire_avatar_loader.cpp" />
- <ClCompile Include="Xfire_base.cpp" />
- <ClCompile Include="Xfire_game.cpp" />
- <ClCompile Include="Xfire_gamelist.cpp" />
- <ClCompile Include="Xfire_icon_mng.cpp" />
- <ClCompile Include="Xfire_voicechat.cpp" />
- <ClCompile Include="addgamedialog.cpp" />
- <ClCompile Include="all_statusmsg.cpp" />
- <ClCompile Include="iniupdater.cpp" />
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- <ClCompile Include="passworddialog.cpp" />
- <ClCompile Include="processbuddyinfo.cpp" />
- <ClCompile Include="pwd_dlg.cpp" />
- <ClCompile Include="searching4games.cpp" />
- <ClCompile Include="services.cpp" />
- <ClCompile Include="setnickname.cpp" />
- <ClCompile Include="tools.cpp" />
- <ClCompile Include="userdetails.cpp" />
- <ClCompile Include="variables.cpp" />
- <ClCompile Include="Xfire_proxy.cpp" />
- <ClCompile Include="authpacket.cpp" />
- <ClCompile Include="buddyinfo.cpp" />
- <ClCompile Include="buddylist.cpp" />
- <ClCompile Include="buddylistgames2packet.cpp" />
- <ClCompile Include="buddylistgamespacket.cpp" />
- <ClCompile Include="buddylistnamespacket.cpp" />
- <ClCompile Include="buddylistonlinepacket.cpp" />
- <ClCompile Include="clanbuddylistnamespacket.cpp" />
- <ClCompile Include="claninvitationpacket.cpp" />
- <ClCompile Include="client.cpp" />
- <ClCompile Include="clientinformationpacket.cpp" />
- <ClCompile Include="clientloginpacket.cpp" />
- <ClCompile Include="clientversionpacket.cpp" />
- <ClCompile Include="dummyxfiregameresolver.cpp" />
- <ClCompile Include="friendsoffriendlist.cpp" />
- <ClCompile Include="gameinfopacket.cpp" />
- <ClCompile Include="getbuddyinfo.cpp" />
- <ClCompile Include="invitebuddypacket.cpp" />
- <ClCompile Include="inviterequestpacket.cpp" />
- <ClCompile Include="loginfailedpacket.cpp" />
- <ClCompile Include="loginsuccesspacket.cpp" />
- <ClCompile Include="messageackpacket.cpp" />
- <ClCompile Include="messagepacket.cpp" />
- <ClCompile Include="monitoredobj.cpp" />
- <ClCompile Include="otherloginpacket.cpp" />
- <ClCompile Include="packetreader.cpp" />
- <ClCompile Include="recvbuddychangednick.cpp" />
- <ClCompile Include="recvdidpacket.cpp" />
- <ClCompile Include="recvoldversionpacket.cpp" />
- <ClCompile Include="recvprefspacket.cpp" />
- <ClCompile Include="recvremovebuddypacket.cpp" />
- <ClCompile Include="recvstatusmessagepacket.cpp" />
- <ClCompile Include="searchbuddy.cpp" />
- <ClCompile Include="sendacceptinvitationpacket.cpp" />
- <ClCompile Include="senddenyinvitationpacket.cpp" />
- <ClCompile Include="sendgameserverpacket.cpp" />
- <ClCompile Include="sendgamestatus2packet.cpp" />
- <ClCompile Include="sendgamestatuspacket.cpp" />
- <ClCompile Include="sendkeepalivepacket.cpp" />
- <ClCompile Include="sendmessagepacket.cpp" />
- <ClCompile Include="sendnickchangepacket.cpp" />
- <ClCompile Include="sendremovebuddypacket.cpp" />
- <ClCompile Include="sendsidpacket.cpp" />
- <ClCompile Include="sendstatusmessagepacket.cpp" />
- <ClCompile Include="sendtypingpacket.cpp" />
- <ClCompile Include="SHA1.cpp" />
- <ClCompile Include="socket.cpp" />
- <ClCompile Include="stdafx.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="variablevalue.cpp" />
- <ClCompile Include="xfireclanpacket.cpp" />
- <ClCompile Include="xfirefoundbuddys.cpp" />
- <ClCompile Include="xfiregame.cpp" />
- <ClCompile Include="xfiregameresolver.cpp" />
- <ClCompile Include="xfirepacket.cpp" />
- <ClCompile Include="xfirepacketcontent.cpp" />
- <ClCompile Include="xfireparse.cpp" />
- <ClCompile Include="xfireprefpacket.cpp" />
- <ClCompile Include="xfirerecvpacketcontent.cpp" />
- <ClCompile Include="xfiresendpacketcontent.cpp" />
- <ClCompile Include="xfireutils.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Xfire_avatar_loader.h" />
- <ClInclude Include="Xfire_base.h" />
- <ClInclude Include="Xfire_game.h" />
- <ClInclude Include="Xfire_gamelist.h" />
- <ClInclude Include="Xfire_icon_mng.h" />
- <ClInclude Include="Xfire_voicechat.h" />
- <ClInclude Include="addgamedialog.h" />
- <ClInclude Include="all_statusmsg.h" />
- <ClInclude Include="baseProtocol.h" />
- <ClInclude Include="iniupdater.h" />
- <ClInclude Include="passworddialog.h" />
- <ClInclude Include="processbuddyinfo.h" />
- <ClInclude Include="pwd_dlg.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="services.h" />
- <ClInclude Include="setnickname.h" />
- <ClInclude Include="stdafx.h" />
- <ClInclude Include="tools.h" />
- <ClInclude Include="variables.h" />
- <ClInclude Include="m8.h" />
- <ClInclude Include="Xfire_proxy.h" />
- <ClInclude Include="authpacket.h" />
- <ClInclude Include="buddyinfo.h" />
- <ClInclude Include="buddylist.h" />
- <ClInclude Include="buddylistgames2packet.h" />
- <ClInclude Include="buddylistgamespacket.h" />
- <ClInclude Include="buddylistnamespacket.h" />
- <ClInclude Include="buddylistonlinepacket.h" />
- <ClInclude Include="clanbuddylistnamespacket.h" />
- <ClInclude Include="claninvitationpacket.h" />
- <ClInclude Include="client.h" />
- <ClInclude Include="clientinformationpacket.h" />
- <ClInclude Include="clientloginpacket.h" />
- <ClInclude Include="clientversionpacket.h" />
- <ClInclude Include="dummyxfiregameresolver.h" />
- <ClInclude Include="friendsoffriendlist.h" />
- <ClInclude Include="gameinfopacket.h" />
- <ClInclude Include="getbuddyinfo.h" />
- <ClInclude Include="invitebuddypacket.h" />
- <ClInclude Include="inviterequestpacket.h" />
- <ClInclude Include="loginfailedpacket.h" />
- <ClInclude Include="loginsuccesspacket.h" />
- <ClInclude Include="messageackpacket.h" />
- <ClInclude Include="messagepacket.h" />
- <ClInclude Include="monitoredobj.h" />
- <ClInclude Include="otherloginpacket.h" />
- <ClInclude Include="packetlistener.h" />
- <ClInclude Include="packetreader.h" />
- <ClInclude Include="recvbuddychangednick.h" />
- <ClInclude Include="recvdidpacket.h" />
- <ClInclude Include="recvoldversionpacket.h" />
- <ClInclude Include="recvprefspacket.h" />
- <ClInclude Include="recvremovebuddypacket.h" />
- <ClInclude Include="recvstatusmessagepacket.h" />
- <ClInclude Include="searchbuddy.h" />
- <ClInclude Include="sendacceptinvitationpacket.h" />
- <ClInclude Include="senddenyinvitationpacket.h" />
- <ClInclude Include="sendgameserverpacket.h" />
- <ClInclude Include="sendgamestatus2packet.h" />
- <ClInclude Include="sendgamestatuspacket.h" />
- <ClInclude Include="sendkeepalivepacket.h" />
- <ClInclude Include="sendmessagepacket.h" />
- <ClInclude Include="sendnickchangepacket.h" />
- <ClInclude Include="sendremovebuddypacket.h" />
- <ClInclude Include="sendsidpacket.h" />
- <ClInclude Include="sendstatusmessagepacket.h" />
- <ClInclude Include="sendtypingpacket.h" />
- <ClInclude Include="SHA1.h" />
- <ClInclude Include="socket.h" />
- <ClInclude Include="socketexception.h" />
- <ClInclude Include="variablevalue.h" />
- <ClInclude Include="xdebug.h" />
- <ClInclude Include="xfireclanpacket.h" />
- <ClInclude Include="xfirefoundbuddys.h" />
- <ClInclude Include="xfiregame.h" />
- <ClInclude Include="xfiregameresolver.h" />
- <ClInclude Include="xfirepacket.h" />
- <ClInclude Include="xfirepacketcontent.h" />
- <ClInclude Include="xfireparse.h" />
- <ClInclude Include="xfireprefpacket.h" />
- <ClInclude Include="xfirerecvpacketcontent.h" />
- <ClInclude Include="xfiresendpacketcontent.h" />
- <ClInclude Include="xfireutils.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj.filters b/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj.filters
deleted file mode 100644
index d84586a058..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfiretest.vcxproj.filters
+++ /dev/null
@@ -1,557 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Ressourcendateien">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
- </Filter>
- <Filter Include="Miranda Plugin">
- <UniqueIdentifier>{429b4466-b5e0-4103-b9a3-79d9329ed56b}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\Xfire_class">
- <UniqueIdentifier>{410d3a2b-b464-427e-bae6-6b53052ce281}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\Xfire_class\source">
- <UniqueIdentifier>{85b62d89-d9b7-48e6-ad47-b69e16fad26e}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\Xfire_class\headers">
- <UniqueIdentifier>{e5faded7-3c56-4a55-8376-ff856dcdf14a}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\plugin">
- <UniqueIdentifier>{faa98de2-0992-4e8f-9619-339ddf7d63a8}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\plugin\sources">
- <UniqueIdentifier>{ed3814dc-25c9-4508-8f49-6151c76a3a17}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\plugin\headers">
- <UniqueIdentifier>{7f2aaa40-a5ee-4710-8c18-d5d8fb6393ec}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\m8">
- <UniqueIdentifier>{ab6c436e-ae19-4c55-a704-c5d3289d4741}</UniqueIdentifier>
- </Filter>
- <Filter Include="Miranda Plugin\proxy">
- <UniqueIdentifier>{1b5978a1-4944-4647-9e92-11cb4662302e}</UniqueIdentifier>
- </Filter>
- <Filter Include="XFirelib">
- <UniqueIdentifier>{beadf7dd-8c9c-4b89-a764-5eb6fc0190f7}</UniqueIdentifier>
- </Filter>
- <Filter Include="XFirelib\sources">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="XFirelib\headers">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="resource.rc">
- <Filter>Ressourcendateien</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="Export.def">
- <Filter>Miranda Plugin</Filter>
- </None>
- <None Include="xfiretest.cpp.old">
- <Filter>XFirelib\sources</Filter>
- </None>
- <None Include="ReadMe.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Xfire_avatar_loader.cpp">
- <Filter>Miranda Plugin\Xfire_class\source</Filter>
- </ClCompile>
- <ClCompile Include="Xfire_base.cpp">
- <Filter>Miranda Plugin\Xfire_class\source</Filter>
- </ClCompile>
- <ClCompile Include="Xfire_game.cpp">
- <Filter>Miranda Plugin\Xfire_class\source</Filter>
- </ClCompile>
- <ClCompile Include="Xfire_gamelist.cpp">
- <Filter>Miranda Plugin\Xfire_class\source</Filter>
- </ClCompile>
- <ClCompile Include="Xfire_icon_mng.cpp">
- <Filter>Miranda Plugin\Xfire_class\source</Filter>
- </ClCompile>
- <ClCompile Include="Xfire_voicechat.cpp">
- <Filter>Miranda Plugin\Xfire_class\source</Filter>
- </ClCompile>
- <ClCompile Include="addgamedialog.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="all_statusmsg.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="iniupdater.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="passworddialog.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="processbuddyinfo.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="pwd_dlg.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="searching4games.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="services.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="setnickname.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="tools.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="userdetails.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="variables.cpp">
- <Filter>Miranda Plugin\plugin\sources</Filter>
- </ClCompile>
- <ClCompile Include="Xfire_proxy.cpp">
- <Filter>Miranda Plugin\proxy</Filter>
- </ClCompile>
- <ClCompile Include="authpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="buddyinfo.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="buddylist.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="buddylistgames2packet.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="buddylistgamespacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="buddylistnamespacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="buddylistonlinepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="clanbuddylistnamespacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="claninvitationpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="client.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="clientinformationpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="clientloginpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="clientversionpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="dummyxfiregameresolver.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="friendsoffriendlist.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="gameinfopacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="getbuddyinfo.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="invitebuddypacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="inviterequestpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="loginfailedpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="loginsuccesspacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="messageackpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="messagepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="monitoredobj.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="otherloginpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="packetreader.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="recvbuddychangednick.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="recvdidpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="recvoldversionpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="recvprefspacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="recvremovebuddypacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="recvstatusmessagepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="searchbuddy.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendacceptinvitationpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="senddenyinvitationpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendgameserverpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendgamestatus2packet.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendgamestatuspacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendkeepalivepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendmessagepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendnickchangepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendremovebuddypacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendsidpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendstatusmessagepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="sendtypingpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="SHA1.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="socket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="stdafx.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="variablevalue.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfireclanpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfirefoundbuddys.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfiregame.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfiregameresolver.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfirepacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfirepacketcontent.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfireparse.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfireprefpacket.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfirerecvpacketcontent.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfiresendpacketcontent.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- <ClCompile Include="xfireutils.cpp">
- <Filter>XFirelib\sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Xfire_avatar_loader.h">
- <Filter>Miranda Plugin\Xfire_class\headers</Filter>
- </ClInclude>
- <ClInclude Include="Xfire_base.h">
- <Filter>Miranda Plugin\Xfire_class\headers</Filter>
- </ClInclude>
- <ClInclude Include="Xfire_game.h">
- <Filter>Miranda Plugin\Xfire_class\headers</Filter>
- </ClInclude>
- <ClInclude Include="Xfire_gamelist.h">
- <Filter>Miranda Plugin\Xfire_class\headers</Filter>
- </ClInclude>
- <ClInclude Include="Xfire_icon_mng.h">
- <Filter>Miranda Plugin\Xfire_class\headers</Filter>
- </ClInclude>
- <ClInclude Include="Xfire_voicechat.h">
- <Filter>Miranda Plugin\Xfire_class\headers</Filter>
- </ClInclude>
- <ClInclude Include="addgamedialog.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="all_statusmsg.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="baseProtocol.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="iniupdater.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="passworddialog.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="processbuddyinfo.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="pwd_dlg.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="services.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="setnickname.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="stdafx.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="tools.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="variables.h">
- <Filter>Miranda Plugin\plugin\headers</Filter>
- </ClInclude>
- <ClInclude Include="m8.h">
- <Filter>Miranda Plugin\m8</Filter>
- </ClInclude>
- <ClInclude Include="Xfire_proxy.h">
- <Filter>Miranda Plugin\proxy</Filter>
- </ClInclude>
- <ClInclude Include="authpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="buddyinfo.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="buddylist.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="buddylistgames2packet.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="buddylistgamespacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="buddylistnamespacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="buddylistonlinepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="clanbuddylistnamespacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="claninvitationpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="client.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="clientinformationpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="clientloginpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="clientversionpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="dummyxfiregameresolver.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="friendsoffriendlist.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="gameinfopacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="getbuddyinfo.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="invitebuddypacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="inviterequestpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="loginfailedpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="loginsuccesspacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="messageackpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="messagepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="monitoredobj.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="otherloginpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="packetlistener.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="packetreader.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="recvbuddychangednick.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="recvdidpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="recvoldversionpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="recvprefspacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="recvremovebuddypacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="recvstatusmessagepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="searchbuddy.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendacceptinvitationpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="senddenyinvitationpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendgameserverpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendgamestatus2packet.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendgamestatuspacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendkeepalivepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendmessagepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendnickchangepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendremovebuddypacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendsidpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendstatusmessagepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="sendtypingpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="SHA1.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="socket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="socketexception.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="variablevalue.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xdebug.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfireclanpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfirefoundbuddys.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfiregame.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfiregameresolver.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfirepacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfirepacketcontent.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfireparse.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfireprefpacket.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfirerecvpacketcontent.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfiresendpacketcontent.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- <ClInclude Include="xfireutils.h">
- <Filter>XFirelib\headers</Filter>
- </ClInclude>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireutils.cpp b/plugins/!NotAdopted/Xfire/xfiretest/xfireutils.cpp
deleted file mode 100644
index 5df7ba314b..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireutils.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stdafx.h"
-
-#include "xdebug.h"
-#include <string.h>
-#include <iostream>
-#include "xfireutils.h"
-
-
-namespace xfirelib {
-
-using namespace std;
-
- XFireUtils::XFireUtils() {
- }
-
- int XFireUtils::addAttributName(char *packet,int packet_length, char *att){
- XDEBUG3( "Adding %d chars at position %d\n",strlen(att),packet_length);
- packet[packet_length] = (char)strlen(att);//set att length
- memcpy(packet+packet_length+1,att,strlen(att)); //set attname
- return packet_length+1+strlen(att);
- }
-};
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/xfireutils.h b/plugins/!NotAdopted/Xfire/xfiretest/xfireutils.h
deleted file mode 100644
index a149b27a63..0000000000
--- a/plugins/!NotAdopted/Xfire/xfiretest/xfireutils.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * xfirelib - C++ Library for the xfire protocol.
- * Copyright (C) 2006 by
- * Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
- * Herbert Poul <herbert.poul@gmail.com> / http://goim.us
- * http://xfirelib.sphene.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#ifndef __XFIREUTILS_H
-#define __XFIREUTILS_H
-
-namespace xfirelib {
-
-class XFireUtils {
- public:
- XFireUtils();
- /**
- *Adds the name of a attribute with its length to the packet
- */
- static int addAttributName(char *packet,int packet_length, char *att);
-};
-
-};
-
-#endif