Example #1
0
  sort: function (cids) {
    var groups = { trumps: [] };

    groups[suites.Spades.id] = [];
    groups[suites.Hearts.id] = [];
    groups[suites.Diamonds.id] = [];

    _.each(cids, function (cid) {
      var card = initialDeck[cid];
      if (card.isTrump) {
        groups.trumps.push(cid);
      } else {
        groups[card.suite.id].push(cid);
      }
    });

    return [].concat(
      _.sortBy(groups.trumps, function (cid) {
        return orderTable.trumps.indexOf(cid);
      }),
      _.sortBy(groups[suites.Spades.id], function (cid) {
        return orderTable.nonTrumpsTypes.indexOf(initialDeck[cid].type.id);
      }),
      _.sortBy(groups[suites.Hearts.id], function (cid) {
        return orderTable.nonTrumpsTypes.indexOf(initialDeck[cid].type.id);
      }),
      _.sortBy(groups[suites.Diamonds.id], function (cid) {
        return orderTable.nonTrumpsTypes.indexOf(initialDeck[cid].type.id);
      })
    );
  },
Example #2
0
		 	}, function(err){

		 		synonyms = _.map(_.unique(synonyms), function(num){ return [num, wordCount.indexOf(num)] });
		 		antonyms = _.map(_.unique(antonyms), function(num){ return [num, wordCount.indexOf(num)] });

		 		synonyms = _.sortBy(synonyms, function(num){ return num[1] }).reverse()
		 		antonyms = _.sortBy(antonyms, function(num){ return num[1] }).reverse()

		 		wordnet.close()

				synonyms = _.filter(synonyms, function(num){ return (num[0].indexOf("_")==-1) })
		 		antonyms = _.filter(antonyms, function(num){ return (num[0].indexOf("_")==-1) })
		 		
				// eliminate the numbers

				synonyms = _.unique(_.flatten(_.map(synonyms, function(num){ return num[0] })))
		 		antonyms = _.unique(_.flatten(_.map(antonyms, function(num){ return num[0] })))

		 		console.vlog("DEBUGWORDNET: synonyms: "+JSON.stringify(synonyms, null, 4))
		 		console.vlog("DEBUGWORDNET: antonyms: "+JSON.stringify(antonyms, null, 4))

		 		callbackg(null, {
		 			'synonyms':_.filter(synonyms, function(num){ return (num[0].indexOf("_")==-1) }),
		 			'antonyms':_.filter(antonyms, function(num){ return (num[0].indexOf("_")==-1) })
		 		})
		})
Example #3
0
var cleanposfromredis = function(data, withscores)
{
	if (withscores == false)
	{
		var output = []
		_.each(data, function(value, key, list){
			if (key % 2 == 0)
				output.push(value.split("^")[0])
		}, this)
		//  if you don't need score and POS than unique on seeds
		return _.unique(output)
	}
	else
	{
		var output = []
		var temp = []
		_.each(data, function(value, key, list){ 
			if (key % 2 == 0)
				{
				temp = temp.concat(value.split("^"))
				}
			else
				{
				temp.push(parseFloat(value))
				output.push(temp.slice(0))
				temp = []
				}
		}, this)

		output = _.sortBy(output, function(num){ return num[0] })

		return output
	}
}
Example #4
0
  	_.each(Object.keys(features), function(value, key, list){
  		if (!(value in replace))
  		{
	    	var list = seekfeature(value, seeds)

	        _.each(list, function(element, key1, list1){ 
		      	// the actual score from ppdb is a fine
		   		list[key1][1] = (list[key1][1] == 0 ? 0 : idf(element[0])/Math.sqrt(list[key1][1]))
	      	}, this)
	    
	      	list = _.sortBy(list, function(num){ return num[1] })
	      	
	      	var atleastone = false

	      	_.each(list, function(elem, key, list){ 
	      		if (!(elem[0] in replace))
	      			{
	      			replace[elem[0]] = elem[1]
	      			
	      			if (value != elem[0])
	      				details[value] = elem[0]

	      			atleastone = true
	      			}
	      	}, this)

	      	if ((atleastone == false) && (list.length > 0))
	      		details[value] = list[0][0]
      	}
  	}, this)
