Merge pull request #231 from lorenzhs/nicklistupdates

Ignore nicklist updates for buffers without a nicklist
This commit is contained in:
David Cormier 2014-03-10 14:23:06 -04:00
commit d27d3b415d

View file

@ -49,14 +49,19 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
* Adds a nick to nicklist
*/
var addNick = function(group, nick) {
if (nicklistRequested()) {
nicklist[group].nicks.push(nick);
flatnicklist = getFlatNicklist();
}
};
/*
* Deletes a nick from nicklist
*/
var delNick = function(group, nick) {
group = nicklist[group];
if (group === undefined) {
return;
}
group.nicks = _.filter(group.nicks, function(n) { return n.name !== nick.name;});
flatnicklist = getFlatNicklist();
/*