Coder Social home page Coder Social logo

purple-icq's Introduction

purple-icq

ICQ protocol implementation for libpurple. Written in Rust.

Installing

  1. Install Rust as documented here.
  2. Run sudo make install for a global install or make install-user to install in your home directory.
  3. Launch your favourite libpurple client and pick the ICQ (Web) protocol.

Debugging

For verbose output, set the RUST_LOG environment variable to one of debug, error, info, warn, or trace.

purple-icq's People

Contributors

aviau avatar isra17 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

purple-icq's Issues

Split `src/purple` out into a crate?

I have a C-based libpurple protocol plugin for Delta Chat. At some point, Delta rewrote itself from C -> Rust, and since discovering the purple-sys crate, I've decided to rewrite my own plugin in Rust.

In this repository, src/purple looks to be a safe wrapper on top of purple-sys. It (and purple-icq generally) looks like a better example to follow than using purple-sys directly in the way pidgin-wechat does. Thanks for putting it together.

Since my plugin is GPL as well, I can just copy the useful code, but I was wondering if you'd consider publishing it as a separate crate, to make it easier to manage dependencies and contributions back? It would also improve discoverability!

It looks like we've also both forked purple-sys itself. You might be interested in integrating these changes into your branch of that as well, if you decide to split out src/purple - sbwtw/libpurple-rust#3

My project is purple-plugin-delta if interested; the rust branch is where I'll be working on the new implementation until it has feature parity.

Implement getChatInfo

Example Request:

curl 'https://u.icq.net/api/v14/rapi/getChatInfo' \
  -H 'authority: u.icq.net' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36' \
  -H 'dnt: 1' \
  -H 'content-type: application/json' \
  -H 'accept: */*' \
  -H 'origin: https://web.icq.com' \
  -H 'sec-fetch-site: cross-site' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://web.icq.com/' \
  -H 'accept-language: en-CA,en;q=0.9,fr;q=0.8' \
  --data-binary '{"reqId":"asdfasdfasdf-sadfafdasdf","aimsid":"sadfsadfsadfasdfasdf:sdfasdfsafdasdfsadf","params":{"sn":"[email protected]","memberLimit":1}}' \
  --compressed

Example Response:

{
	"ts": 1595876779,
	"status": {
		"code": 20000
	},
	"method": "getChatInfo",
	"reqId": "91987-1595876779",
	"results": {
		"name": "legit sellers and buyers only no rippers allow",
		"rules": "rippers will be block immediately report",
		"stamp": "111111111",
		"createTime": 1111111111111111111,
		"avatarLastModified": 1111111111111111111,
		"blockedCount": 11,
		"creator": "111111111",
		"live": true,
		"controlled": true,
		"infoVersion": "1111111111111111111",
		"membersVersion": "1111111111111111111",
		"membersCount": 1111,
		"adminsCount": 1,
		"abuseReportsCount": 11,
		"defaultRole": "member",
		"lookingEnabled": true,
		"regions": "GH",
		"sn": "[email protected]",
		"abuseReportsCurrentCount": 0,
		"you": {
			"role": "member"
		},
		"members": [{
			"sn": "111111111",
			"role": "member",
			"noAvatar": true,
			"userState": {
				"lastseen": 0
			},
			"friendly": "anonymous anonymous",
			"anketa": {
				"sn": "111111111",
				"firstName": "anonymous",
				"lastName": "anonymous",
				"friendly": "anonymous anonymous"
			}
		}],
		"persons": [{
			"sn": "1111111",
			"firstName": "anonymous",
			"lastName": "anonymous",
			"friendly": "anonymous anonymous"
		}]
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.