-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
78 lines (55 loc) · 2.75 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
BitBot is an IRC bot for transfering (small) amounts of bitcoins (BTCs) to
other IRC users.
If you care to donate some BTCs, 18NcKvHXVTpx3EcUoUx61Cu93w2CoEC8YX is my
address :-)
Jean-Paul van Oosten <[email protected]>
Dependencies
------------
BitBot requires a running bitcoind and python-irc. The latter can be installed
with `pip install irc`. Bitcoind can be downloaded from bitcoin.org.
Please know that before you can see your transactions, you need to have the
latest blocks in the blockchain; this might take a while (see `bitcoind
getblockcount` to see where you are at).
To communicate with bitcoind, we use the jsonrpc library from
http://json-rpc.org/wiki/python-json-rpc, but it is included in the package.
It is licensed as LGPL.
The bitcoin-24.com integration uses the requests library (`pip install
requests`). This is optional, and everything will work with just BTC. The
bitcoin24 module was provided by wilatai, and has an MIT license.
Configuration
-------------
For the IRC-connection, BitBot works with so-called ircnets. If you call your
ircnet FreeNode, BitBot expects two files in ./conf:
- ircnet-FreeNode
Contains the configuration of host and port in the form: `host:port`, for
example: `irc.freenode.net:6667`
- channels-FreeNode
Contains the channels, one on each line. If the channel is protected with a
key, separate it from the channel with a space.
The rpc user and password for the bitcoin daemon is done through reading
~/.bitcoin/bitcoin.conf. This is not ideal (since you might not be running the
bitcoin daemon as the same user as BitBot, so this will probably change in the
future).
Furthermore, you can make aliases between hosts (for example, if someone
connects using two different hosts). Configure this through the `conf/aliases`
file, which has the following format:
nick1!ident1@host1 nick2!ident2@host2
this aliases nick1 to nick2.
Finally, the transfer fee for transfering funds from a BitBot account to your
own wallet is configurable through `conf/txfee`. Be advised that usually
transfers are confirmed more quickly when the transfer fee is not 0.
Running the Bot
---------------
To run the bot, you must run ./bitbot.py with the name of the network it is
connecting to. If you are connecting to FreeNode, like the examples in the
'Configuration' section of this README had you configure, you would do:
./bitbot.py FreeNode
Available commands
------------------
+help
+wallet (shows the address for receiving payments to your account)
+balance (shows your balance)
+tip <nick> <amount><BTC|EUR> (give someone a bit of money)
+transfer <amount><BTC|EUR> <bitcoinaddress> (transfer money to another account)
+txfee (gets the current transfer fee)
+xchange [<amount><BTC|EUR>] (gets the current exchange rate from bitcoin-24.com)