3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

Just wanna post hashtags #yolo

This commit is contained in:
Dafydd Francis 2013-01-30 22:13:08 +00:00
parent feb51aaceb
commit 3f2bb2bde1

View File

@ -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);