Example #5
0
function generateDocsForSourceTree(base, excludes) {
    var modules = [];
    file.walkSync(base, function (currentDir, dirs, files) {
        var ok = _.all(_.map(excludes, function (dir) {
            return currentDir.indexOf(base + dir) != 0;
        }));
        if (!ok) return;
        files.forEach(function (file) {
            if (file.indexOf(".js") != file.length - 3) return;

            var fullPath = currentDir + "/" + file;
            var moduleName = fullPath.substring(base.length + 1, fullPath.lastIndexOf(".js")).replace(/\//g, ".");
            modules.push([fullPath, moduleName]);
        });
    });
    modules = _.sortBy(modules, function (module) {
        return module[1].toLowerCase();
    });

    modules.forEach(function (pair) {
        parseModule(pair[0], function (module) {
            module.name = pair[1];
            module.otherModules = modules;
            module.otherModulesCount = modules.length;
            generateModulePage(module);
            console.log(pair[1] + " Done!");
        });
    });
    generateIndexPage({
        otherModules: modules,
        otherModulesCount: modules.length
    });
}
Example #6
0
    function(callback){

        outstats = _.sortBy(outstats,  function(num){ return num['score'] })
        outstats.reverse()

        var crossdist = _.map(outstats, function(num){
            num['score floored'] = Math.floor(num['score']*10)*10 
            return num });

        crossdist = _.groupBy(crossdist, function(num) {return num['score floored']})

        console.log(JSON.stringify(crossdist, null, 4))
        
        for (var col=100; col>=0; col -= 10) {
            var ind = 0
            var inf = 0
            _.each(outstats, function(value, key, list){ 
                if (value['score']*100 >= col)
                    {
                    ind = ind + 1
                    inf = inf + value['keyphrase influence']
                    }
            }, this)
            console.log(col/100 + " -- " +(ind/outstats.length*100).toFixed()+"%"+ " -- "+(inf*100).toFixed()+"%")
        }
        utils.closeredis()
    }
Example #7
0
 function sort_by_index_descending(keys, callback) {
     var sorted_keys = _.sortBy(keys, function(key){
         var id = parseInt(/\d+$/.exec(key)[0], 10);
         return id * -1; /* times -1 so that it will be reversed */
     });
     callback(null, sorted_keys);
 },
Example #8
0
	}, function(request, response, body) {
	    res.render('ontologies', {
          'title': 'Ontology List',
          'ontologies': _.sortBy(ontologies, 'id'),
          'stati': body
	    });
	});
Example #9
0
function processUserTweets() {
    var start = new Date().getTime();
    var unsortedUsers = [];
    for (var key in users) {
        unsortedUsers.push({
            name: key,
            tweets: users[key]
        });
    }
    var sortedUsers = _.sortBy(unsortedUsers, function(user) {
        return user.tweets;
    });
    sortedUsers.reverse();

    twitMasters = [];
    for (x in sortedUsers) {
        if (x == 10) {
            break;
        }
        twitMasters.push(sortedUsers[x]);
    }
    var end = new Date().getTime();
    var time = end - start;
    console.log("Time taken (ms): [" + time + "] for [" + sortedUsers.length + "] records");
}
Example #10
0
exports.discussion = function (head, req) {
    start({code: 200, headers: {'Content-Type': 'text/html'}});

    var row, rows = [];
    while (row = getRow()) {
        rows.push(row);
    }
    var comments = _.filter(rows, function (r) {
        return r.doc.type === 'comment';
    });
    var doc_row = _.detect(rows, function (r) {
        return r.doc.type === 'page';
    });
    var empty_doc = !(doc_row);
    var doc = doc_row ? doc_row.doc: {};

    comments = _.map(comments, function (c) {
        c.doc.type = 'comment';
        c.doc.pptime = utils.prettyTime(c.doc.time);
        return c.doc;
    });
    // add edit events to comments
    if (doc && doc.history) {
        _.each(doc.history, function (h) {
            h.type = 'edit';
            h.is_edit = true;
            h.pptime = utils.prettyTime(h.time);
            comments.push(h);
        });
    }
    comments = _.sortBy(comments, function (c) {
        return c.time;
    });
    var participants = comments.map(function (c) {
        return c.user;
    });
    participants = _.uniq(participants);

    if (req.query.page && req.query.page[0] === '_') {
        return shows.not_found(null, req);
    }

    events.once('afterResponse', discussion_ui.bindDiscussion);

    return {
        title: doc.title || utils.idToTitle(req.query.page),
        content: templates.render('discussion.html', req, {
            doc: doc,
            page_title: doc.title || utils.idToTitle(req.query.page),
            page_subtitle: doc.subtitle,
            pageid: doc._id || req.query.page,
            participants: participants,
            comments: comments,
            current_tab: "discussion_page",
            logged_in: !!(req.userCtx.name),
            empty_doc: empty_doc
        })
    };
};
Example #11
0
	_.each(evalution, function(value, key, list){ 
		if (value.length > 0)
			{
			evalution[key] = _.sortBy(value, function(num){ return num[0] })
			evalution[key] = evalution[key].reverse()
			output.push([key, evalution[key][0][0]])
			}
	}, this)
