diff options
| author | tv <tv@also> | 2011-05-29 14:27:19 +0200 | 
|---|---|---|
| committer | tv <tv@also> | 2011-05-29 14:27:19 +0200 | 
| commit | 9ea4cbe1e006f703d1367f5aa3229849775b7128 (patch) | |
| tree | 4359d7ab5dcfcc962dbac7ab9e33fa289b7ca8a0 | |
| parent | 090bbee109c46704e2c6e666ab27dd47c235d709 (diff) | |
roboctl: parse nick from tinc.conf
| -rw-r--r-- | modules/roboctl/index.js | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/modules/roboctl/index.js b/modules/roboctl/index.js index bef53109..ac92c969 100644 --- a/modules/roboctl/index.js +++ b/modules/roboctl/index.js @@ -1,5 +1,9 @@ + +nick = /(^|\n) *Name *= *(\S*) *($|\n)/ +    .exec(require('fs').readFileSync('/etc/tinc/retiolum/tinc.conf'))[2]; +  var config = { -  "nick": "roboctl", +  "nick": nick + '-krebs',    "server": "irc.freenode.net",    "port": 6667,    "channel": "#tincspasm" @@ -9,6 +13,6 @@ irc = require('./lib/irc').createClient(config);  // TODO call back when joined  irc.connect(function () { -  console.log('like a boss'); +  console.log('like a boss: ' + nick);    //irc.write();  }); | 
