New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

discord-irc

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-irc - npm Package Compare versions

Comparing version 2.6.1 to 2.6.2

dist/logger.js

4

CHANGELOG.md
# Changelog
This project adheres to [Semantic Versioning](http://semver.org/).
## [2.6.2] - 2018-09-19
### Changed
* Upgraded dependencies.
## [2.6.1] - 2018-05-11

@@ -5,0 +9,0 @@ ### Changed

70

dist/bot.js

@@ -17,6 +17,2 @@ 'use strict';

var _winston = require('winston');
var _winston2 = _interopRequireDefault(_winston);
var _discord = require('discord.js');

@@ -26,2 +22,6 @@

var _logger = require('./logger');
var _logger2 = _interopRequireDefault(_logger);
var _errors = require('./errors');

@@ -111,3 +111,3 @@

connect() {
_winston2.default.debug('Connecting to IRC and Discord');
_logger2.default.debug('Connecting to IRC and Discord');
this.discord.login(this.discordToken);

@@ -140,3 +140,3 @@

} else {
_winston2.default.warn('Cannot convert message encoding; you may encounter corrupted characters with non-English text.\n' + 'For information on how to fix this, please see: https://github.com/Throne3d/node-irc#character-set-detection');
_logger2.default.warn('Cannot convert message encoding; you may encounter corrupted characters with non-English text.\n' + 'For information on how to fix this, please see: https://github.com/Throne3d/node-irc#character-set-detection');
}

@@ -151,8 +151,8 @@ }

