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

cleverbot-irc

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleverbot-irc - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

test/clvr.test.js

6

bot/clvr.js

@@ -10,3 +10,2 @@ var CleverBot = new require('cleverbot-node')

*/
const ignoreMax = 3600;
var insult = (function () {

@@ -29,4 +28,5 @@ var insults = [

module.exports = function (gu, opts) {
module.exports = function (gu) {
const ignoreMax = opts.ignoreMax || 3600;

@@ -37,3 +37,3 @@ gu.handle(/(.*)/, function (say, message, user) {

if (protection.isTooSimilar(user, message)) {
protection.ignore(user, ignoreMax);
protection.ignore(user, ignoreMax, gu.log);
say(insult());

@@ -40,0 +40,0 @@ }

@@ -26,9 +26,9 @@ var Levenshtein = require('levenshtein');

// ignores `user` for up to ignoreMax seconds
exports.ignore = function (user, ignoreMax) {
exports.ignore = function (user, ignoreMax, log) {
var ignoreTime = Math.ceil(ignoreMax*1000*Math.random());
console.log('ignoring', user, 'for', Math.floor(ignoreTime/1000) + 's');
log.info('ignoring', user, 'for', Math.floor(ignoreTime/1000) + 's');
ignores.push(user);
setTimeout(function () {
console.log('unignoring:', user);
log.info('unignoring:', user);
ignores.splice(ignores.indexOf(user), 1);

@@ -35,0 +35,0 @@ }, ignoreTime);

@@ -5,3 +5,3 @@ {

"description": "IRC bot that defers to Cleverbot",
"version": "1.0.1",
"version": "1.0.2",
"repository": {

@@ -25,3 +25,3 @@ "type": "git",

"confortable": "^0.2.1",
"gu": "^0.5.0",
"gu": "^0.5.1",
"sulfur": "^1.0.0",

@@ -28,0 +28,0 @@ "irc-colors": "^1.0.3",

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