Navigation Menu

Skip to content

Commit

Permalink
[refactor] Remove shell from irc hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed Nov 15, 2011
1 parent fe9e2ec commit c73546d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 72 deletions.
33 changes: 16 additions & 17 deletions ReadMe.md
Expand Up @@ -31,39 +31,39 @@ The command-line client is a simple wrapper around the existing API. Here are a

### Event Listeners

**sendMsg** *{dest, msg}* - Sends an IRC message to the provided nick/channel.
**irc::msg** *{dest, msg}* - Sends an IRC message to the provided nick/channel.

**join** *channel* - Joins the channel specified.
**irc::join** *channel* - Joins the channel specified.

**part** *channel* - Parts from the provided channel, or the current channel if none is specified.
**irc::part** *channel* - Parts from the provided channel, or the current channel if none is specified.

**command** *string* - Sends [string] as a raw IRC command.
**irc::command** *string* - Sends [string] as a raw IRC command.

**exit** - Causes the hook to disconnect from IRC and exit.
**irc::exit** - Causes the hook to disconnect from IRC and exit.

### Events Emitted:

**ircConnected** *{ircNick, channels}* - Emitted when Hook.io IRC has finished connecting to the server.
**irc::connected** *{ircNick, channels}* - Emitted when Hook.io IRC has finished connecting to the server.

**serverNotice** *{to, text}* - Emitted when a notice is received from the IRCd.
**irc::serverNotice** *{to, text}* - Emitted when a notice is received from the IRCd.

**gotMsg** *{nick, to, text}* - Emitted when an IRC message (or pm) is received.
**irc::msg** *{nick, to, text}* - Emitted when an IRC message (or pm) is received.

**Ijoined** *{channel}* - Emitted when Hook.io IRC joins a channel.
**irc::joined** *{channel}* - Emitted when Hook.io IRC joins a channel.

**Iparted** *{channel}* - Emitted when Hook.io IRC leaves a channel.
**irc::parted** *{channel}* - Emitted when Hook.io IRC leaves a channel.

**userJoined** *{channel, nick}* - Emitted when a user joins a channel that Hook.io IRC is part of.
**irc::joined** *{channel, nick}* - Emitted when a user joins a channel that Hook.io IRC is part of.

**userParted** *{channel, nick}* - Emitted when a user leaves a channel that Hook.io IRC is part of.
**irc::parted** *{channel, nick}* - Emitted when a user leaves a channel that Hook.io IRC is part of.

**nickChange** *{oldNick, newNick}* - Emitted when a user changes nicks.
**irc::nickChange** *{oldNick, newNick}* - Emitted when a user changes nicks.

**userQuit** *{nick, reason, channels}* - Emitted when a user quits.
**irc::userQuit** *{nick, reason, channels}* - Emitted when a user quits.

**userKicked** *{channel, by, reason}* - Emitted when a user is kicked from a channel that Hook.io IRC is connected to.
**irc::userKicked** *{channel, by, reason}* - Emitted when a user is kicked from a channel that Hook.io IRC is connected to.

**gotKicked** *{channel, by, reason}* - Emitted when the Hook.io IRC user is kicked from a channel.
**irc::gotKicked** *{channel, by, reason}* - Emitted when the Hook.io IRC user is kicked from a channel.

### Hook config.json settings

Expand All @@ -78,7 +78,6 @@ The command-line client is a simple wrapper around the existing API. Here are a
"realName": "Hook.io IRC Client",
"promptMsg": "Hook.io-IRC",
"promptDelim": ">",
"useShell": false,
"idCheck": true
}
```
Expand Down
8 changes: 1 addition & 7 deletions lib/irc.js
Expand Up @@ -48,10 +48,6 @@ IRC.prototype._initIRC = function () {
self.ircClient.on('motd', function (motd) {
self.ircClient.say('nickserv', 'identify ' + self['password']);
self.emit('irc::connected', { channels: self.channels, ircNick: self.nick });
if (self['shell']) {
//self._initPrompt();
//self.shell();
}
if (self['idCheck']) {
self.emit('idCheck', {check: true});
self.ircClient.send('CAP REQ IDENTIFY-MSG');
Expand Down Expand Up @@ -182,6 +178,4 @@ IRC.prototype.part = function (channel) {

IRC.prototype.exit = function (message) {
this.ircClient.disconnect(message || 'http://github.com/hookio/irc');
}

IRC.prototype.shell = require('./shell');
}
48 changes: 0 additions & 48 deletions lib/shell.js

This file was deleted.

0 comments on commit c73546d

Please sign in to comment.