Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0901b00
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const phrik = 'phrik' | ||
const name = 'phrikpipe' | ||
|
||
const irc = require('irc') | ||
const client = new irc.Client('chat.freenode.net', name, { | ||
userName: name, | ||
realName: name, | ||
port: 6697, | ||
secure: true, | ||
channels: ['#chee-fanclub'] | ||
}) | ||
|
||
client.addListener('message', (from, to, message) => { | ||
const words = message.split(/\s+/) | ||
if (words[0] != `@${phrik}`) return | ||
const command = words.slice(1).join(' ') | ||
client.say(phrik, command) | ||
}) | ||
|
||
client.addListener('pm', (from, message) => { | ||
if (from != phrik) return | ||
const words = message.split(/\s+/) | ||
const response = words[0] == `${name}:` ? words.slice(1).join(' ') : words.join(' ') | ||
client.say('#chee-fanclub', response) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "phrikpipe", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "GPL", | ||
"description": "phrik pipe", | ||
"author": "chee <chee@snake.dog>", | ||
"dependencies": { | ||
"irc": "^0.5.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
iconv@~2.2.1: | ||
version "2.2.1" | ||
resolved "https://registry.yarnpkg.com/iconv/-/iconv-2.2.1.tgz#39b13fdd98987d26aef26c0a2f2a900911fa4584" | ||
dependencies: | ||
nan "^2.3.5" | ||
|
||
irc-colors@^1.1.0: | ||
version "1.3.1" | ||
resolved "https://registry.yarnpkg.com/irc-colors/-/irc-colors-1.3.1.tgz#a6fccee5d9ecdc010c2b1cde3fbdff1f7134aff6" | ||
|
||
irc@^0.5.2: | ||
version "0.5.2" | ||
resolved "https://registry.yarnpkg.com/irc/-/irc-0.5.2.tgz#3714f4768365a96d0b2f776bc91166beb2464bbc" | ||
dependencies: | ||
irc-colors "^1.1.0" | ||
optionalDependencies: | ||
iconv "~2.2.1" | ||
node-icu-charset-detector "~0.2.0" | ||
|
||
nan@^2.3.3, nan@^2.3.5: | ||
version "2.5.1" | ||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" | ||
|
||
node-icu-charset-detector@~0.2.0: | ||
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/node-icu-charset-detector/-/node-icu-charset-detector-0.2.0.tgz#c2320da374ddcb671fc54cb4a0e041e156ffd639" | ||
dependencies: | ||
nan "^2.3.3" |