summary refs log tree commit diff homepage
path: root/README.md
blob: 1d67b50e5336f403bc2d57bceb8eda950c779fe4 (plain) (blame)
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
# shulker

[![Build Status](https://david-dm.org/destruc7i0n/shulker.svg)](https://david-dm.org/destruc7i0n/shulker)
[![Build Status](https://travis-ci.org/destruc7i0n/shulker.svg?branch=master)](https://travis-ci.org/destruc7i0n/shulker)

> Connects [Discord](https://discordapp.com/) and [Minecraft](https://minecraft.net) Servers by sending messages back and forth without any mods or plugins.

## Example
![discord-irc](http://i.giphy.com/6yj4FRw3XZt6M.gif)

## Installation and usage

In your Minecraft server.properties, make sure you have:
```
enable-rcon=true
rcon.password=<your password>
rcon.port=<1-65535>
```

Run the following on your server hosting (in a screen, and make sure to replace your URL and your log directory location):

``` sh
tail -F /PATH_TO_MINECRAFT_INSTALL/logs/latest.log | grep --line-buffered ": <" | while read x ; do echo -ne $x | curl -X POST -d @- https://YOUR_URL/minecraft/hook ; done
```

Clone repository onto a server, edit ```config.json``` and change any options, and then,
```bash
In the repository folder:
$ npm install
$ npm start
```
You can also easily Deploy to Heroku or Bluemix.

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
[![Deploy to Bluemix](https://bluemix.net/deploy/button.png)](https://bluemix.net/deploy?repository=https://github.com/destruc7i0n/shulker)


### Configuration
```js
{
    "PORT": 8000, # Port you want to run the webserver for the hook on
    "DISCORD_EMAIL": "example@example.com", # discord email
    "DISCORD_PASSWORD": "password123", # discord password
    "DISCORD_CHANNEL": "general", # channel for discord bot
    "MINECRAFT_SERVER_RCON_IP": "example.com", # minecraft server ip (make sure you have enabled rcon)
    "MINECRAFT_SERVER_RCON_PORT": <1-65535>, # minecraft server rcon port 
    "MINECRAFT_SERVER_RCON_PASSWORD": "<your password>", # minecraft server rcon password
    "WEBHOOK": "/minecraft/hook", # web hook, where to send the log to
    "REGEX_MATCH_CHAT_MC": "\\[Server thread/INFO\\]: <(.*)> (.*)", # what to match for chat (best to leave as default)
    "REGEX_IGNORED_CHAT": "packets too frequently", # what to ignore, you can put any regex for swear words for example and it will be ignored
    "DEBUG": false # dev debugging
}
```


## Tests
Run the tests with:
```bash
$ npm test
```

## License

ISC. See `LICENSE`.

## Upcoming
* A "merge accounts" function to allow Minecraft players to associate their Discord accounts with their Minecraft accounts so that usernames are accurate
* Ability to post messages to Discord on behalf of Discord users, rather than using a bot user (hopefully after the official API is released)

5:46:51 +0200'>2015-08-14plain: use cgit_print_error_page() instead of html_status()John Keeping 2015-08-14clone: use cgit_print_error_page() instead of html_status()John Keeping 2015-08-14cgit: use cgit_print_error_page() where appropriateJohn Keeping 2015-08-14ui-shared: add cgit_print_error_page() functionJohn Keeping 2015-08-14ui-patch: make sure to send http headersChristian Hesse 2015-08-13Makefile: make "git/config.mak.uname" inclusion optionalJohn Keeping 2015-08-13ui-shared: show full date in tooltip if longer ago than max_relativeJohn Keeping 2015-08-13ui-shared: use common function in print_rel_date()John Keeping 2015-08-13ui-shared: extract date formatting to a functionJohn Keeping 2015-08-13filter: don't use dlsym unnecessarilyJohn Keeping 2015-08-13ui-tree: use "sane" isgraph()John Keeping 2015-08-13cgit.h: move stdbool.h from ui-shared.hJohn Keeping 2015-08-13cache.c: fix header orderJohn Keeping 2015-08-13configfile.c: don't include system headers directlyJohn Keeping 2015-08-13Remove redundant includesJohn Keeping 2015-08-13Makefile: include Git's config.mak.unameJohn Keeping 2015-08-13tests: allow shell to be overriddenJohn Keeping 2015-08-13redirect: cleanlinessJason A. Donenfeld 2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld 2015-08-12ui-log: fix double countingJohn Keeping 2015-08-12log: allow users to follow a fileJohn Keeping 2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping 2015-08-12t0110: Chain together using &&Jason A. Donenfeld 2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld 2015-08-12filters: apply HTML escapingLazaros Koromilas 2015-08-12git: update to v2.5.0Christian Hesse 2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt