Jump to content

[9466] MaNGOS SOAP services


Auntie Mangos

Recommended Posts

diff --git a/src/mangosd/MaNGOSsoap.cpp b/src/mangosd/MaNGOSsoap.cpp
index fe358d2..09ee0ed 100644
--- a/src/mangosd/MaNGOSsoap.cpp
+++ b/src/mangosd/MaNGOSsoap.cpp
@@ -29,6 +29,8 @@ void MaNGOSsoapRunnable::run()
    struct soap soap;
    int m, s;
    soap_init(&soap);
+    soap_set_imode(&soap, SOAP_C_UTFSTRING);
+    soap_set_omode(&soap, SOAP_C_UTFSTRING);
    m = soap_bind(&soap, m_host.c_str(), m_port, 100);

    // check every 3 seconds if world ended

This small mod will properly allow UTF8 strings via SOAP for i.e. announcements in native languages or native player names.

Link to comment
Share on other sites

  • 2 weeks later...

While working on some additional features for GaME I noticed certain GM commands appear to be unavailable when connected through SOAP - like the .levelup command, most of the .modify commands, .additem, probably a few others. Awesome though the SOAP interface it, having key character modification commands unavailable through it rather limits its use. I was wondering, if it is not too big a change, is it possible to enable those commands as well?

I realise this might be a bit tricky for commands that do not currently take a character name argument, but for example the .recall and .levelup commands do take one and it'd be rather neat to be able to use a remote application to change someone's level who's standing right next to you without having to log on a GM char :D

Link to comment
Share on other sites

that commands require a character selected ingame, probably would be need to add an additional parameter to that commands, or add an alternative way of setting player selection

Aye, some do, there's a few that already take a character name parameter though. As it is, this provides little more than static calls to a few selected commands while in theory a SOAP service can offer direct access to core methods. Would be nice to have, though probably way too much effort to make - needs a WSDL to start with for one. Not that I don't appreciate the work here (quite the contrary, already used this to add the ability to mute and kick online characters directly from GaME), but I think it has the potential to do much, much more :D

If you read the first post, he gives an example of using SOAP.

There was a post a few days ago in the general help section as well - I am guessing many don't realise SOAP is foremost a way for programs to communicate between themselfs, not something you'd login in on as a user :)

Link to comment
Share on other sites

Perhaps an good addition for this would be an impersonate command so that a command that is normally accessed only from a logged in character but in a one line command accessible only from console, RA, or SOAP. Something along the lines of "impersonate #character [full character command such as namego, etc.]" that could be used in one line.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use