modified: package.json

modified:   src/main.js
This commit is contained in:
Flummi
2016-08-11 14:38:07 +02:00
parent f1c0139b7f
commit a4a7e6cac2
2 changed files with 14 additions and 3 deletions

View File

@ -1,4 +1,6 @@
var cfg = require('../../cfg.json');
var request = require('request');
var mysql = require('mysql');
var bot = require('coffea')();
cfg.server.forEach((e,i,a)=>{
@ -25,7 +27,14 @@ bot.on('motd', (e) => {
bot.on('message', (e) => {
var orig = e.message;
if(orig.match(/f0ck you/i)) {
e.reply("no, f0ck you leatherman!");
if(e.channel.getName().toString() == "#f0ck") {
if(orig.match(/(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi)) {
var tmp = orig.match(/(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi);
e.reply(tmp);
console.log(tmp);
}
}
});