Git Product home page Git Product logo

mod-ip-tracker's Introduction

mod-ip-tracker

Description

Storing all IPs from all accounts and their login times in account_ip.

Requirements

mod-ip-tracker requires:

  • AzerothCore v3.0.0+

Installation

1) Simply `git clone` the module under the `modules` directory of your AzerothCore source or copy paste it manually.
2) Import the `auth/base/account_ip.sql` SQL file manually to the `acore_auth` database
3) Re-run cmake and launch a clean build of AzerothCore
4) Configure `ip-tracker.conf`

Usage

Get by name: select all IPs of a given account name ACCOUNT_NAME

SELECT account.username, account_ip.* FROM account 
INNER JOIN account_ip ON account.id = account_ip.account
WHERE account.username = 'ACCOUNT_NAME';

Wording: given 2 accounts, they are linked if they accessed the same IP at some point of time.

Level 1: select all accounts/IPs linked to a given account ID 123

SELECT account.username, account_ip.* FROM account_ip 
INNER JOIN account ON account.id = account_ip.account
WHERE ip IN (
    SELECT ip FROM account_ip WHERE account = 123
);

Level 2: select all accounts/IPs linked to all accounts linked to a given account ID 123

SELECT account.username, account_ip.* FROM account_ip INNER JOIN account ON account.id = account_ip.account
WHERE ip IN (
	SELECT ip FROM account_ip WHERE account IN (
		SELECT account FROM account_ip WHERE ip IN (
			SELECT ip FROM account_ip WHERE account = 123
		)
	)
);

You can build up more levels from here, see:

mod-ip-tracker's People

Contributors

francescoborzi avatar helias avatar kitzunu avatar locus313 avatar nefertumm avatar winfidonarleyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.