3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

Merge branch 'betterusers' of github.com:reality/dbot into betterusers

This commit is contained in:
reality 2014-09-08 21:02:16 +00:00
commit 5551e8545f
6 changed files with 7 additions and 5 deletions

View File

@ -54,7 +54,7 @@ var atheme = function(dbot) {
this.listener = function(event) { this.listener = function(event) {
if(event.user === 'ChanServ') { if(event.user === 'ChanServ') {
var flags = event.params.match(/(\d+)\s+([^ ]+)\s+(\+\w+)\s+\((\#[\w\.]+)\)/), 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])) { if(flags && _.has(this.flagStack[event.server], flags[4])) {
this.flagStack[event.server][flags[4]].flags[flags[2]] = flags[3]; 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) { 'getLastFM': function(server, nick, callback) {
dbot.api.profile.getProfile(server, nick, function(err, user, profile) { dbot.api.profile.getProfile(server, nick, function(err, user, profile) {
if(user) { if(user) {
if(profile && _.has(profile.profile, 'lastfm')) { if(profile && _.has(profile.profile, 'lastfm') && _.isString(profile.profile.lastfm)) {
callback(user, profile.profile.lastfm.toLowerCase()); callback(user, profile.profile.lastfm.toLowerCase());
} else { } else {
callback(user, null); callback(user, null);

View File

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

View File

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

View File

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

View File

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