Coder Social home page Coder Social logo

digideskio / doger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mniip/doger

0.0 1.0 0.0 152 KB

The official dogecoin IRC tipbot. Resides in #dogecoin at freenode.

Home Page: irc://irc.freenode.net/dogecoin

License: GNU General Public License v3.0

Python 100.00%

doger's Introduction

Doger

IRC tip bot in python.

Requirements:

  • RPC library - From here or pypi.
  • Dogecoind - From here, you need the dogecoind binary.
  • Postgres - From here, python binding from here
  • Python - Obviously.

Setup:

  • Create a file in the same folder as the code named Config.py, and put the following into it:
config = {
	"host": "ircserverhostna.me",
	"port": 6667,
# optional:
#	"ipv6": True,
#	"bindhost": "10.0.0.1",
	"user": "identname",
	"rname": "Real name",
	"confirmations": 4,
	"account": "nickservaccountname",
	"password": "nickservpassword",
	"admins": {
		"unaffiliated/johndoe": True # hosts/cloaks of admins
	},
	"prefix": "!", # the trigger character
# optional:
#	"ssl": {
#		"certs": "/etc/ssl/certs/ca-certificates.crt"
#	},
	"instances": {
		"nick1": ["#channel1", "#channel2"],
		"nick2": ["#channel3"]
	},
# optional:
#	"ignore": {
#		"cost": 10, # score added for every command
#		"limit": 80, # max allowed score
#		"timeout": 240 # ignore length
#	},
	"logfile": "path/to/log",
# optional:
#	"irclog": ("nick1", "#logchannel"),
	"database": "name of pgsql database"
}
  • Add the following to the dogecoin.conf:
rpcthreads=100
daemon=1
irc=0
dnsseed=1
paytxfee=1.0
blocknotify=/usr/bin/touch blocknotify/blocknotify
  • Create a postgres database with the following schema:
CREATE TABLE accounts (account character varying(16) NOT NULL, balance bigint DEFAULT 0, CONSTRAINT balance CHECK ((balance >= 0)));
CREATE TABLE address_account (address character varying(34) NOT NULL, account character varying(16), used bit(1) DEFAULT B'0'::"bit" NOT NULL);
CREATE TABLE locked (account character varying(16));
CREATE TABLE lastblock (block character varying(64));
CREATE TABLE txlog (timestamp double precision, token character varying(8), source character varying(16), destination character varying(16), amount bigint, transaction character varying(64), address character varying(34));
INSERT INTO lastblock VALUES ('0');
ALTER TABLE accounts ADD CONSTRAINT accounts_pkey PRIMARY KEY (account);
ALTER TABLE address_account ADD CONSTRAINT address_account_pkey PRIMARY KEY (address);
ALTER TABLE address_account ADD CONSTRAINT address_account_account_fkey FOREIGN KEY (account) REFERENCES accounts(account);
ALTER TABLE locked ADD CONSTRAINT locked_pkey PRIMARY KEY (account);

Running it:

  • Start up the dogecoin daemon (dogecoind)
  • Launch the bot with python Main.py

doger's People

Contributors

mniip avatar vampjaz avatar

Watchers

 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.