← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcpp-plugin-sdk-cpp/LoLPlugin] Rev 29: lowercase OIR service

 

------------------------------------------------------------
revno: 29
committer: poy <poy@xxxxxxxxxx>
branch nick: LoLPlugin
timestamp: Mon 2013-06-17 20:16:33 +0200
message:
  lowercase OIR service
modified:
  src/Plugin.cpp


--
lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/LoLPlugin
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/LoLPlugin

Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/LoLPlugin.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/LoLPlugin/+edit-subscription
=== modified file 'src/Plugin.cpp'
--- src/Plugin.cpp	2013-06-09 12:00:28 +0000
+++ src/Plugin.cpp	2013-06-17 18:16:33 +0000
@@ -32,7 +32,9 @@
 
 #include "AdcCommand.h"
 
+#ifdef _WIN32
 #include <shellapi.h>
+#endif
 
 /* Plugin SDK helpers are in the "dcapi" namespace; ease their calling. */
 using dcapi::Config;
@@ -47,7 +49,7 @@
 const string Plugin::defLink = "http://quickfind.kassad.in/profile/<server>/<summoner>/";
 const string Plugin::servers[7] = { "br", "eune", "euw", "kr", "na", "ru", "tr" };
 
-const string lolServ = "LoL"; // the service identifier of the ADC OID command.
+const string lolServ = "lol"; // the service identifier of the ADC OIR command.
 
 const size_t MAX_CACHE = 10;
 
@@ -133,9 +135,8 @@
 	ShellExecute(nullptr, nullptr, Util::toT(link).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
 }
 #else
-void openLink(string link) {
-	boost::replace_all(link, "'", "'\\''");
-	system(string("xdg-open '" + link + "'").c_str());
+void openLink(const string& link) {
+	system(string("xdg-open '" + boost::replace_all_copy(link, "'", "'\\''") + "'").c_str());
 }
 #endif
 } // unnamed namespace