this.discord.on('ready', () => {
_winston2.default.info('Connected to Discord');
_logger2.default.info('Connected to Discord');
});
this.ircClient.on('registered', message => {
_winston2.default.info('Connected to IRC');
_winston2.default.debug('Registered event: ', message);
_logger2.default.info('Connected to IRC');
_logger2.default.debug('Registered event: ', message);
this.autoSendCommands.forEach(element => {

@@ -164,11 +164,11 @@ this.ircClient.send(...element);

this.ircClient.on('error', error => {
_winston2.default.error('Received error event from IRC', error);
_logger2.default.error('Received error event from IRC', error);
});
this.discord.on('error', error => {
_winston2.default.error('Received error event from Discord', error);
_logger2.default.error('Received error event from Discord', error);
});
this.discord.on('warn', warning => {
_winston2.default.warn('Received warn event from Discord', warning);
_logger2.default.warn('Received warn event from Discord', warning);
});

@@ -198,3 +198,3 @@

} else {
_winston2.default.warn(`No channelUsers found for ${channel} when ${oldNick} changed.`);
_logger2.default.warn(`No channelUsers found for ${channel} when ${oldNick} changed.`);
}

@@ -205,3 +205,3 @@ });

this.ircClient.on('join', (channelName, nick) => {
_winston2.default.debug('Received join:', channelName, nick);
_logger2.default.debug('Received join:', channelName, nick);
if (!this.ircStatusNotices) return;

@@ -217,3 +217,3 @@ if (nick === this.ircClient.nick && !this.announceSelfJoin) return;

this.ircClient.on('part', (channelName, nick, reason) => {
_winston2.default.debug('Received part:', channelName, nick, reason);
_logger2.default.debug('Received part:', channelName, nick, reason);
if (!this.ircStatusNotices) return;

@@ -223,3 +223,3 @@ const channel = channelName.toLowerCase();

if (nick === this.ircClient.nick) {
_winston2.default.debug('Deleting channelUsers as bot parted:', channel);
_logger2.default.debug('Deleting channelUsers as bot parted:', channel);
delete this.channelUsers[channel];

@@ -231,3 +231,3 @@ return;

} else {
_winston2.default.warn(`No channelUsers found for ${channel} when ${nick} parted.`);
_logger2.default.warn(`No channelUsers found for ${channel} when ${nick} parted.`);
}

@@ -238,3 +238,3 @@ this.sendExactToDiscord(channel, `*${nick}* has left the channel (${reason})`);

this.ircClient.on('quit', (nick, reason, channels) => {
_winston2.default.debug('Received quit:', nick, channels);
_logger2.default.debug('Received quit:', nick, channels);
if (!this.ircStatusNotices || nick === this.ircClient.nick) return;

@@ -244,3 +244,3 @@ channels.forEach(channelName => {

if (!this.channelUsers[channel]) {
_winston2.default.warn(`No channelUsers found for ${channel} when ${nick} quit, ignoring.`);
_logger2.default.warn(`No channelUsers found for ${channel} when ${nick} quit, ignoring.`);
return;

@@ -254,3 +254,3 @@ }

this.ircClient.on('names', (channelName, nicks) => {
_winston2.default.debug('Received names:', channelName, nicks);
_logger2.default.debug('Received names:', channelName, nicks);
if (!this.ircStatusNotices) return;

@@ -266,14 +266,14 @@ const channel = channelName.toLowerCase();

this.ircClient.on('invite', (channel, from) => {
_winston2.default.debug('Received invite:', channel, from);
_logger2.default.debug('Received invite:', channel, from);
if (!this.invertedMapping[channel]) {
_winston2.default.debug('Channel not found in config, not joining:', channel);
_logger2.default.debug('Channel not found in config, not joining:', channel);
} else {
this.ircClient.join(channel);
_winston2.default.debug('Joining channel:', channel);
_logger2.default.debug('Joining channel:', channel);
}
});
if (_winston2.default.level === 'debug') {
if (_logger2.default.level === 'debug') {
this.discord.on('debug', message => {
_winston2.default.debug('Received debug event from Discord', message);
_logger2.default.debug('Received debug event from Discord', message);
});

@@ -339,3 +339,3 @@ }

_winston2.default.debug('Channel Mapping', channelName, this.channelMapping[channelName]);
_logger2.default.debug('Channel Mapping', channelName, this.channelMapping[channelName]);
if (ircChannel) {

@@ -362,3 +362,3 @@ const fromGuild = message.guild;

patternMap.side = 'Discord';
_winston2.default.debug('Sending command message to IRC', ircChannel, text);
_logger2.default.debug('Sending command message to IRC', ircChannel, text);
// if (prelude) this.ircClient.say(ircChannel, prelude);

@@ -377,3 +377,3 @@ if (this.formatCommandPrelude) {

text = Bot.substitutePattern(this.formatIRCText, patternMap);
_winston2.default.debug('Sending message to IRC', ircChannel, text);
_logger2.default.debug('Sending message to IRC', ircChannel, text);
this.ircClient.say(ircChannel, text);

@@ -387,3 +387,3 @@ }

_winston2.default.debug('Sending attachment URL to IRC', ircChannel, urlMessage);
_logger2.default.debug('Sending attachment URL to IRC', ircChannel, urlMessage);
this.ircClient.say(ircChannel, urlMessage);

@@ -403,3 +403,3 @@ });

if (!discordChannel) {
_winston2.default.info('Tried to send a message to a channel the bot isn\'t in: ', discordChannelName);
_logger2.default.info('Tried to send a message to a channel the bot isn\'t in: ', discordChannelName);
return null;

@@ -477,3 +477,3 @@ }

patternMap.side = 'IRC';
_winston2.default.debug('Sending command message to Discord', `#${discordChannel.name}`, text);
_logger2.default.debug('Sending command message to Discord', `#${discordChannel.name}`, text);
if (this.formatCommandPrelude) {

@@ -557,3 +557,3 @@ const prelude = Bot.substitutePattern(this.formatCommandPrelude, patternMap);

if (webhook) {
_winston2.default.debug('Sending message to Discord via webhook', withMentions, channel, '->', `#${discordChannel.name}`);
_logger2.default.debug('Sending message to Discord via webhook', withMentions, channel, '->', `#${discordChannel.name}`);
const avatarURL = this.getDiscordAvatar(author, channel);

@@ -564,3 +564,3 @@ webhook.client.sendMessage(withMentions, {

avatarURL
}).catch(_winston2.default.error);
}).catch(_logger2.default.error);
return;

@@ -574,3 +574,3 @@ }

const withAuthor = Bot.substitutePattern(this.formatDiscord, patternMap);
_winston2.default.debug('Sending message to Discord', withAuthor, channel, '->', `#${discordChannel.name}`);
_logger2.default.debug('Sending message to Discord', withAuthor, channel, '->', `#${discordChannel.name}`);
discordChannel.send(withAuthor);

@@ -584,3 +584,3 @@ }

_winston2.default.debug('Sending special message to Discord', text, channel, '->', `#${discordChannel.name}`);
_logger2.default.debug('Sending special message to Discord', text, channel, '->', `#${discordChannel.name}`);
discordChannel.send(text);

@@ -587,0 +587,0 @@ }

@@ -8,16 +8,5 @@ #!/usr/bin/env node

var _winston = require('winston');
var _winston2 = _interopRequireDefault(_winston);
var _helpers = require('./helpers');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* istanbul ignore next */
if (process.env.NODE_ENV === 'development') {
_winston2.default.level = 'debug';
}
/* istanbul ignore next */
if (!module.parent) {

@@ -24,0 +13,0 @@ require('./cli').default();

{
"name": "discord-irc",
"version": "2.6.1",
"version": "2.6.2",
"description": "Connects IRC and Discord channels by sending messages back and forth.",

@@ -40,11 +40,11 @@ "keywords": [

"check-env": "1.3.0",
"commander": "2.15.1",
"discord.js": "11.3.2",
"irc-colors": "1.4.2",
"commander": "2.18.0",
"discord.js": "11.4.2",
"irc-colors": "1.4.3",
"irc-formatting": "1.0.0-rc3",
"irc-upd": "0.9.0",
"irc-upd": "0.10.0",
"lodash": "^4.17.4",
"simple-markdown": "0.4.0",
"simple-markdown": "0.4.2",
"strip-json-comments": "2.0.1",
"winston": "2.4.2"
"winston": "3.1.0"
},

@@ -63,3 +63,3 @@ "devDependencies": {

"mocha": "^5.0.0",
"nyc": "^11.0.3",
"nyc": "^13.0.1",
"sinon": "^4.0.1",

@@ -66,0 +66,0 @@ "sinon-chai": "^2.8.0"

@@ -72,3 +72,8 @@ # discord-irc [![Build Status](https://travis-ci.org/reactiflux/discord-irc.svg?branch=master)](https://travis-ci.org/reactiflux/discord-irc) [![Coverage Status](https://coveralls.io/repos/github/reactiflux/discord-irc/badge.svg?branch=master)](https://coveralls.io/github/reactiflux/discord-irc?branch=master)

"floodProtection": false, // On by default
"floodProtectionDelay": 1000 // 500 by default
"floodProtectionDelay": 1000, // 500 by default
"port": "6697", // 6697 by default
"secure": true, // enable SSL, false by default
"sasl": true, // false by default
"username": "test", // nodeirc by default
"password": "p455w0rd" // empty by default
},

@@ -75,0 +80,0 @@ "format": { // Optional custom formatting options

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc