forked from GitHub/dbot
commit
c7a2b81e5e
@ -9,12 +9,12 @@ var dent = function(dbot) {
|
|||||||
var username = dbot.config.dent.username,
|
var username = dbot.config.dent.username,
|
||||||
password = dbot.config.dent.password,
|
password = dbot.config.dent.password,
|
||||||
info,
|
info,
|
||||||
auth = "Basic " +
|
auth = "Basic " +
|
||||||
new Buffer(username + ":" + password).toString("base64");
|
new Buffer(username + ":" + password).toString("base64");
|
||||||
|
|
||||||
request.post({
|
request.post({
|
||||||
'url': 'http://identi.ca/api/statuses/update.json?status=' +
|
'url': 'http://identi.ca/api/statuses/update.json?status=' +
|
||||||
content,
|
escape(content),
|
||||||
'headers': {
|
'headers': {
|
||||||
'Authorization': auth
|
'Authorization': auth
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ var dent = function(dbot) {
|
|||||||
this.onLoad = function() {
|
this.onLoad = function() {
|
||||||
if(dbot.config.dent.dentQuotes === true && _.has(dbot.modules, 'quotes')) {
|
if(dbot.config.dent.dentQuotes === true && _.has(dbot.modules, 'quotes')) {
|
||||||
dbot.api.command.addHook('~qadd', function(key, text) {
|
dbot.api.command.addHook('~qadd', function(key, text) {
|
||||||
this.api.post(key + ': ' + text);
|
this.api.post(key + ': ' + text);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
@ -25,10 +25,14 @@ var js = function(dbot) {
|
|||||||
if(ret !== undefined) {
|
if(ret !== undefined) {
|
||||||
event.reply(ret);
|
event.reply(ret);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'jesus': function (event) {
|
||||||
|
event.reply(event.user + ": s/(.)(.)(.)(..)/\4\2 \1\3/")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
commands['~js'].regex = [/^~js (.*)/, 2];
|
commands['~js'].regex = [/^~js (.*)/, 2];
|
||||||
commands['~ajs'].regex = [/^~ajs (.*)/, 2];
|
commands['~ajs'].regex = [/^~ajs (.*)/, 2];
|
||||||
|
commands['jesus'].regex = [/^jesus$/, 2];
|
||||||
commands['~ajs'].access = 'admin';
|
commands['~ajs'].access = 'admin';
|
||||||
|
|
||||||
this.name = 'js';
|
this.name = 'js';
|
||||||
|
Loading…
Reference in New Issue
Block a user