ircinch 2.4.5 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.standard.yml +1 -1
- data/CHANGELOG.md +10 -0
- data/CODE_OF_CONDUCT.md +7 -81
- data/README.md +39 -30
- data/docs/bot_options.md +207 -314
- data/docs/changes.md +293 -282
- data/docs/common_mistakes.md +50 -41
- data/docs/common_tasks.md +63 -42
- data/docs/encodings.md +28 -55
- data/docs/events.md +123 -131
- data/docs/getting_started.md +97 -102
- data/docs/logging.md +62 -70
- data/docs/migrating.md +145 -131
- data/docs/plugins.md +109 -3
- data/docs/readme.md +17 -15
- data/examples/README.md +78 -0
- data/examples/basic/autovoice.rb +14 -18
- data/examples/basic/google.rb +9 -22
- data/examples/basic/hello.rb +4 -3
- data/examples/basic/join_part.rb +8 -23
- data/examples/basic/memo.rb +26 -24
- data/examples/basic/msg.rb +6 -6
- data/examples/basic/seen.rb +17 -24
- data/examples/basic/urban_dict.rb +6 -26
- data/examples/basic/url_shorten.rb +8 -26
- data/examples/plugins/autovoice.rb +17 -16
- data/examples/plugins/custom_prefix.rb +4 -3
- data/examples/plugins/dice_roll.rb +13 -20
- data/examples/plugins/google.rb +7 -21
- data/examples/plugins/hello.rb +4 -3
- data/examples/plugins/hooks.rb +5 -6
- data/examples/plugins/join_part.rb +8 -21
- data/examples/plugins/lambdas.rb +5 -6
- data/examples/plugins/last_nick.rb +7 -6
- data/examples/plugins/msg.rb +6 -6
- data/examples/plugins/multiple_matches.rb +10 -11
- data/examples/plugins/own_events.rb +14 -19
- data/examples/plugins/seen.rb +23 -23
- data/examples/plugins/timer.rb +5 -6
- data/examples/plugins/url_shorten.rb +15 -19
- data/examples/settings.rb +19 -0
- data/examples/tiny_url.rb +41 -0
- data/ircinch.gemspec +5 -6
- data/lib/cinch/bot.rb +2 -3
- data/lib/cinch/channel.rb +4 -4
- data/lib/cinch/message_queue.rb +2 -2
- data/lib/cinch/plugin.rb +1 -1
- data/lib/cinch/version.rb +1 -1
- metadata +270 -249
- data/lib/cinch/rubyext/float.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34c51fbdabcd306e8bc34d32906638f878dceebf3de04f2bb232026fdea67760
|
|
4
|
+
data.tar.gz: 2d2fc20b90a4ad09d8df33a9fdbe58dad2e8048d721d240210d714083d0b70f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce693adc7b30ac8abe1e0b6bc3007c471c1a4d36f90e4a9a667eb27df044c15970a285a56dd2777ed59f5bbaabf29e298347ad57e8e738a095f1d2f9d353e94f
|
|
7
|
+
data.tar.gz: 148d93dc0059c4974e569335ef086c8ce03f934e7225bca81d23075a2ba58f067a77c49581349a6aab1458763216a92ac2adb229cb9047b9817ae0292244af3c
|
data/.standard.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
* IRCinch 2.4.6, 23 November 2026
|
|
2
|
+
- Add JRuby, TruffleRuby, and Ruby 4.1.0-preview1 to CI matrix
|
|
3
|
+
- Remove Ruby 3.2 from CI matrix
|
|
4
|
+
- Remove obsolete Float::INFINITY fallback
|
|
5
|
+
- Bump minimum supported Ruby version to 3.3.0
|
|
6
|
+
- Use monotonic timing for reconnect waits and message throttling
|
|
7
|
+
- Add base64 as a runtime dependency for forward compatibility
|
|
8
|
+
- Minor performance improvements
|
|
9
|
+
- Refresh documentation and examples
|
|
10
|
+
|
|
1
11
|
* IRCinch 2.4.5, 7 February 2026
|
|
2
12
|
- Fix issue in which bot does not join channels or set modes after connecting (fix by @snex)
|
|
3
13
|
|
data/CODE_OF_CONDUCT.md
CHANGED
|
@@ -1,84 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Code of Conduct
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
IRCinch follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
* Participants will be tolerant of opposing views.
|
|
6
|
+
* Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
|
|
7
|
+
* When interpreting the words and actions of others, participants should always assume good intentions.
|
|
8
|
+
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Our Standards
|
|
10
|
-
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
-
|
|
13
|
-
* Demonstrating empathy and kindness toward other people
|
|
14
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
-
* Giving and gracefully accepting constructive feedback
|
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
-
|
|
19
|
-
Examples of unacceptable behavior include:
|
|
20
|
-
|
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
22
|
-
advances of any kind
|
|
23
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
24
|
-
* Public or private harassment
|
|
25
|
-
* Publishing others' private information, such as a physical or email
|
|
26
|
-
address, without their explicit permission
|
|
27
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
28
|
-
professional setting
|
|
29
|
-
|
|
30
|
-
## Enforcement Responsibilities
|
|
31
|
-
|
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
33
|
-
|
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
35
|
-
|
|
36
|
-
## Scope
|
|
37
|
-
|
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
39
|
-
|
|
40
|
-
## Enforcement
|
|
41
|
-
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at siasmj@uwec.edu. All complaints will be reviewed and investigated promptly and fairly.
|
|
43
|
-
|
|
44
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
45
|
-
|
|
46
|
-
## Enforcement Guidelines
|
|
47
|
-
|
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
49
|
-
|
|
50
|
-
### 1. Correction
|
|
51
|
-
|
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
53
|
-
|
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
55
|
-
|
|
56
|
-
### 2. Warning
|
|
57
|
-
|
|
58
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
|
59
|
-
|
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
61
|
-
|
|
62
|
-
### 3. Temporary Ban
|
|
63
|
-
|
|
64
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
65
|
-
|
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
67
|
-
|
|
68
|
-
### 4. Permanent Ban
|
|
69
|
-
|
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
71
|
-
|
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
73
|
-
|
|
74
|
-
## Attribution
|
|
75
|
-
|
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
|
77
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
78
|
-
|
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
80
|
-
|
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
|
82
|
-
|
|
83
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
|
10
|
+
If you have any concerns about behaviour within this project, please contact us at [https://github.com/siasmj](https://github.com/siasmj).
|
data/README.md
CHANGED
|
@@ -10,39 +10,43 @@ profits flourish.
|
|
|
10
10
|
IRCinch will do all of the hard work for you, so you can spend time creating
|
|
11
11
|
cool plugins and extensions to wow your internet peers.
|
|
12
12
|
|
|
13
|
-
IRCinch a fork of the brilliant [Cinch](https://github.com/cinchrb/cinch)
|
|
13
|
+
IRCinch is a fork of the brilliant [Cinch](https://github.com/cinchrb/cinch)
|
|
14
14
|
project by Dominik Honnef, Lee Jarvis, and contributors. The IRCinch fork
|
|
15
|
-
focuses on compatibility with supported versions of
|
|
15
|
+
focuses on compatibility with supported versions of Ruby, and keeps the Ruby
|
|
16
|
+
API under the `Cinch` namespace for drop-in compatibility.
|
|
16
17
|
|
|
17
18
|
## Installation
|
|
18
19
|
|
|
20
|
+
This checkout requires Ruby 3.3 or newer. The
|
|
21
|
+
[CI matrix](.github/workflows/ci.yml) includes CRuby, JRuby, and TruffleRuby.
|
|
22
|
+
|
|
19
23
|
### RubyGems
|
|
20
24
|
|
|
21
25
|
You can install the latest IRCinch gem using RubyGems:
|
|
22
26
|
|
|
23
|
-
```
|
|
27
|
+
```sh
|
|
24
28
|
gem install ircinch
|
|
25
29
|
```
|
|
26
30
|
|
|
27
31
|
### Bundler
|
|
28
|
-
Or, you can install the latest IRCinch gem using Bundler:
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
In an existing Bundler project, add IRCinch with:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
31
36
|
bundle add ircinch
|
|
32
|
-
bundle install
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
### GitHub
|
|
36
40
|
|
|
37
|
-
You can also check out the latest code directly from
|
|
41
|
+
You can also check out the latest code directly from GitHub:
|
|
38
42
|
|
|
39
|
-
```
|
|
43
|
+
```sh
|
|
40
44
|
git clone https://github.com/ircinchrb/ircinch.git
|
|
41
45
|
```
|
|
42
46
|
|
|
43
47
|
## Example
|
|
44
48
|
|
|
45
|
-
Your typical Hello, World application in Cinch would go something like this:
|
|
49
|
+
Your typical "Hello, World" application in Cinch would go something like this:
|
|
46
50
|
|
|
47
51
|
```ruby
|
|
48
52
|
require "ircinch"
|
|
@@ -50,6 +54,7 @@ require "ircinch"
|
|
|
50
54
|
bot = Cinch::Bot.new do
|
|
51
55
|
configure do |c|
|
|
52
56
|
c.server = "irc.libera.chat"
|
|
57
|
+
c.nick = "my_example_bot"
|
|
53
58
|
c.channels = ["#ircinch-bots"]
|
|
54
59
|
end
|
|
55
60
|
|
|
@@ -61,14 +66,19 @@ end
|
|
|
61
66
|
bot.start
|
|
62
67
|
```
|
|
63
68
|
|
|
64
|
-
|
|
69
|
+
See [Getting Started](docs/getting_started.md) for setup and how to run the
|
|
70
|
+
example. The [example bots](examples/README.md) include complete scripts
|
|
71
|
+
and commands to try.
|
|
65
72
|
|
|
66
73
|
## Features
|
|
67
74
|
|
|
68
75
|
### Documentation
|
|
69
76
|
|
|
70
|
-
IRCinch
|
|
71
|
-
|
|
77
|
+
See the [IRCinch guides](docs/readme.md) for setup, bot options, plugins, and
|
|
78
|
+
events.
|
|
79
|
+
|
|
80
|
+
For API details, see the [source reference](lib/cinch) or the gem's
|
|
81
|
+
[RubyDoc.info page](https://rubydoc.info/gems/ircinch).
|
|
72
82
|
|
|
73
83
|
### Object Oriented
|
|
74
84
|
|
|
@@ -87,11 +97,10 @@ making your code simple and easy to comprehend.
|
|
|
87
97
|
Unlike a lot of popular IRC frameworks, IRCinch is threaded. But wait, don't
|
|
88
98
|
let that scare you. It's totally easy to grasp.
|
|
89
99
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
operations. Damn that's handy.
|
|
100
|
+
IRCinch runs each handler invocation in its own thread and uses separate
|
|
101
|
+
threads for reading and writing IRC traffic. A plugin instance can handle
|
|
102
|
+
several events concurrently. Use [`synchronize`](docs/plugins.md#shared-state)
|
|
103
|
+
when handlers share mutable state.
|
|
95
104
|
|
|
96
105
|
### Plugins
|
|
97
106
|
|
|
@@ -122,6 +131,7 @@ end
|
|
|
122
131
|
bot = Cinch::Bot.new do
|
|
123
132
|
configure do |c|
|
|
124
133
|
c.server = "irc.libera.chat"
|
|
134
|
+
c.nick = "my_example_bot"
|
|
125
135
|
c.channels = ["#cinch-bots"]
|
|
126
136
|
c.plugins.plugins = [Hello]
|
|
127
137
|
end
|
|
@@ -133,7 +143,8 @@ bot.start
|
|
|
133
143
|
Note: Plugins take a default prefix of `/^!/` which means the actual match is
|
|
134
144
|
`!hello`.
|
|
135
145
|
|
|
136
|
-
|
|
146
|
+
See the [plugin guide](docs/plugins.md) for matchers, listeners, and
|
|
147
|
+
configuration.
|
|
137
148
|
|
|
138
149
|
### Numeric Replies
|
|
139
150
|
|
|
@@ -141,16 +152,15 @@ Do you know what IRC code 401 represents? How about 376? or perhaps 502?
|
|
|
141
152
|
Sure you don't (and if you do, you're as geeky as us!). IRCinch doesn't expect
|
|
142
153
|
you to store the entire IRC RFC code set in your head, and rightfully so!
|
|
143
154
|
|
|
144
|
-
|
|
145
|
-
|
|
155
|
+
Use the named [constants](lib/cinch/constants.rb) in `Cinch::Constants`
|
|
156
|
+
or pass the numeric code directly to [`on` or `listen_to`](docs/events.md).
|
|
146
157
|
|
|
147
158
|
### Pretty Output
|
|
148
159
|
|
|
149
160
|
Ever get fed up of watching those boring, frankly unreadable lines flicker
|
|
150
161
|
down your terminal screen whilst your bot is online? Help is at hand! By
|
|
151
|
-
default, IRCinch
|
|
152
|
-
|
|
153
|
-
way for your plugins to log custom messages:
|
|
162
|
+
default, IRCinch uses a formatted logger that adds color when writing to a
|
|
163
|
+
terminal. Your plugins and handlers can also log custom messages:
|
|
154
164
|
|
|
155
165
|
```ruby
|
|
156
166
|
on :message, /hello/ do |m|
|
|
@@ -158,11 +168,13 @@ on :message, /hello/ do |m|
|
|
|
158
168
|
end
|
|
159
169
|
```
|
|
160
170
|
|
|
171
|
+
See [Logging](docs/logging.md) for levels, output, and filters.
|
|
172
|
+
|
|
161
173
|
## Code of Conduct
|
|
162
174
|
|
|
163
175
|
Everyone interacting in the IRCinch project's codebases, issue trackers, chat
|
|
164
|
-
rooms, and mailing lists is expected to follow the
|
|
165
|
-
[code of conduct](
|
|
176
|
+
rooms, and mailing lists is expected to follow the
|
|
177
|
+
[code of conduct](CODE_OF_CONDUCT.md).
|
|
166
178
|
|
|
167
179
|
## Contribute
|
|
168
180
|
|
|
@@ -170,9 +182,6 @@ Love IRCinch? Love Ruby? Love helping? Of course you do! If you feel like
|
|
|
170
182
|
IRCinch is missing that awesome jaw-dropping feature and you want to be the
|
|
171
183
|
one to make this magic happen, you can!
|
|
172
184
|
|
|
173
|
-
Please note that we intend for IRCinch to be fully compatible with all
|
|
174
|
-
supported CRuby versions.
|
|
175
|
-
|
|
176
185
|
Fork the project, implement your awesome feature in its own branch, and send
|
|
177
186
|
a pull request to one of the IRCinch collaborators. We'll be more than happy
|
|
178
187
|
to check it out.
|
|
@@ -180,8 +189,8 @@ to check it out.
|
|
|
180
189
|
### Development
|
|
181
190
|
|
|
182
191
|
After forking/checking out the repo, run `bin/setup` to install dependencies.
|
|
183
|
-
Then, run `rake test` to run the tests. You can also run
|
|
184
|
-
interactive prompt that will allow you to experiment.
|
|
192
|
+
Then, run `bundle exec rake test` to run the tests. You can also run
|
|
193
|
+
`bin/console` for an interactive prompt that will allow you to experiment.
|
|
185
194
|
|
|
186
195
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
187
196
|
To release a new version, update the version number in `lib/cinch/version.rb`,
|