Sha256: a23c8e8c04a28ab5e9ba473247ed4897f2dbd9ac3cea4ea6b74465a82310d9e7
Contents?: true
Size: 638 Bytes
Versions: 8
Compression:
Stored size: 638 Bytes
Contents
hook(type: :code, code: @numeric::NAMREPLY) do |dat| m = /[=*@] (.+?) :(.+)/.match(dat[:extra]) unless dat[:plug].chans[m[1]] dat[:plug].chans[m[1]] = {} end unless dat[:plug].chans[m[1]][:collecting] dat[:plug].chans[m[1]][:collecting] = true dat[:plug].chans[m[1]][:users] = [] end users = m[2].split(' ') users.each do |user| user = /[@+%&]*(.+)/.match(user)[1] dat[:plug].chans[m[1]][:users] << user dat[:plug].users[user] = { nick: user } end end hook(type: :code, code: @numeric::ENDOFNAMES) do |dat| m = /(.+?) :.*/.match(dat[:extra]) dat[:plug].chans[m[1]][:collecting] = false end
Version data entries
8 entries across 8 versions & 1 rubygems