Sha256: 07424cf831c31f294ea95ef10ab50acc30fba5e7f0327fe704393b0ee057fc85

Contents?: true

Size: 342 Bytes

Versions: 14

Compression:

Stored size: 342 Bytes

Contents

hook(type: :code, code: @numeric::WHOISUSER) do |dat|
  m = /(.+?) (.+?) (.+?) \* :.*/.match(dat[:extra])
  dat[:plug].users[m[1]] = {} unless dat[:plug].users[m[1]]
  u = dat[:plug].users[m[1]]
  u[:nick] = m[1]
  u[:user] = m[2]
  u[:host] = m[3]
  emit(dat.merge(type: :code_whoisuser, nick: u[:nick], user: u[:user], host: u[:host]))
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
protonbot-0.3.1 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.3.0 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.7 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.6 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.5 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.4 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.3 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.2 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.1 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.2.0 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.1.3 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.1.2 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.1.1 lib/protonbot/core_plugin/codes/whois.rb
protonbot-0.1.0 lib/protonbot/core_plugin/codes/whois.rb