Example #12
0
exports.getRowsHC = function(facilities, reports, dates) {
    var rows = [];

    // convenience
    if (facilities.rows) { facilities = facilities.rows; }

    var saved = {};
    for (var i in facilities) {
        var f = facilities[i];
        var id = f.key[2];
        var name = f.key[2+3]; //name is three elements over
        var phone = f.key[6];

        if (!saved[id]) { saved[id] = 1; }
        else { continue; }

        row = {
            id: id,
            name: name,
            phone: phone,
            records: [],
            valid: 0,
            valid_percent: 0
        };

        rows.unshift(row);
    };

    // find the matching facility and populate row.records array.
    _.each(rows, function(row) {
        _.each(reports, function(report) {
            if (report.key[5] === row.id) {
                var is_valid = isValid(report.value);
                var formatted_record = {
                    id: report.id,
                    clinic: {
                        id: report.key[5],
                        name: report.value.clinic,
                    },
                    month: report.key[2],
                    month_pp: utils.prettyMonth(report.key[2], true),
                    year: report.key[1],
                    reporter: report.value.reporter,
                    reporting_phone: report.value.reporting_phone,
                    is_valid: is_valid,
                    week_number: report.value.week_number
                };
                formatted_record.name = getName(formatted_record);
                row.records.unshift(formatted_record);
            }
        });
    });

    countValid(rows, dates);
    processNotSubmitted(rows, dates);

    return _.sortBy(rows, function (r) { return r.valid_percent; });
};
Example #13
0
 .exec(function(err, msg) {
     if (!err) {
     	var sorted = _.sortBy(msg.comments, function(c){ c.date }).reverse();
         res.send(sorted);
     } else {
         console.log(err);
         res.send(409)
     };
 });
Example #14
0
    _.each(rows, function(row) {
        var pat = function(str) {
            if (!str)
                return '';
            if(str.toString().length < 2) {
                return '0' + str;
            } else {
                return str;
            }
        };

        var recordByTime = function(obj) {
            if(obj.week_number) {
                return obj.year + '' + pat(obj.week_number);
            } else {
                return obj.year + '' + pat(obj.month);
            }
        };

        var startdate = dates.list[0],
            enddate = dates.list[dates.list.length-1],
            recorded_time_frames = _.map(row.records, recordByTime),
            date = startdate.clone();

        while (date >= enddate) {

            var extra = {},
                val = weekly_reports ? getWeek(date) : getMonth(date)+1;

            var empty_report = {
                year: getYear(date),
                not_submitted: true
            }

            if (weekly_reports) {
                extra.week_number = val;
            } else {
                extra.month = val;
            }

            if (!_.contains(recorded_time_frames, getYear(date) + '' + pat(val))) {
                _.extend(empty_report, extra);
                empty_report.name = getName(empty_report);
                row.records.push(empty_report);
            }

            if (weekly_reports)
                date.subtract('weeks', 1);
            else
                date.subtract('months', 1);

        };

        row.records = _.sortBy(row.records, recordByTime).reverse();

    });
