3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00

some fixes

This commit is contained in:
Luke Slater 2014-09-08 10:42:59 +00:00
parent 63ded5b197
commit 03bab4e7db
6 changed files with 7 additions and 5 deletions

View File

@ -54,7 +54,7 @@ var atheme = function(dbot) {
this.listener = function(event) {
if(event.user === 'ChanServ') {
var flags = event.params.match(/(\d+)\s+([^ ]+)\s+(\+\w+)\s+\((\#[\w\.]+)\)/),
end = event.params.match(/end of \u0002(\#\w+)\u0002 flags listing/i);
end = event.params.match(/end of \u0002(\#[\w\.]+)\u0002 flags listing/i);
if(flags && _.has(this.flagStack[event.server], flags[4])) {
this.flagStack[event.server][flags[4]].flags[flags[2]] = flags[3];

View File

@ -15,7 +15,7 @@ var lastfm = function(dbot) {
'getLastFM': function(server, nick, callback) {
dbot.api.profile.getProfile(server, nick, function(err, user, profile) {
if(user) {
if(profile && _.has(profile.profile, 'lastfm')) {
if(profile && _.has(profile.profile, 'lastfm') && _.isString(profile.profile.lastfm)) {
callback(user, profile.profile.lastfm.toLowerCase());
} else {
callback(user, null);

View File

@ -1,6 +1,6 @@
{
"category_not_found": {
"en": "Nobody loves {category}",
"en": "Everyone is rather ambivalent towards the matter of {category}",
"es": "Nadie ama a {category}",
"na'vi": "{category} yawne ke lu kawturu.",
"cy": "Does neb yn caru {category}",

View File

@ -97,7 +97,7 @@ var commands = function(dbot) {
} else {
event.reply(dbot.t('unknown_alias', { 'alias': nick }));
}
});
}.bind(this));
},
'~mergeusers': function(event) {

View File

@ -44,7 +44,7 @@ var users = function(dbot) {
}.bind(this),
// Remove an alias record
'removeAlias': function(server, alias) {
'removeAlias': function(server, alias, callback) {
var id = alias + '.' + server;
this.db.del('user_aliases', id, function(err) {
callback(err);

View File

@ -1,3 +1,5 @@
var _ = require('underscore')._;
var api = function(dbot) {
return {
'getUrl': function(path) {