mirror of
https://github.com/jwinterm/node-tip-bot.git
synced 2026-10-17 05:41:42 +02:00
moved the config file
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
var irc = require('irc')
|
||||
, winston = require('winston')
|
||||
, config = require('yaml-config')
|
||||
, fs = require('fs')
|
||||
, yaml = require('js-yaml')
|
||||
, coin = require('node-dogecoin');
|
||||
|
||||
// load winston's cli defaults
|
||||
winston.cli();
|
||||
|
||||
// load settings
|
||||
var settings = config.readConfig('./config/irc.yml');
|
||||
var settings = yaml.load(fs.readFileSync("./config.yml", "utf-8"));
|
||||
|
||||
// connect to coin json-rpc
|
||||
winston.info('Connecting to coind...');
|
||||
@@ -40,8 +41,6 @@ var client = new irc.Client(settings.connection.host, settings.login.nickname, {
|
||||
, channels: settings.channels
|
||||
, userName: settings.login.username
|
||||
, realName: settings.login.realname
|
||||
|
||||
, debug: true
|
||||
});
|
||||
|
||||
// gets user's login status
|
||||
@@ -246,7 +245,7 @@ client.addListener('message', function(from, channel, message) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
connection:
|
||||
host: irc.freenode.net
|
||||
port: 6667
|
||||
secure: false
|
||||
login:
|
||||
nickname: 'nodetip'
|
||||
username: 'nodetip'
|
||||
realname: node.js dogecoin tipping bot
|
||||
channels:
|
||||
- '##tipbots'
|
||||
rpc:
|
||||
host: localhost
|
||||
port: 22555
|
||||
user: dogecoinrpc
|
||||
pass: pass
|
||||
master_account: unek
|
||||
coin:
|
||||
withdrawal_fee: 2
|
||||
min_withdraw: 5
|
||||
min_confirmations: 3
|
||||
short_name: ' DOGE'
|
||||
full_name: dogecoin
|
||||
messages:
|
||||
error: 'Sorry %name%, something went wrong.'
|
||||
no_funds: "Sorry %name%, you don't have enough funds (you're %short% %short_name% short)"
|
||||
not_identified: '%name%: You need to be identified with NickServ to tip.'
|
||||
tipped: 'Wow! %from% tipped %to% %amount%%short_name%! "/msg %nick% help" to claim.'
|
||||
balance: '%name% has %balance%%short_name%.'
|
||||
balance_unconfirmed: '%name% has %balance%%short_name% (unconfirmed: %unconfirmed%%short_name%)'
|
||||
deposit_address: "%name%'s deposit address is %address%"
|
||||
withdraw_too_small: 'Sorry %name%, you need to withdraw at least %min_withdraw%%short_name% (you have %balance%%short_name%)'
|
||||
invalid_address: 'Sorry %name%, the address you specified is invalid (%address%).'
|
||||
withdraw_success: '%name%: %amount%%short_name% has been withdrawn from your account to %address%'
|
||||
withdraw_success2: 'You have been charged %withdrawal_fee%%short_name% withdrawal fee. Transaction id: %transaction%.'
|
||||
@@ -1,35 +0,0 @@
|
||||
development:
|
||||
connection:
|
||||
host: irc.freenode.net
|
||||
port: 6667
|
||||
secure: false
|
||||
login:
|
||||
nickname: 'nodetip'
|
||||
username: 'nodetip'
|
||||
realname: node.js dogecoin tipping bot
|
||||
channels:
|
||||
- '##tipbots'
|
||||
rpc:
|
||||
host: localhost
|
||||
port: 22555
|
||||
user: 'dogecoinrpc'
|
||||
pass: 'pass'
|
||||
master_account: unek
|
||||
coin:
|
||||
withdrawal_fee: 2
|
||||
min_withdraw: 5
|
||||
min_confirmations: 3
|
||||
short_name: ' DOGE'
|
||||
full_name: dogecoin
|
||||
messages:
|
||||
error: 'Sorry %name%, something went wrong.'
|
||||
no_funds: "Sorry %name%, you don't have enough funds (you're %short% %short_name% short)"
|
||||
not_identified: '%name%: You need to be identified with NickServ to tip.'
|
||||
tipped: 'Wow! %from% tipped %to% %amount%%short_name%! "/msg %nick% help" to claim.'
|
||||
balance: '%name% has %balance%%short_name%.'
|
||||
balance_unconfirmed: '%name% has %balance%%short_name% (unconfirmed: %unconfirmed%%short_name%)'
|
||||
deposit_address: "%name%'s deposit address is %address%"
|
||||
withdraw_too_small: 'Sorry %name%, you need to withdraw at least %min_withdraw%%short_name% (you have %balance%%short_name%)'
|
||||
invalid_address: 'Sorry %name%, the address you specified is invalid (%address%).'
|
||||
withdraw_success: '%name%: %amount%%short_name% has been withdrawn from your account to %address%'
|
||||
withdraw_success2: 'You have been charged %withdrawal_fee%%short_name% withdrawal fee. Transaction id: %transaction%.'
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"irc": "~0.3.6",
|
||||
"yaml-config": "~0.3.0",
|
||||
"js-yaml": "~3.0.1",
|
||||
"winston": "~0.7.2",
|
||||
"node-dogecoin": "~0.3.5"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user