Changeset - 6872e99abbd9
[Not reviewed]
0 2 0
Florian Kinder - 8 years ago 2017-06-05 11:27:27
Fank@users.noreply.github.com
Added opensteamworks via libpurple (#203)

* add compatibility for steam guard in opensteamworks plugin, fixes #62


* steam guard changes
2 files changed with 23 insertions and 1 deletions:
0 comments (0 inline, 0 general)
Dockerfile
Show inline comments
 
@@ -6,7 +6,7 @@ ARG commit=unknown
 
RUN echo $commit
 

	
 
# Spectrum 2
 
RUN dnf install protobuf protobuf swiften gcc gcc-c++ make libpqxx-devel libpurple-devel protobuf-devel swiften-devel rpm-build avahi-devel boost-devel cmake cppunit-devel expat-devel libcommuni-devel libidn-devel libsqlite3x-devel log4cxx-devel gettext libgcrypt-devel libwebp-devel libpurple-devel zlib-devel json-glib-devel python-pip zlib-devel libjpeg-devel python-devel  mysql-devel popt-devel git libevent-devel qt-devel dbus-glib-devel libcurl-devel wget mercurial libtool -y && \
 
RUN dnf install protobuf protobuf swiften gcc gcc-c++ make libpqxx-devel libpurple-devel protobuf-devel swiften-devel rpm-build avahi-devel boost-devel cmake cppunit-devel expat-devel libcommuni-devel libidn-devel libsqlite3x-devel log4cxx-devel gettext libgcrypt-devel libwebp-devel libpurple-devel zlib-devel json-glib-devel python-pip zlib-devel libjpeg-devel python-devel  mysql-devel popt-devel git libevent-devel qt-devel dbus-glib-devel libcurl-devel wget mercurial libtool libgnome-keyring-devel nss-devel -y && \
 
	echo "---> Installing Spectrum 2" && \
 
		git clone git://github.com/hanzz/spectrum2.git && \
 
		cd spectrum2 && \
 
@@ -62,6 +62,13 @@ RUN dnf install protobuf protobuf swiften gcc gcc-c++ make libpqxx-devel libpurp
 
		make install && \
 
		cd .. && \
 
		rm -rf purple-discord && \
 
	echo "---> Install Steam" && \
 
		git clone https://github.com/EionRobb/pidgin-opensteamworks.git && \
 
		cd pidgin-opensteamworks/steam-mobile && \
 
		make && \
 
		make install && \
 
		cd ../.. && \
 
		rm -rf pidgin-opensteamworks && \
 
	echo "---> cleanup" && \
 
		rm -rf /usr/share/locale/* && \
 
		rm -rf /usr/share/doc/* && \
backends/libpurple/main.cpp
Show inline comments
 
@@ -369,6 +369,10 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
				adminLegacyName = "hangouts";
 
				adminAlias = "hangouts";
 
			}
 
			else if (protocol == "prpl-steam-mobile") {
 
				adminLegacyName = "steam-mobile";
 
				adminAlias = "steam-mobile";
 
			}
 

	
 
			if (!purple_find_prpl_wrapped(protocol.c_str())) {
 
				LOG4CXX_INFO(logger,  name.c_str() << ": Invalid protocol '" << protocol << "'");
 
@@ -1614,6 +1618,17 @@ void * requestInput(const char *title, const char *primary,const char *secondary
 
			np->m_inputRequests[req->mainJID] = req;
 
			return NULL;
 
		}
 
		else if (primaryString == "Set your Steam Guard Code") {
 
			LOG4CXX_INFO(logger, "prpl-steam-mobile steam guard request");
 
			np->handleMessage(np->m_accounts[account], np->adminLegacyName, std::string("Steam Guard code: "));
 
			inputRequest *req = new inputRequest;
 
			req->ok_cb = (PurpleRequestInputCb)ok_cb;
 
			req->user_data = user_data;
 
			req->account = account;
 
			req->mainJID = np->m_accounts[account];
 
			np->m_inputRequests[req->mainJID] = req;
 
			return NULL;
 
		}
 
		else {
 
			LOG4CXX_WARN(logger, "Unhandled request input. primary=" << primaryString);
 
		}
0 comments (0 inline, 0 general)