diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-11-05 21:11:48 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-11-05 21:11:48 +0000 |
commit | 048aaf0c4e77402adf584e3318e5aae6f1cdd749 (patch) | |
tree | def343da80e282ae43164e45e672a1386db66546 /protocols/Xfire/src/variables.cpp | |
parent | 35a9af527f9b7ec35e81455784cd0a795be910c5 (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 'protocols/Xfire/src/variables.cpp')
-rw-r--r-- | protocols/Xfire/src/variables.cpp | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp new file mode 100644 index 0000000000..d8479b7dc6 --- /dev/null +++ b/protocols/Xfire/src/variables.cpp @@ -0,0 +1,168 @@ +//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 |