creesch / discordircd Goto Github PK
View Code? Open in Web Editor NEWA node.js script that allows you to connect to discord with your irc client.
License: Apache License 2.0
A node.js script that allows you to connect to discord with your irc client.
License: Apache License 2.0
Specifically IRCCloud, Hexchat seems to be fine.
As seen by many IRC bots and the discord webapp itself,
using an input such as s/foo/bar
will, depending on the platform, will edit, or resend the last message with the replacement string.
Discord also have a replacement of no content to delete the message from the buffer
This could be useful for editing the last sent message from the deamon
Here's discord's implementation, a bit minified though
searchReplace: {
regex: /^s\/((?:.+?)[^\\]|.)\/(.*)/,
REMOVE_ESCAPE_CHARS: /\\([*?+\/])/g,
action: function(e, t) {
if (!t.isEdit) {
var n = e.content;
e.content = "";
var a = x["default"].getChannelId();
if (a) {
var i = V["default"].getLastEditableMessage(a);
if (i && i.id) {
var r = Array.from(n.match(this.regex) || []),
o = r[1],
s = r[2];
o = o.replace(this.REMOVE_ESCAPE_CHARS, function(e, t) {
return t
}), s = s.replace(this.REMOVE_ESCAPE_CHARS, function(e, t) {
return t
});
var E = i.content.replace(o, s);
E ? E !== i.content && z["default"].editMessage(a, i.id, {
content: E
}) : z["default"].deleteMessage(a, i.id)
}
}
}
}
}
Some bots for example use embeds for part of their communication.
This might not be a catch-all solution, as I expect some users actually use notes for a purpose,
but it would be helpful to have an ability to alias a user to a name
https://discord.js.org/#/docs/main/stable/class/User?scrollTo=note
Some messages I get will look like
Their account name uses supported alphanumeric characters as an added detail, but it this didn't work out
irc;([a-zA-Z0-9_\\[\]\{\}\^`\|]+)
could be a suggestion to use irc nicks alongside regular notes
but I'll let you figure it out
@Polynomdivision did the work already, but never did put in a pull request as they did a nice job as far as I am concerned.
https://github.com/Polynomdivision/discordIRCd/commits/master
This would be optional and the number of lines to be played back configurable.
Guild owners are usually the creator, or have been transferred ownership,
Should be fetchable with discordClient.guilds.get(discordID).owner
which returns the user as an object
or with ownerID
if you want their unique ID
Currently it is done for all mentions but obviously when the nickname is in the mention it is not need for irc.
Title.
I had this idea ages ago as a idea to fix #10
If there was a channel on the irc instance for PMs, This could be used to watch users go online and offline (or away, could be a few different solutions).
There could also be another channel just to list your private messages list, since not everyone you talk to privately are in your friends list
https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=mentions
Need to check if:
I am not sure if the api respects "@everyone" being turned off in discord, otherwise that will need a toggle in config.js
Happens randomly, no idea what's causing it. If I'm able to reproduce it properly I'll update here later
/home/volkor/git/discordIRCd/server.js:599
const discordServerId = oldChannel.guild.id;
^
TypeError: Cannot read property 'id' of undefined
at Client.<anonymous> (/home/volkor/git/discordIRCd/server.js:599:46)
at Client.emit (events.js:198:13)
at ChannelUpdateAction.handle (/home/volkor/git/discordIRCd/node_modules/discord.js/src/client/actions/ChannelUpdate.js:13:14)
at ChannelUpdateHandler.handle (/home/volkor/git/discordIRCd/node_modules/discord.js/src/client/websocket/packets/handlers/ChannelUpdate.js:7:34)
at WebSocketPacketManager.handle (/home/volkor/git/discordIRCd/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/home/volkor/git/discordIRCd/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/home/volkor/git/discordIRCd/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/home/volkor/git/discordIRCd/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:198:13)
at Receiver._receiver.onmessage (/home/volkor/git/discordIRCd/node_modules/ws/lib/websocket.js:137:47)
A few options:
I don't like the first one simply due to it being ugly, the second option isn't very attractive either.
So I'll need to think about it.
Currently everything lives in one big file with just a little abstraction. This makes maintenance a bit of a pain and contributions also less likely.
It would probably be beneficial to split out the code in several components. Something along the lines of:
start.js
would be responsible fordiscord.js
would be responsible for the discord connection side of things.irc-server.js
would contain the connection functionality for the server.utils.js
would be the home of all the functions responsible for parsing data. Like these lines here and a lot of functionality that now happens directly in the event handlers themselves.It would be no small task, but it has been on my mind for a while so I might as well make an issue for it.
When your discord nick is mentioned in a direct message, the discordIRCd server will crash. The issue seems to be 100% reproducable any time the other person in the DM mentions you.
/home/devtea/discordircd/server.js:132
const memberObject = discordClient.guilds.get(discordID).members.get(userID);
^
TypeError: Cannot read property 'members' of undefined
at /home/devtea/discordircd/server.js:132:69
at Array.forEach (<anonymous>)
at parseDiscordLine (/home/devtea/discordircd/server.js:130:26)
at /home/devtea/discordircd/server.js:909:40
at Array.forEach (<anonymous>)
at /home/devtea/discordircd/server.js:906:24
at Array.forEach (<anonymous>)
at Client.<anonymous> (/home/devtea/discordircd/server.js:895:22)
at Client.emit (events.js:159:13)
at MessageCreateHandler.handle (/home/devtea/discordircd/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/devtea/.npm/_logs/2017-12-29T15_53_25_883Z-debug.log
Contents of /home/devtea/.npm/_logs/2017-12-29T15_53_25_883Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/devtea/discordircd/node_modules/.bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/devtea/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/devtea/bin
9 verbose lifecycle [email protected]~start: CWD: /home/devtea/discordircd
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node server.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node server.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at EventEmitter.emit (events.js:159:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:159:13)
13 verbose stack at maybeClose (internal/child_process.js:943:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/devtea/discordircd
16 verbose Linux 4.14.8-1-ARCH
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v9.3.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node server.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Noticed this issue when autocomplete matched the nickname as it would be at some hours of the day, instead of the one that was currently in use in the chat buffer
Reported based off 9564b56
have since pulled, unsure if this would have any affect
First step should be to check if the user is actually in the channel.
As it stands, the filenames/urls of a message are susceptible to being parsed from markdown to IRC formatting.
This can return an invalid url being displayed on the IRC client
Sometimes the server explodes itself requiring a manual restart
events.js:161
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:1028:11)
at TCP.onread (net.js:572:26)
Unfortunately, that's all I have, I don't have a proper debugger for anything else
As the title says, I basically have written out irc commands so far. It is far easier to make a function that constructs commands based on input.
Hi all,
It seems running npm install
on my machine for discordIRCd does not work properly.
I don't totally know what I'm doing, but judging from what I can gather from my terminal's output after trying npm install
, it looks like discordIRCd might require all sorts of specific versions of .js material, which is why I titled this "[...] dependency issues?".
Running git clone
to clone the git to my home directory works fine, no problems there.
Afterwards,
tamberoo@studio1:~/discordIRCd$ npm install
loadDep:erlpack → resolve ▐ ╢███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:erlpack → get ▐ ╢███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: use node-fetch instead
loadDep:uuid → headers ▌ ╢████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:punycode → 200 ▀ ╢█████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
> [email protected] install /home/tamberoo/discordIRCd/node_modules/bufferutil
> prebuild-install || node-gyp rebuild
/usr/bin/env: ‘node’: No such file or directory
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error:
gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-142-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/tamberoo/discordIRCd/node_modules/bufferutil
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
[email protected] /home/tamberoo/discordIRCd
├── UNMET PEER DEPENDENCY @discordjs/opus@^0.1.0
├── UNMET PEER DEPENDENCY @discordjs/uws@^10.149.0
├── UNMET DEPENDENCY bufferutil@^3.0.0
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ UNMET PEER DEPENDENCY [email protected] (git://github.com/hammerandchise/erlpack.git#c514d36ec81a7a61ef90b75df261025ab046574d)
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── UNMET PEER DEPENDENCY libsodium-wrappers@^0.7.3
├── UNMET PEER DEPENDENCY node-opus@^0.2.7
├── UNMET PEER DEPENDENCY opusscript@^0.0.6
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
└── UNMET PEER DEPENDENCY sodium@^2.0.3
npm WARN [email protected] requires a peer of @discordjs/uws@^10.149.0 but none was installed.
npm WARN [email protected] requires a peer of bufferutil@^4.0.0 but none was installed.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none was installed.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none was installed.
npm WARN [email protected] requires a peer of @discordjs/opus@^0.1.0 but none was installed.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none was installed.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none was installed.
npm ERR! Linux 4.4.0-142-generic``npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild-install || node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bufferutil package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild-install || node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bufferutil
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bufferutil
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/tamberoo/discordIRCd/npm-debug.log
tamberoo@studio1:~/discordIRCd$
So, to me it looks like this project requires some certain things:
/usr/bin/env
called node
Running uname -a
gives me this output: Linux studio1 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:01:15 UTC 2019 i686 i686 i686 GNU/Linux
so that way y'all know some info about my machine. And hey, just for the hell of it: here's a link to a screenshot of my current setup and my terminal running screenfetch
.
How would one go about solving this?
Any chance you'll work on getting this to work with mIRC? Or maybe you could give me a lead and I could try to fix it myself?
mIRC won't connect after verifying the username: http://i.imgur.com/tHTOWhk.png
(pardon the funny usernames)
it'd be rad to get my mirc bot into my discord server.
Hello! I have some suggestions to help improve the IRCd. I'm just gonna compile them into this list so I don't end up making a ton of issues.
This is it for now, but I might keep adding to it.
Security, privacy and all that.
I've followed your instructions, but I don't believe I'm doing it entirely correctly
My token is being accepted, and I used what I believe should be the correct guild id via /PASS
(in my example 157745176616501248
)
My username matches authentication and I'm connected to the irc fine,
but using /list returns no channels
Followed the instructions and every-time I try to connect to the server I get
Connected. Now logging in. * Disconnected (Remote host closed socket)
Connected. Now logging in.* Disconnected (Connection reset by peer)
or some other variation of this.
Can you clarify that hostname in config.js is the same as the server address (in my case 127.0.0.1)
and username is whatever you want and put into the config under username (does it has to be the same as discord username I guess?)
Also the server id of discord server should be under login method /Pass password correct?
Also is githubToken necessary for this to work?
Thank you.
When using the web client, if I leave a guild using the web interface, my IRC connection drops and the deamon crashes.
/mnt/mpathag/scratch/node/discordIRCd/server.js:555
ircDetails[discordServerId].channels[newChannel.name] = {
^
TypeError: Cannot read property 'channels' of undefined
at Client.<anonymous> (/mnt/mpathag/scratch/node/discordIRCd/server.js:555:36)
at emitOne (events.js:96:13)
at Client.emit (events.js:189:7)
at ClientDataManager.newChannel (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/ClientDataManager.js:69:51)
at Guild.setup (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/structures/Guild.js:179:68)
at new Guild (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/structures/Guild.js:65:12)
at ClientDataManager.newGuild (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/ClientDataManager.js:23:19)
at GuildCreateHandler.handle (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:17:26)
at WebSocketPacketManager.handle (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:120:65)
at WebSocketManager.eventMessage (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/websocket/WebSocketManager.js:273:31)
What's interesting is that this guild wasn't connected via the deamon at all, was only part of it for approximately three minutes
13:41:32 [192] -!- Welcome to the fake Internet Relay Chat Network user
13:41:32 [192] -!- This server was created specifically for you
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
13:41:44 [192] -!- AWAY :Do not disturb
For example, server owner should have the "Owner" (+q commonly, prefixed with ~).
People with Administrator should have "Admin" (+a commonly, prefixed with &).
It is possible to get user permissions, I'm not entirely sure how. I don't know Discord.js, but it is possible in JDA, so unless they do hacky things, and d.js has a method, shouldn't be terribly difficult.
For Ops and below, it's a bit harder to figure out. Ops and Half-ops are basically indistinguishable, however ops can demote and promote half-ops. Both Half/Ops can manage channel and roles (below them, obviously) so maybe anyone with these permissions could be opped?
People with manage messages only could be half-op, I guess?
Voiced is just a general "notice" role, maybe this could be applied to anyone with a role?
This all relies on d.js and the discord api allowing us to get user's permissions, which I'm almost certain is possible without any roles or special permissions.
Whenever I send an url (for example 'https://google.com' )other users on the server just see 'http'.
With the config
global.configuration = {
DEBUG: false,
showOfflineUsers: true, // When true all users will always be shown. Offline users will be shown as away on clients that support away-notify.
discordToken: 'my token is here',
tlsEnabled: false,
tlsOptions: {
keyPath: '/path/to/key.pem',
certPath: '/path/to/cert.pem'
},
handleCode: true,
githubToken: 'also here',
ircServer: {
listenPort: 6667,
hostname: '127.0.0.1',
username: 'witheld'
}
};
Running "node server.js" silently hangs forever
When connecting to a guild in IRC that has a claimed account restriction with an unclaimed account, this error is thrown
(node:22110) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot set property 'discordDisplayName' of undefined
data: QUIT :Leaving
An interesting alternative is to have your name as your username+descriminator, and have all channels as voiced only/read only
Common issue I have after stopping the server to restart it / git pull
After giving it a graceful shutdown via a SIGINT, the port still seems to be in use for another couple of minutes.
Due to this, an error is thrown
Error: listen EADDRINUSE :::34416
at Object.exports._errnoException (util.js:1028:11)
at exports._exceptionWithHostPort (util.js:1051:20)
at Server._listen2 (net.js:1261:14)
at listen (net.js:1297:10)
at Server.listen (net.js:1375:9)
at Client.<anonymous> (/mnt/mpathag/scratch/node/discordIRCd/server.js:320:19)
at emitNone (events.js:91:20)
at Client.emit (events.js:186:7)
at WebSocketManager._emitReady (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/websocket/WebSocketManager.js:325:17)
at Promise.all.then (/mnt/mpathag/scratch/node/discordIRCd/node_modules/discord.js/src/client/websocket/WebSocketManager.js:344:49)
Seems to already have a stackoverflow thread since it's common appearance, ...six years ago
https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server
I'm still unsure on the correct approach to a fix though
I made the assumption that all blocks follow the
```
code
```
or
``` language
code
```
format, but it can also be
``` language code
```
and a few other variations.
Hello there...
I tried to use discordIRC with an eggdrop... The eggdrop connects well to the server, but don't see the channel when I add it (.+chan #test
in party-line).
So, I use .tcl putserv "join #test"
and I can send messages to the channel, but it's always in pending status for the eggdrop, so it can't see anything of the conversation.
It seems like some parts of the IRC protocol wasn't well implemented. My eggdrop is set to be compliant with unrealircd.
My friend is named "Bee", lots of people have this name, if I try to message them first it messages random other "Bee"s
Currently they aren't handled at all resulting in each line being send to irc separately, making the code unreadable.
The best solution to me seems to look for code blocks and pass those to a pastebin like service.
However, since some channels likely are considered private I don't want to do this to a open service. So the only services I will build in are those that allow private/unlisted text snippets.
gist.github.com is the most obvious choice for this. Secondly I want to explore if the irccloud text snippet functionality has an api endpoint.
…Instead of crashing.
const userID = ircDetails[socket.discordid].members[whoisUser];
^
TypeError: Cannot read property '<NICK>' of undefined
at /opt/discordIRCd/server.js:1392:76
at Array.forEach (native)
at Socket.<anonymous> (/opt/discordIRCd/server.js:1149:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)
Dictionary key is unchecked at: https://github.com/creesch/discordIRCd/blob/04e14d3/server.js#L1392
Currently the only way to deal with that is restarting the entire thing. That can of course be done in a smarter way.
The deamon will crash if a user inputs a LIST command for any reason when connecting to the DMServer
data: LIST │··························
│··························
/mnt/mpathag/scratch/node/discordIRCd/server.js:693 │··························
const channels = discordClient.guilds.get(discordID).channels.array(); │··························
^ │··························
│··························
TypeError: Cannot read property 'channels' of undefined │··························
at listCommand (/mnt/mpathag/scratch/node/discordIRCd/server.js:693:57) │··························
at /mnt/mpathag/scratch/node/discordIRCd/server.js:933:25 │··························
at Array.forEach (native) │··························
at Socket.<anonymous> (/mnt/mpathag/scratch/node/discordIRCd/server.js:779:19) │··························
at emitOne (events.js:96:13) │··························
at Socket.emit (events.js:189:7) │··························
at readableAddChunk (_stream_readable.js:176:18) │··························
at Socket.Readable.push (_stream_readable.js:134:10) │··························
at TCP.onread (net.js:551:20)
If we can't speak in a channel, don't let the user be able speak on irc
It would be helpful to handle message history, which is supported by a small handful of clients keeping up to date with IRCv3.
It's still under development (might be a bit stalled), but there's a current standard that could be followed. since a few clients already follow it, and inspircd have implemented it into their deamon as well.
http://ircv3.net/specs/extensions/batch/chathistory-3.3.html
Here's a simple format for messages.
I would assume that when a user connects to the irc server, and joins a channel, the previous X messages could be fetched and sent over to the client
Logged on to Discord through the website today to find out that a few people had sent me DMs that never showed up on IRC. If logs are helpful, I can get someone to send me a DM while I'm logging.
Something that has been on my mind for a while. In order to do this properly it is probably also needed to make discordIRCd check for the existence of a config and if not generate a default one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.