Example #15
0
_.each(X, function(value, key, list){ 
	var lem = lemmerEng.lemmatize(value)
	if ((lem.length > 0) && ('text' in lem[0])) 
		{
		lem = _.sortBy(lem, function(num){ return num['text'].length });
		newX.push(lem[0]['text'].toLowerCase())
		}
	else
		newX.push(value)
}, this)
Example #16
0
		client.smembers(string, function(err, replies) {

			if (err) 
			{
				console.vlog("DEBUGPPDB: err " + err)
				callback(err)
			}
			
			//console.vlog("DEBUGPPDB: string to expansion: " + string+ " POS: "+pos + " relation: "+ relation+ " db: "+ db +" replies " + JSON.stringify(replies))

			_.each(replies, function(value, key, list){ 

				var splited = value.split("^")

//				console.vlog("DEBUGPPDB:"+splited)

				if (splited[0].indexOf(" ")!=-1)
				{
//				splited[0] = splited[0].replace(/ /g,',')
				if (_.isArray(relation))
					{
					if (relation.indexOf(splited[4])!=-1)
							output.push([splited[0], splited[1], parseFloat(splited[2]), parseFloat(splited[3])])
					}
					else
					output.push([splited[0], splited[1], parseFloat(splited[2]), parseFloat(splited[3])])
	
				}
				else
				{
					if (splited[1] in POS)
						splited[1] = POS[splited[1]]

					if (pos in POS)
						pos = POS[pos]

					if (splited[1] == pos) 
						if (_.isUndefined(relation))
							output.push([splited[0], splited[1], parseFloat(splited[2]), parseFloat(splited[3])])
						else
							if (relation.indexOf(splited[4])!=-1)
								output.push([splited[0], splited[1], parseFloat(splited[2]), parseFloat(splited[3])])
				}
			}, this)

			output = _.sortBy(output, function(num){ return num[2] });
			
			//console.vlog("DEBUGPPDB: string: " + string + " lemma: " + JSON.stringify(output, null, 4))
		  	
			//console.vlog("DEBUGPPDB: string: " + string + " final output: " + JSON.stringify(output, null, 4))
	//			client.disconnect()
			callback(err, output)
		
        })
Example #17
0
		getFeatures: function() {
			var featlist = []
			_.each(this.mapFeatureToWeight, function(weight, index, list){
				if (parseInt(index) == 0)
					featlist.push(['bias', weight])
				else
					featlist.push([this.featureLookupTable.numberToFeature(parseInt(index)-1), weight])
			}, this)
			featlist = _.sortBy(featlist, function(num){return num[1]})
			return featlist
		},
Example #18
0
/**
 * OrderLabelJoin comprises the labels in the separated format to labels within original JSON format.
 * developemnt in progress
 */
function OrderLabelJoin(classes, Observable, sample, explanation)
{
	sample = "[start] "+sample+" [end]"
	labelfeat = []

	for (label in explanation['positive'])
	{
		sorted = _.sortBy(explanation['positive'][label], function(num){ return num[1]; });
		sorted = sorted.reverse()
		labelfeat.push([label,sample.indexOf(sorted[0][0]), sorted[0][0]])
	}
}
Example #19
0
                    }, function() {
                        var timezone = req.user.timezone || 'Europe/London';
                        notifications = _.sortBy(notifications, 'time').reverse();
                        _.each(notifications, function(v, k) {
                            v.time = moment(v.time).tz(timezone);
                        });

                        res.render('notifies', {
                            'server': req.user.server,
                            'notifies': notifications
                        });
                    });
