Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saintedlama/irc-repl
IRC + REPL => :heart:
https://github.com/saintedlama/irc-repl
Last synced: 3 months ago
JSON representation
IRC + REPL => :heart:
- Host: GitHub
- URL: https://github.com/saintedlama/irc-repl
- Owner: saintedlama
- License: isc
- Created: 2015-07-10T09:44:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T16:07:41.000Z (over 2 years ago)
- Last Synced: 2024-04-24T18:24:00.599Z (8 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# irc-repl
IRC + REPL => :heart:
It feels like you're in the bot.
Not convinced? What about this?
```
> irc-repl -c #ircrepltestirc-repl> client.send('#ircrepltest', fs.readdirSync('.'));
```Send the current directory list to an IRC channel :dancers:
## Installation
```
npm install irc-repl -g
```## Usage
```
Usage: irc-repl [options]nickname Set the nickname. Defaults to the environment variable IRCNICK.
server Set the server with which irc will try to connect upon startup.
The format for server is: hostname[:portno] for IRC connections.
Defaults to the environment variable IRCSERVEROptions:
-c, --channel Automatically join channels. []
-q, --quiet Do not display IRC PRIVMSG by default. [false]
-u, --username User name send via USER command. Defaults to nickname
-r, --realname Real name send via USER command. Defaults to nickname
-s, --script Script file to evaluate after connecting and joining channels.
The script can access the context.
-e, --eval Script string to evaluate after connecting and joining channels.
The script can access the context.
```## Scope
irc-repl exposes the following scope values
* client: [irc-slate instance](https://github.com/slate/slate-irc)
* server: Currently connected server with host and port fields
* channels: Array of channel names
* nickname: Nickname
* username: Username
* realname: Realname* echoMessage: Utility function to echo a message to stdout
* util: Node.js util module
* colors: [colors](https://github.com/Marak/colors.js) module for nicer output## Common tasks
__Sending a simple message__
```javascript
client.send(channels[0], 'goes');
```Sends 'goes' to first connected channel