Sha256: 4e9ceade640b6f6c399e4f0c6406f3c56bda65a55ebf842f61f8bbcd3e72d9ac
Contents?: true
Size: 623 Bytes
Versions: 12
Compression:
Stored size: 623 Bytes
Contents
hook(type: :code, code: @numeric::NAMREPLY) do |dat| m = /[=*@] (.+?) :(.+)/.match(dat[:extra]) if !dat[:plug].chans[m[1]] || !dat[:plug].chans[m[1]][:collecting] dat[:plug].chans[m[1]] = {} 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
12 entries across 12 versions & 1 rubygems