function GetPlayerList(json_dom) {

	if (! json_dom['tournament'] || ! json_dom['tournament']['players']) {
		return [];
	}

	var players = _.map(json_dom['tournament']['players'][0]['player'], function(player_json) {
		var player = new Player(player_json);
		return player.toJson();
	});

	return _.sortBy(players, 'name');
}
Example #21
0
PersonalCorpus.prototype._generateCorpusFromMessageObjs = function(messageObjs) {
		
		var numbers = [];
		// var messagesByNumber = [];
		var corpus = [];
		// messageObjs = _.sortBy(messageObjs, function(obj){ return moment(obj.timestamp).valueOf() });
		
		_.each(messageObjs, function(messageObj){
			if (numbers.indexOf(messageObj.to) == -1) numbers.push(messageObj.to);
			if (numbers.indexOf(messageObj.from) == -1) numbers.push(messageObj.from);
		});
		
		// _.each(messageObjs, function(messageObj){
		// 	var toIndex = numbers.indexOf(messageObj.to);
		// 	var fromIndex = numbers.indexOf(messageObj.to);
		// 	if (toIndex != -1) {
		// 		if (_.isUndefined(messagesByNumber[toIndex])) messagesByNumber[toIndex] = [];
		// 		messagesByNumber[toIndex].push(messageObj);
		// 	} else if (fromIndex != -1) {
		// 		if (_.isUndefined(messagesByNumber[fromIndex])) messagesByNumber[fromIndex] = [];
		// 		messagesByNumber[fromIndex].push(messageObj);
		// 	}
		// });
		
		numbers = _.without(numbers, "Me");
		_.each(numbers, function(number){

			var messages = _.filter(messageObjs, function(messageObj){
				return messageObj.to == number || messageObj.from == number;
			});

			corpus.push({
				number: number,
				messages: messages
			});
		});
	
		
		// _.each(messagesByNumber, function(message, i){
		// 	corpus.push({
		// 		number: numbers[i],
		// 		messages: messagesByNumber[i]
		// 	});
		// });

		corpus = _.sortBy(corpus, function(corpus){
			return - corpus.messages.length;
		});

		return corpus;
}
Example #22
0
    .on ("end", function (){

      // add EOF offset
      offsets[lastKey].push(eofKey);
      offsets[eofKey] = [endOffset, null];

      var size = _.size(buckets),
        sum = _.reduce(buckets, function(memo, num){ return memo + num; }, 0),
        sorted = _.sortBy(buckets, function(val){ return val }),
        median = sorted[Math.floor(size/2)],
        max =  sorted[sorted.length-1], // _.max(buckets),
        maxkey = _.reduce(buckets, function(memo, val, key){ return memo + (val == max ? key :  '') }, ''),
        avg = (sum/size).toFixed(2),
        info = util.format('buckets %d, max %d at %s, sum %d, avg %d, median %d', size, max, maxkey, sum, avg, median);

      console.log(basename, info);

      if (stats) {
        // distribution in groups of 10
        var grouped = _.groupBy(buckets, function(num){ return 1 + 10*(Math.floor((num-1)/10) ) });
        _(grouped).each(function(arr, key, list){
              list[key] = arr.length;
            });
        str = '';
        _.each(grouped, function(value, key){ str += key+"\t"+value+"\n" });
        fs.writeFileSync(countFile, '#'+info+'\n'
            + '#bucket_size (1-10, 11-20, etc.) \t #buckets\n'
            + str, 'utf8');
      }

      // offset data
      var data = {
          firstKey: firstKey,
          keyLength: KEY_LENGTH,
          version: WNdb.version,
          name: basename,
          stats: {
            buckets: size,
            words: sum,
            biggest: max,
            avg: avg,
            median: median
          },
          offsets: offsets
      };

      fs.writeFileSync(jsonFile, JSON.stringify(data), 'utf8');
      console.log('  wrote %s\n', jsonFile);
    })
Example #23
0
            ChannelModel.findOne({name: name}, function(err, channel) {
                if(err) {
                    res.send('Error in finding channel...:'+err);
                    return;
                }

                var sorted_pictures = _.sortBy(channel.pictures, function(picture) { return -1 * picture.uploaded; }),
                    pid_list = [];

                _.each(sorted_pictures, function(picture) {
                    pid_list.push(picture._id);
                });

                res.json(pid_list);
            });
Example #24
0
 DCModel.getData({}, options, function (err, result) {
     var arr = [];
     _.each(result, function (item, index, list) {
         var obj = {};
         obj.no = item.no;
         obj.r1 = item.r1;
         obj.r2 = item.r2;
         obj.r3 = item.r3;
         obj.r4 = item.r4;
         obj.r5 = item.r5;
         obj.r6 = item.r6;
         obj.b1 = item.b1;
         arr.push(obj);
     });
     var temparr = _.sortBy(arr, 'no').reverse();
     res.render('dc_index', { data: temparr });
 });
