mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 11:42:36 +01:00
lowercase
This commit is contained in:
parent
4acf17f636
commit
569265f1c7
@ -5,7 +5,11 @@ var uuid = require('node-uuid'),
|
||||
var api = function(dbot) {
|
||||
var api = {
|
||||
'notify': function(type, server, user, cName, message) {
|
||||
var id = uuid.v4();
|
||||
var id = uuid.v4(),
|
||||
tags = [];
|
||||
_.each(message.match(/(#\w+)/g), function(match) {
|
||||
tags.push(match.toLowerCase());
|
||||
});
|
||||
this.db.save('notifies', id, {
|
||||
'id': id,
|
||||
'server': server,
|
||||
@ -14,7 +18,7 @@ var api = function(dbot) {
|
||||
'user': user.id,
|
||||
'time': new Date().getTime(),
|
||||
'message': message,
|
||||
'tags': message.match(/(#\w+)/g)
|
||||
'tags': tags
|
||||
}, function() {});
|
||||
|
||||
var channel = dbot.instance.connections[server].channels[cName];
|
||||
|
Loading…
Reference in New Issue
Block a user