176 Commits

Author SHA1 Message Date
Richard Schöbel
fd95d7d9b0 check if an user is present in the channel 2017-05-16 16:06:39 +02:00
Martin Ek
5453e4589f Merge pull request #235 from Junky2k/master
send nick change from irc to discord
2017-05-16 08:53:18 -04:00
Richard Schöbel
fd88a992b1 fixed 'nitpick' :D, and only sends to tracked channels,
edited tests to reflect these changes
2017-05-16 14:05:22 +02:00
Martin Ek
a03433d357 Merge pull request #221 from Throne3d/add/discord-commands
Allow commandCharacters to work for messages sent to Discord
2017-05-15 22:30:05 -04:00
Richard Schöbel
ec7ca8b88d more tests and usage of ircStatusNotices 2017-05-10 01:25:00 +02:00
Richard Schöbel
2e96dd7b79 Added test 2017-05-10 00:56:27 +02:00
Richard Schöbel
4edb307556 fixed linter stuff 2017-05-10 00:13:48 +02:00
Richard Schöbel
e2eb354c0b removed tabs and so 2017-05-09 22:44:32 +02:00
Richard Schöbel
284d60b0ad send nick change fromn irc to discord 2017-05-09 22:19:52 +02:00
Fiaxhs
b4452dd487 remove useless brackets 2017-05-02 13:06:21 +02:00
Fiaxhs
2c05038c37 Reworked webhook flow
IRC formatting
2017-05-02 13:03:00 +02:00
Fiaxhs
9ea90a9d96 Merge remote-tracking branch 'upstream/master' 2017-05-02 12:42:29 +02:00
Edward Jones
03596570bc Warn if a part/quit is received and no channelUsers is set
Attempts to fix #216's crash but is unlikely to fix the
underlying issue (that somehow the client isn't saving
a list of nicks in a channel, either because the server
isn't sending a names event, or the node-irc library is
processing it poorly, or otherwise).
2017-04-29 23:49:56 +01:00
Edward Jones
4120c5961b Allow commandCharacters to work for messages sent to Discord
Fixes #217.
- Reorganize the comments describing how to format the custom
formatting options
- Make 'author' and 'nickname' synonyms in the custom formatting
- Add a 'side' parameter for commandPrelude (takes 'Discord' or
  'IRC', depending on whether the message was from Discord or IRC)
- Add debug messages upon sending command messages
- Add similar functionality for command messages sent in IRC to
  Discord, as from Discord to IRC
- Add tests for the above and custom formatting of it
2017-04-13 19:13:38 +01:00
Edward Jones
de448eac49 Fix ircStatusNotices when channels are not lowercase
Should fix #216, by lowercasing the channel name when
it receives each event. This also adds debug messages
to make it easier to see when the bot is actually
receiving (and presumably processing) these events.
2017-04-13 18:29:26 +01:00
Edward Jones
cc990d67e1 Use sets instead of arrays for user membership in channels 2017-04-05 20:52:38 +01:00
Edward Jones
1c8fa12def Fix IRC quit messages sending to all channels by tracking users
Keep a list of users in each channel, using the names event
in addition to the join/part events, so as to prevent spamming
unnecessary channels when the quit event is raised with all
channels from a server.

Fixes #213.
2017-04-04 17:15:14 +01:00
Edward Jones
215c33baff Rename special->exact and getDiscordChannelFor->findDiscordChannel 2017-03-30 15:24:41 +01:00
Edward Jones
2b85b8f458 Extract getDiscordChannelFor from send(Special)ToDiscord 2017-03-30 15:24:41 +01:00
Edward Jones
607cb687fd Allow users to have bot announce itself joining IRC to Discord 2017-03-30 15:22:55 +01:00
Edward Jones
c39d751f4f Bot should not announce itself joining IRC 2017-03-30 15:22:55 +01:00
Edward Jones
0633c32b0a Add ability to disable join/part messages and test for this 2017-03-30 15:22:55 +01:00
Edward Jones
611aa6b6db Update part/quit messages and add tests
- Do not discard reason from part messages
- Output to each channel in the quit messages
- Add tests for join/part/quit events
- Add test that sendSpecialToDiscord doesn't send messages
  to outside the channel mapping