Example #25
0
 find.file(/\.js$/, src, function (fileSet) {
     
     // Excludes all files that match any of the exclusion rules,
     // and maps each of result to an object containing the
     // name of the file, folder and full path
     files = fileSet.filter(function (file) {
         return excludes.every(function (rule) {
             return !(new RegExp(rule).test(file));
         });
     }).map(function (file) {
         var data = PATH_REGEXP.exec(file);
         return {
             fullPath: data[0],
             path: data[1],
             name: data[2],
             docPath: data[1].replace(src, "")
         };
     });
     
     // Sorts files alphabetically by fullPath
     files = _.sortBy(files, function (file) {
         return file.fullPath.toLowerCase();
     });
     
     // Groups files based on their path and maps each
     // result to an object containing the path and package
     // of each final folder and the group of files it contains
     groups = _.map(_.groupBy(files, function (file) {
         return file.path;
     }), function (files, key) {
         return {
             path: key.replace(src, ""),
             ns: key.replace(src, "").replace(/\//g, ".").slice(0, -1),
             ns_class: key.replace(src, "").replace(/\//g, "_").slice(0, -1),
             files: files
         };
     });
     
     // Resolve the promise returning a 'fileset' object
     def.resolve({
         files: files,
         groups: groups,
         length: files.length
     });
 });
	function _getWords() {
		
		var words = [];

		_.each(messagesFromBeing, function(message){
			_.each(message.sentences, function(sentence){
				_.each(sentence.words, function(word){
					if (_.indexOf(words, word) == -1) {
						words.push(word);
					}
				});
			});
		});
		
		words = _.sortBy(words, function (word) {return word}).reverse();
		words.unshift(messageEndToken);
		words.unshift(messageStartToken);
		return words;
	}
Example #27
0
            async.mapSeries(preparelist, utils.compare, function(err, bestlist) {
                bestlist = _.sortBy(bestlist, function(num){ return num[4] });
                bestlist.reverse()

                if (bestlist.length != 0)
                {
                    outstats.push({'keyphrase': keyph[ind],
                            'the nearest seed': bestlist[0][0],
                            'keyphrase to compare': bestlist[0][2],
                            'seed to compare': bestlist[0][3],
                            'score': bestlist[0][4],
                            'keyphrase sentences': stats['Offer'][keyph[ind]].length,
                            'keyphrase influence': stats['Offer'][keyph[ind]].length/size
                            })
                }

                ind = ind + 1
                callbackDone();
            })
Example #28
0
  addComponent: function(options, callback) {
    var me = this,
      name = options.name,
      content = options.content,
      index = options.index,
      url = options.url;

    var component = {
      content: content,
      index: index,
      url: url,
      changeListener: function(args) {
        me.componentChanged(name);
      },
      watching: false
    };

    this.components[name] = component;
    this.componentOrder.push(name);
    this.componentOrder = _.sortBy(this.componentOrder, function(compName) {
      return me.components[compName].index;
    });
    // Only watch the name if the file exists and it's a file!
    path.exists(name, function(exists) {
      if (exists) {
        fs.stat(name, function(err, stats) {
          if (err) {
            this.removeComponent(name);
            callback && callback(err);
          } else if (stats.isFile()) {
            component.watching = true;
            fileWatcher.watchFileMtime(name, component.changeListener);
            callback && callback(null, component);
            me.fire('componentAdded', component);
          }
        });
      } else {
        callback && callback("path " + name + " does not exist.");
        this.fire('componentAdded', component);
      }
    });
  },
Example #29
0
 DLTModel.getData({}, options, function (err, result) {
     var arr = [], tempmonth, tempday;
     _.each(result, function (item, index, list) {
         var obj = {};
         var str = item.date;
         tempmonth = str.getMonth() + 1;
         tempday = str.getDate();
         obj.date = str.getFullYear() + '-' + (tempmonth < 10 ? ('0' + tempmonth) : tempmonth) + '-' + (tempday < 10 ? ('0' + tempday) : tempday);
         obj.r1 = item.r1;
         obj.r2 = item.r2;
         obj.r3 = item.r3;
         obj.r4 = item.r4;
         obj.r5 = item.r5;
         obj.b1 = item.b1;
         obj.b2 = item.b2;
         arr.push(obj);
     });
     var temparr = _.sortBy(arr, 'date').reverse();
     res.render('dlt_index', { data: temparr });
 });
Example #30
0
        '/notify/missing': function(req, res) {
            var server = req.user.server,
                user = req.user,
                notifies = this.pending[user.id];

            var timezone = req.user.timezone || 'Europe/London';
            notifies = _.sortBy(notifies, 'time').reverse();
            _.each(notifies, function(v, k) {
                v.time = moment(v.time).tz(timezone);
            });

            res.render('missing_notifies', {
                'user': user.primaryNick,
                'notifies': notifies
            });

            if(_.has(dbot.modules, 'log')) {
                dbot.api.log.log(server, user.primaryNick, 
                    'Checked their missing notifications.');
            }
        },