bye logger

This commit is contained in:
Flummi 2018-09-07 19:26:57 +02:00
parent c2acac4810
commit fe81dd73b4
2 changed files with 0 additions and 9 deletions

View File

@ -1,4 +1,3 @@
import { logger } from "../inc/log";
import { getLevel } from "../inc/admin"; import { getLevel } from "../inc/admin";
import modules from "./irc/index"; import modules from "./irc/index";
@ -74,7 +73,6 @@ export class irc extends EventEmitter {
} }
send(data) { send(data) {
this.socket.write(`${data}\n`); this.socket.write(`${data}\n`);
logger.debug(`(${this.network}) out: ${data}`);
} }
sendmsg(mode, recipient, msg) { sendmsg(mode, recipient, msg) {
msg = msg.split(/\r?\n/); msg = msg.split(/\r?\n/);
@ -86,7 +84,6 @@ export class irc extends EventEmitter {
} }
parse(data, [a, ...b] = data.split(/ +:/)) { parse(data, [a, ...b] = data.split(/ +:/)) {
let tmp = a.split(" ").concat(b); let tmp = a.split(" ").concat(b);
logger.debug(`(${this.network}) in: ${[...tmp]}`);
return data.charAt(0) === ":" ? { return data.charAt(0) === ":" ? {
prefix: tmp.shift(), prefix: tmp.shift(),
command: tmp.shift(), command: tmp.shift(),

View File

@ -1,4 +1,3 @@
import { logger } from "../inc/log";
import { getLevel } from "../inc/admin"; import { getLevel } from "../inc/admin";
import rp from "request-promise-native"; import rp from "request-promise-native";
@ -41,12 +40,10 @@ export class tg extends EventEmitter {
resolve(); resolve();
} }
else { else {
logger.error(`(${this.network}) ${res}`);
reject(); reject();
} }
}) })
.catch(err => { .catch(err => {
logger.error(`(${this.network}) ${err.message}`);
reject(); reject();
}); });
}); });
@ -73,8 +70,6 @@ export class tg extends EventEmitter {
} }
}) })
.catch(err => { .catch(err => {
if(err.statusCode !== 409)
logger.error(`(${this.network}) ${err.message}`);
}); });
} }
send(chatid, msg, reply = null) { send(chatid, msg, reply = null) {
@ -95,7 +90,6 @@ export class tg extends EventEmitter {
rp(opts) rp(opts)
.then(res => {}) .then(res => {})
.catch(err => { .catch(err => {
logger.error(`(${this.network}) ${err.message}`);
}); });
} }
sendmsg(mode, recipient, msg) { sendmsg(mode, recipient, msg) {