2017-03-30 15:22:55 +01:00
Edward Jones
4322ed595e Cleanup rebase to match newer code 2017-03-30 15:22:55 +01:00
Edward Jones
352065b019 Fix merge 2017-03-30 15:22:55 +01:00
stupid cat
b60c86c858 Fixed trailing spaces 2017-03-30 15:22:55 +01:00
stupid cat
89ec8128f2 Fixed functions being broken 2017-03-30 15:22:55 +01:00
stupid cat
3356e99781 Fixed undefined variables and string concatenation 2017-03-30 15:22:55 +01:00
stupid cat
9439b9388c More line indents. Frigg, please 2017-03-30 15:22:55 +01:00
stupid cat
eb1e56ffd9 Fixed spacing, hopefully lint is happier 2017-03-30 15:22:55 +01:00
stupid cat
3384c32c32 Fixed formatting 2017-03-30 15:22:55 +01:00
stupid cat
c4944a4f7c Missed a function rename 2017-03-30 15:22:55 +01:00
stupid cat
b163759c7d Fixed some line spacing? 2017-03-30 15:22:55 +01:00
stupid cat
79ecf68ec9 Added IRC users joining/parting/leaving 2017-03-30 15:22:55 +01:00
Edward Jones
9848a89dd6 Simplify substitutePattern 2017-03-29 22:24:07 +01:00
Edward Jones
e4a994b996 Move formatting options into a separate 'format' object 2017-03-29 22:22:33 +01:00
Edward Jones
8e7900c9c5 Split tests into config contexts, add Discord format tests
Also fix an issue in a previous commit whereby Discord
channel names were not prefixed with '#' (despite the
comments suggesting that to be the case).
2017-03-29 22:14:57 +01:00
Edward Jones
60e7d78c6f Refactor custom formatting to use a substitutePattern method 2017-03-29 22:14:57 +01:00
Edward Jones
4599e1731b Add custom formatting to Discord output 2017-03-29 22:14:00 +01:00
Edward Jones
b345485366 Add custom output formatting to IRC output 2017-03-29 22:12:25 +01:00
Martin Ek
9915db1585 Merge pull request #205 from rahatarmanahmed/convert-formatting
Convert text styles between IRC/Discord
2017-03-29 15:29:24 -05:00
Martin Ek
bc3f51750a Merge pull request #208 from Throne3d/fix/username-mentions
Convert username mentions even if nickname set
2017-03-29 15:25:22 -04:00
Martin Ek
1daf62e5a6 Merge pull request #203 from Throne3d/add/role-mentions
Parse role mentions appropriately, as with channel and user mentions
2017-03-29 15:08:17 -04:00
Martin Ek
8c37393ca6 Merge pull request #202 from Throne3d/add-channelids-tests
Add Discord channel ID matching (PR #187) and tests for it
2017-03-29 15:06:57 -04:00
Edward Jones
8ef4ba9d44 Convert username mentions even if nickname set 2017-03-27 00:06:46 +01:00
Kevin Alberts
31042c1eda Added formatting conversions to messages. Text formatting like bold, italics and underlining will now be converted between discord and IRC. 2017-03-25 12:00:15 -05:00
Edward Jones
b30c4c34f3 Only translate role mentions from IRC if role is mentionable 2017-03-25 02:15:01 +00:00
Edward Jones
860a4137a7 Add IRC->Discord role mention parsing 2017-03-25 02:15:01 +00:00
Edward Jones
a1dfdf65ff Match roles in parseText to display @-roles neatly in IRC 2017-03-25 02:15:01 +00:00
Edward Jones
f882e15b8b Make the bot not crash when mentioned channel fails to exist
If a channel is referenced in Discord, e.g. <#1234>, and the
referenced channel ID does not exist, the bot will presently
crash. This fixes it to display '#deleted-channel', as it
does on the Discord side of the mirror.
2017-03-24 22:01:44 +00:00