iirc 0.5.1 → 0.6.0
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/CHANGELOG.md +12 -0
- data/README.md +7 -7
- data/examples/facts.rb +2 -2
- data/examples/greeter.rb +5 -5
- data/examples/wolfram.rb +2 -2
- data/lib/iirc/{bot → modules}/accept_invites.rb +6 -3
- data/lib/iirc/{bot → modules}/ambient.rb +22 -1
- data/lib/iirc/modules/autojoin.rb +25 -0
- data/lib/iirc/{bot → modules}/channels.rb +7 -3
- data/lib/iirc/{bot → modules}/configure.rb +1 -1
- data/lib/iirc/{bot → modules}/formatting.rb +1 -1
- data/lib/iirc/{bot → modules}/hooks.rb +1 -1
- data/lib/iirc/{bot → modules}/ircv3/batches.rb +1 -1
- data/lib/iirc/{bot → modules}/ircv3/caps.rb +1 -1
- data/lib/iirc/{bot → modules}/ircv3/labeled_requests.rb +1 -1
- data/lib/iirc/{bot → modules}/ircv3/parsing.rb +1 -1
- data/lib/iirc/{bot → modules}/isupport.rb +2 -2
- data/lib/iirc/modules/members.rb +39 -0
- data/lib/iirc/{bot → modules}/oper_up.rb +1 -1
- data/lib/iirc/{bot → modules}/parsing.rb +1 -1
- data/lib/iirc/{bot → modules}/pong.rb +1 -1
- data/lib/iirc/modules/print_io.rb +17 -0
- data/lib/iirc/modules/reading.rb +12 -0
- data/lib/iirc/{bot → modules}/redis.rb +1 -1
- data/lib/iirc/{bot → modules}/regex_hooks.rb +1 -1
- data/lib/iirc/{bot → modules}/reply_target.rb +1 -1
- data/lib/iirc/{bot → modules}/track_own_nick.rb +1 -1
- data/lib/iirc/{bot → modules}/verbs.rb +1 -1
- data/lib/iirc/version.rb +1 -1
- data/lib/iirc.rb +34 -34
- metadata +25 -25
- data/lib/iirc/bot/autojoin.rb +0 -18
- data/lib/iirc/bot/members.rb +0 -28
- data/lib/iirc/bot/print_io.rb +0 -12
- data/lib/iirc/bot/reading.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 619cec1c65f965243d45c96b29f02c38d7f6fb576c180587ec468fb8292cfece
|
4
|
+
data.tar.gz: d3b9ca07dcdb07132b36c35a776f6ea287edf88d51f11bc7c4135eac67ed54e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e80238e5d75e018b049e2cb1ee545bced58d4745a32243d5480a433774a5dbb29247da204bde26927135411c14102b0dab92dbba460772a1d450d7c8394b283a
|
7
|
+
data.tar.gz: 7d7a764ee1b744ca006fc6c4fd949d73b7a14ee2765501c11ffb3dd05db13dc8a72272a4cb0bdb00f29da47375494e17ca359cee6fefdd2d22f0f1f7d44cf627
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## [0.6.0] - 2022-03-30
|
2
|
+
|
3
|
+
- Move modules from IIRC::Bot to IIRC namespace
|
4
|
+
|
5
|
+
- Document AcceptInvites
|
6
|
+
- Document Ambient
|
7
|
+
- Document AutoJoin
|
8
|
+
- Document Channels
|
9
|
+
- Document Members
|
10
|
+
- Document PrintIO
|
11
|
+
- Document Reading
|
12
|
+
|
1
13
|
## [0.5.1] - 2022-03-29
|
2
14
|
|
3
15
|
- [Batteries] Include ISupport
|
data/README.md
CHANGED
@@ -10,10 +10,10 @@ It's based on composition, with code reload, extensibility and predictability in
|
|
10
10
|
require 'iirc'
|
11
11
|
|
12
12
|
class CoolBot < IIRC::IRCv3Bot
|
13
|
-
include Verbs
|
14
|
-
include AutoJoin
|
15
|
-
include RegexHooks
|
16
|
-
include PrintIO
|
13
|
+
include IIRC::Verbs
|
14
|
+
include IIRC::AutoJoin
|
15
|
+
include IIRC::RegexHooks
|
16
|
+
include IIRC::PrintIO
|
17
17
|
|
18
18
|
def configure_coolness
|
19
19
|
on /^!poke/, :poke_back
|
@@ -35,8 +35,8 @@ CoolBot.run 'irc.libera.chat' if __FILE__ == $0
|
|
35
35
|
require 'iirc'
|
36
36
|
|
37
37
|
class SillyBot < IIRC::IRCv3Bot
|
38
|
-
include AcceptInvites
|
39
|
-
include Batteries # Verbs, Ambient, RegexHooks used here
|
38
|
+
include IIRC::AcceptInvites
|
39
|
+
include IIRC::Batteries # Verbs, Ambient, RegexHooks used here
|
40
40
|
|
41
41
|
def configure_silliness
|
42
42
|
on /^!uptime/, :say_uptime
|
@@ -110,7 +110,7 @@ For example:
|
|
110
110
|
|
111
111
|
```ruby
|
112
112
|
class CoolBot < IIRC::IRCv3Bot
|
113
|
-
include RegexHooks
|
113
|
+
include IIRC::RegexHooks
|
114
114
|
|
115
115
|
def configure_reload
|
116
116
|
on /^=reload/, :reload!
|
data/examples/facts.rb
CHANGED
data/examples/greeter.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require "iirc"
|
2
2
|
|
3
3
|
class Greeter < IIRC::Bot
|
4
|
-
include AutoJoin
|
5
|
-
include Verbs
|
6
|
-
include PrintIO
|
4
|
+
include IIRC::AutoJoin
|
5
|
+
include IIRC::Verbs
|
6
|
+
include IIRC::PrintIO
|
7
7
|
|
8
8
|
def on_join(evt)
|
9
|
-
say evt.target, "Hello #{evt.
|
9
|
+
say evt.target, "Hello #{evt.nick}!" unless me === evt.sender
|
10
10
|
end
|
11
11
|
|
12
12
|
def autojoin_channels
|
@@ -14,4 +14,4 @@ class Greeter < IIRC::Bot
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
Greeter.run 'irc.libera.chat', nick: 'GreeterBot' if __FILE__ == $0
|
17
|
+
Greeter.run 'irc.libera.chat', nick: 'GreeterBot' if __FILE__ == $0
|
data/examples/wolfram.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
module IIRC
|
2
|
-
|
3
|
-
|
2
|
+
# Accept INVITEs to join a channel.
|
3
|
+
# By default, all invites are accepted.
|
4
|
+
# To choose which ones to accept, define {#accept_invite?} on your object / class.
|
5
|
+
module AcceptInvites
|
6
|
+
# Decides whether to accept a given INVITE.
|
4
7
|
# By default, all invites are accepted.
|
5
|
-
# @param [Event]
|
8
|
+
# @param evt [Event] the invite
|
6
9
|
# @return [true] if we should join the channel
|
7
10
|
def accept_invite?(evt)
|
8
11
|
true
|
@@ -1,7 +1,28 @@
|
|
1
1
|
require_relative "reply_target"
|
2
2
|
|
3
3
|
module IIRC
|
4
|
-
|
4
|
+
# Ambient lets you access the current event without having to pass it around.
|
5
|
+
#
|
6
|
+
# A thread-local variable is set by {Events} when an event comes in.
|
7
|
+
#
|
8
|
+
# Overloads of {#say}, {#act}, {#mode}, {#join} etc. make their
|
9
|
+
# first argument optional.
|
10
|
+
#
|
11
|
+
# This module pulls in both {Events} and {Verbs}.
|
12
|
+
#
|
13
|
+
# @example say (with Ambient)
|
14
|
+
# def on_privmsg
|
15
|
+
# say "Hello!"
|
16
|
+
# end
|
17
|
+
# @example say (without)
|
18
|
+
# def on_privmsg(evt)
|
19
|
+
# say reply_target(evt), "Hello!"
|
20
|
+
# end
|
21
|
+
# @example mode (with Ambient)
|
22
|
+
# def on_join(evt)
|
23
|
+
# mode "+v #{evt.nick}"
|
24
|
+
# end
|
25
|
+
module Ambient
|
5
26
|
module Events
|
6
27
|
private
|
7
28
|
def configure_ambient_events
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module IIRC
|
2
|
+
# Automatically joins channels on RPL_WELCOME (001).
|
3
|
+
#
|
4
|
+
# Override {#autojoin_channels} to choose which channels to join.
|
5
|
+
# {#autojoin!} may be called at any time to resend.
|
6
|
+
module AutoJoin
|
7
|
+
private def configure_autojoin
|
8
|
+
on :'001', :autojoin!
|
9
|
+
end
|
10
|
+
|
11
|
+
# Send JOIN for each {#autojoin_channel}
|
12
|
+
# @return [Array<String>] channels joined
|
13
|
+
def autojoin!
|
14
|
+
for channel in autojoin_channels
|
15
|
+
self << "JOIN #{channel}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# The channels to join. By default, returns an empty array.
|
20
|
+
# @return [Array<String>] channel names
|
21
|
+
def autojoin_channels
|
22
|
+
[]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,15 +1,19 @@
|
|
1
1
|
module IIRC
|
2
|
-
|
2
|
+
# Keeps track of the channels we are currently in.
|
3
|
+
# The list can be retrieved with {#channels}.
|
4
|
+
# Based on JOIN, PART and KICK messages received for our nick.
|
5
|
+
module Channels
|
6
|
+
# @return [Set<String>]
|
3
7
|
def channels
|
4
8
|
@channels ||= Set.new
|
5
9
|
end
|
6
10
|
|
7
11
|
private
|
8
12
|
def configure_channel_tracking
|
9
|
-
hook :
|
13
|
+
hook :track_own_channels
|
10
14
|
end
|
11
15
|
|
12
|
-
def
|
16
|
+
def track_own_channels(evt)
|
13
17
|
case evt.verb
|
14
18
|
when :'001'
|
15
19
|
channels.clear
|
@@ -11,7 +11,7 @@ module IIRC
|
|
11
11
|
# @see https://defs.ircdocs.horse/defs/isupport.html List of tokens and their values (defs.ircdocs.horse)
|
12
12
|
# @see https://datatracker.ietf.org/doc/html/draft-hardy-irc-isupport-00
|
13
13
|
# @see https://datatracker.ietf.org/doc/html/draft-brocklesby-irc-isupport-00
|
14
|
-
module
|
14
|
+
module ISupport
|
15
15
|
# Hash of tokens sent by the server after registration indicating feature support and limits.
|
16
16
|
# @return [Hash#extend(Inquiry)] the raw isupport key=>value pairs. keys with no value are assigned +true+.
|
17
17
|
def isupport
|
@@ -38,7 +38,7 @@ module IIRC
|
|
38
38
|
#
|
39
39
|
# The key=>value format returned by #isupport won't change.
|
40
40
|
# Rather, methods which process the values can be added here.
|
41
|
-
module
|
41
|
+
module ISupport::Inquiry
|
42
42
|
# Whether or not the server supports a user mode which lets clients mark themselves as bots.
|
43
43
|
def bot_mode?
|
44
44
|
!!bot_mode
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module IIRC
|
2
|
+
# Processes lists of channel participants sent by the server into {#members}.
|
3
|
+
# Namely, it processes NAMES replies, such as the ones sent automatically when we
|
4
|
+
# join a channel.
|
5
|
+
# @note IIRC doesn't send NAMES by itself, but will process any replies received, such
|
6
|
+
# as to JOIN, or any requests you have made yourself.
|
7
|
+
# @see IIRC::Verbs#names send a NAMES request
|
8
|
+
module Members
|
9
|
+
# Nicknames present in channels, by channel.
|
10
|
+
# Updated from NAMES replies.
|
11
|
+
# @return [Hash<String,[String]>]
|
12
|
+
def members
|
13
|
+
@members ||= {}
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
# @note In a future release, this may also track using JOIN/KICK/PART, etc.
|
18
|
+
def configure_members_tracking
|
19
|
+
on :'353', :receive_names
|
20
|
+
on :'366', :receive_names_end
|
21
|
+
end
|
22
|
+
|
23
|
+
def receive_names evt
|
24
|
+
names = evt.args[3]
|
25
|
+
channel = evt.args[2]
|
26
|
+
members_receiving[channel].concat names.tr('&+@%~', '').split(' ')
|
27
|
+
end
|
28
|
+
|
29
|
+
def receive_names_end evt
|
30
|
+
channel = evt.args[1]
|
31
|
+
members[channel] = members_receiving.delete(channel)
|
32
|
+
end
|
33
|
+
|
34
|
+
# @return [Hash]
|
35
|
+
def members_receiving
|
36
|
+
@members_receiving ||= Hash.new { |h,k| h[k] = [] }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module IIRC
|
2
|
+
# Wraps {Reading#lines} and {Bot#<<} to print lines received and sent to stdout.
|
3
|
+
# Useful for debugging.
|
4
|
+
module PrintIO
|
5
|
+
# Prints `>> #{line}` to stdout, then yields, for each line from super.
|
6
|
+
def lines
|
7
|
+
super { |line| puts ">> #{line}"; yield line }
|
8
|
+
end
|
9
|
+
|
10
|
+
# Prints `<< #{line}` to stdout, then calls super
|
11
|
+
# @return [self]
|
12
|
+
def <<(line)
|
13
|
+
puts "<< #{line}"
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module IIRC
|
2
|
+
module Reading
|
3
|
+
# Read lines from {#socket} in a blocking loop until EOF or an error is raised.
|
4
|
+
# @return nil
|
5
|
+
# @yield [String] line encoded as UTF-8.
|
6
|
+
def lines
|
7
|
+
loop {
|
8
|
+
yield socket.readline.force_encoding('utf-8').encode
|
9
|
+
}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/iirc/version.rb
CHANGED
data/lib/iirc.rb
CHANGED
@@ -4,33 +4,33 @@ require_relative "iirc/event"
|
|
4
4
|
require_relative "iirc/sender"
|
5
5
|
require_relative "iirc/user"
|
6
6
|
|
7
|
+
require_relative "iirc/bot"
|
7
8
|
require_relative "iirc/numerics"
|
8
9
|
|
9
|
-
require_relative "iirc/
|
10
|
-
require_relative "iirc/
|
11
|
-
require_relative "iirc/
|
12
|
-
require_relative "iirc/
|
13
|
-
require_relative "iirc/
|
14
|
-
require_relative "iirc/
|
15
|
-
require_relative "iirc/
|
16
|
-
require_relative "iirc/
|
17
|
-
require_relative "iirc/
|
18
|
-
require_relative "iirc/
|
19
|
-
require_relative "iirc/
|
20
|
-
require_relative "iirc/
|
21
|
-
require_relative "iirc/
|
22
|
-
require_relative "iirc/
|
23
|
-
require_relative "iirc/
|
24
|
-
require_relative "iirc/
|
25
|
-
require_relative "iirc/
|
26
|
-
require_relative "iirc/
|
27
|
-
require_relative "iirc/
|
28
|
-
|
29
|
-
|
30
|
-
require_relative "iirc/
|
31
|
-
require_relative "iirc/
|
32
|
-
require_relative "iirc/
|
33
|
-
require_relative "iirc/bot/ircv3/labeled_requests"
|
10
|
+
require_relative "iirc/modules/accept_invites"
|
11
|
+
require_relative "iirc/modules/ambient"
|
12
|
+
require_relative "iirc/modules/autojoin"
|
13
|
+
require_relative "iirc/modules/channels"
|
14
|
+
require_relative "iirc/modules/configure"
|
15
|
+
require_relative "iirc/modules/formatting"
|
16
|
+
require_relative "iirc/modules/hooks"
|
17
|
+
require_relative "iirc/modules/isupport"
|
18
|
+
require_relative "iirc/modules/members"
|
19
|
+
require_relative "iirc/modules/oper_up"
|
20
|
+
require_relative "iirc/modules/parsing"
|
21
|
+
require_relative "iirc/modules/pong"
|
22
|
+
require_relative "iirc/modules/print_io"
|
23
|
+
require_relative "iirc/modules/reading"
|
24
|
+
require_relative "iirc/modules/redis"
|
25
|
+
require_relative "iirc/modules/regex_hooks"
|
26
|
+
require_relative "iirc/modules/reply_target"
|
27
|
+
require_relative "iirc/modules/track_own_nick"
|
28
|
+
require_relative "iirc/modules/verbs"
|
29
|
+
|
30
|
+
require_relative "iirc/modules/ircv3/caps"
|
31
|
+
require_relative "iirc/modules/ircv3/parsing"
|
32
|
+
require_relative "iirc/modules/ircv3/batches"
|
33
|
+
require_relative "iirc/modules/ircv3/labeled_requests"
|
34
34
|
|
35
35
|
module IIRC
|
36
36
|
class Error < StandardError; end
|
@@ -67,15 +67,15 @@ module IIRC
|
|
67
67
|
end
|
68
68
|
|
69
69
|
# Batteries is a recommended set of modules for writing interactive bots.
|
70
|
-
module
|
71
|
-
include
|
72
|
-
include
|
73
|
-
include
|
74
|
-
include
|
75
|
-
include
|
76
|
-
include
|
77
|
-
include
|
78
|
-
include
|
70
|
+
module Batteries
|
71
|
+
include Channels
|
72
|
+
include Members
|
73
|
+
include Formatting
|
74
|
+
include AutoJoin
|
75
|
+
include Verbs
|
76
|
+
include Ambient
|
77
|
+
include RegexHooks
|
78
|
+
include ISupport
|
79
79
|
end
|
80
80
|
|
81
81
|
module SSL
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iirc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mooff
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ircparser
|
@@ -47,30 +47,30 @@ files:
|
|
47
47
|
- iirc.gemspec
|
48
48
|
- lib/iirc.rb
|
49
49
|
- lib/iirc/bot.rb
|
50
|
-
- lib/iirc/bot/accept_invites.rb
|
51
|
-
- lib/iirc/bot/ambient.rb
|
52
|
-
- lib/iirc/bot/autojoin.rb
|
53
|
-
- lib/iirc/bot/channels.rb
|
54
|
-
- lib/iirc/bot/configure.rb
|
55
|
-
- lib/iirc/bot/formatting.rb
|
56
|
-
- lib/iirc/bot/hooks.rb
|
57
|
-
- lib/iirc/bot/ircv3/batches.rb
|
58
|
-
- lib/iirc/bot/ircv3/caps.rb
|
59
|
-
- lib/iirc/bot/ircv3/labeled_requests.rb
|
60
|
-
- lib/iirc/bot/ircv3/parsing.rb
|
61
|
-
- lib/iirc/bot/isupport.rb
|
62
|
-
- lib/iirc/bot/members.rb
|
63
|
-
- lib/iirc/bot/oper_up.rb
|
64
|
-
- lib/iirc/bot/parsing.rb
|
65
|
-
- lib/iirc/bot/pong.rb
|
66
|
-
- lib/iirc/bot/print_io.rb
|
67
|
-
- lib/iirc/bot/reading.rb
|
68
|
-
- lib/iirc/bot/redis.rb
|
69
|
-
- lib/iirc/bot/regex_hooks.rb
|
70
|
-
- lib/iirc/bot/reply_target.rb
|
71
|
-
- lib/iirc/bot/track_own_nick.rb
|
72
|
-
- lib/iirc/bot/verbs.rb
|
73
50
|
- lib/iirc/event.rb
|
51
|
+
- lib/iirc/modules/accept_invites.rb
|
52
|
+
- lib/iirc/modules/ambient.rb
|
53
|
+
- lib/iirc/modules/autojoin.rb
|
54
|
+
- lib/iirc/modules/channels.rb
|
55
|
+
- lib/iirc/modules/configure.rb
|
56
|
+
- lib/iirc/modules/formatting.rb
|
57
|
+
- lib/iirc/modules/hooks.rb
|
58
|
+
- lib/iirc/modules/ircv3/batches.rb
|
59
|
+
- lib/iirc/modules/ircv3/caps.rb
|
60
|
+
- lib/iirc/modules/ircv3/labeled_requests.rb
|
61
|
+
- lib/iirc/modules/ircv3/parsing.rb
|
62
|
+
- lib/iirc/modules/isupport.rb
|
63
|
+
- lib/iirc/modules/members.rb
|
64
|
+
- lib/iirc/modules/oper_up.rb
|
65
|
+
- lib/iirc/modules/parsing.rb
|
66
|
+
- lib/iirc/modules/pong.rb
|
67
|
+
- lib/iirc/modules/print_io.rb
|
68
|
+
- lib/iirc/modules/reading.rb
|
69
|
+
- lib/iirc/modules/redis.rb
|
70
|
+
- lib/iirc/modules/regex_hooks.rb
|
71
|
+
- lib/iirc/modules/reply_target.rb
|
72
|
+
- lib/iirc/modules/track_own_nick.rb
|
73
|
+
- lib/iirc/modules/verbs.rb
|
74
74
|
- lib/iirc/numerics.rb
|
75
75
|
- lib/iirc/sender.rb
|
76
76
|
- lib/iirc/user.rb
|
data/lib/iirc/bot/autojoin.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module IIRC
|
2
|
-
module Bot::AutoJoin
|
3
|
-
private def configure_autojoin_hook
|
4
|
-
on :'001', :autojoin!
|
5
|
-
end
|
6
|
-
|
7
|
-
def autojoin!
|
8
|
-
for channel in autojoin_channels
|
9
|
-
self << "JOIN #{channel}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
# override this to read from e.g. redis, config
|
14
|
-
def autojoin_channels
|
15
|
-
[]
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/lib/iirc/bot/members.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
module IIRC
|
2
|
-
module Bot::Members
|
3
|
-
def members
|
4
|
-
@members ||= {}
|
5
|
-
end
|
6
|
-
|
7
|
-
private
|
8
|
-
def configure_members_tracking
|
9
|
-
on :'353', :receive_names
|
10
|
-
on :'366', :receive_names_end
|
11
|
-
end
|
12
|
-
|
13
|
-
def receive_names evt
|
14
|
-
names = evt.args[3]
|
15
|
-
channel = evt.args[2]
|
16
|
-
members_receiving[channel].concat names.tr('&+@%~', '').split(' ')
|
17
|
-
end
|
18
|
-
|
19
|
-
def receive_names_end evt
|
20
|
-
channel = evt.args[1]
|
21
|
-
members[channel] = members_receiving.delete(channel)
|
22
|
-
end
|
23
|
-
|
24
|
-
def members_receiving
|
25
|
-
@members_receiving ||= Hash.new { |h,k| h[k] = [] }
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/iirc/bot/print_io.rb
DELETED