From 24a955b2ab6939c84029c6803a2a2351c2895230 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 17 Mar 2013 19:55:47 +0000 Subject: [PATCH] remove broken finger functionality --- modules/finger/README.md | 13 ------------- modules/finger/finger.js | 34 ---------------------------------- modules/finger/strings.json | 8 -------- 3 files changed, 55 deletions(-) delete mode 100644 modules/finger/README.md delete mode 100644 modules/finger/finger.js delete mode 100644 modules/finger/strings.json diff --git a/modules/finger/README.md b/modules/finger/README.md deleted file mode 100644 index 549e850..0000000 --- a/modules/finger/README.md +++ /dev/null @@ -1,13 +0,0 @@ -## Finger - -Retrieves user information from a remote server. - -### Description -Uses the ``finger`` command to retrieve limited information on users. - - -### Commands -###~finger [username] -Returns the real name of the user specified. -### Dependencies -* ``npm install request`` diff --git a/modules/finger/finger.js b/modules/finger/finger.js deleted file mode 100644 index f0a2e34..0000000 --- a/modules/finger/finger.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Module Name: Finger - * Description: Returns the name of users via the Finger protocol - */ -var request = require('request'), - _ = require('underscore')._, - exec = require('child_process').exec; - -var finger = function(dbot) { - var commands = { - '~finger': function(event) { - var username = event.params[1]; - exec("finger -s " + username + "@central.aber.ac.uk",function(error,stdout,stderr){ - stdout = stdout.replace(/(\r\n|\n|\r)/gm,""); - name = stdout.search("Name:"); - stdout = stdout.substring(name); - ret = stdout.search("Dir"); - stdout = stdout.substring(6,ret); - if (stdout == "Welcom") { - event.reply(dbot.t("nonexistent",{user: username})); - } else { - event.reply(dbot.t("name",{user: username, name: stdout})); - } - }); - } - }; - this.commands = commands; - - this.on = 'PRIVMSG'; -}; - -exports.fetch = function(dbot) { - return new finger(dbot); -}; diff --git a/modules/finger/strings.json b/modules/finger/strings.json deleted file mode 100644 index 710e0f5..0000000 --- a/modules/finger/strings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": { - "en": "{user} is {name}." - }, - "nonexistent": { - "en": "{user} not found." - } -}