Sha256: 73ca2257319371715dce85502466291e6a7917364ae1cd40c1a1365d3160647d

Contents?: true

Size: 388 Bytes

Versions: 6

Compression:

Stored size: 388 Bytes

Contents

hook(type: :unick) do |dat|
  u = nil
  if dat[:plug].users[dat[:nick]]
    u = dat[:plug].users[dat[:nick]].clone
    dat[:plug].users.delete(dat[:nick]) 
    dat[:plug].users[dat[:to]] = u
  else
    u = {}
    dat[:plug].users[dat[:nick]] = u
  end
  u[:nick] = dat[:to]
  u[:user] = dat[:user]
  u[:host] = dat[:host]

  dat[:plug].nick = dat[:to] if dat[:nick] == dat[:plug].nick
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
protonbot-0.3.5 lib/protonbot/core_plugin/hooks/nick.rb
protonbot-0.3.4 lib/protonbot/core_plugin/hooks/nick.rb
protonbot-0.3.3 lib/protonbot/core_plugin/hooks/nick.rb
protonbot-0.3.2 lib/protonbot/core_plugin/hooks/nick.rb
protonbot-0.3.1 lib/protonbot/core_plugin/hooks/nick.rb
protonbot-0.3.0 lib/protonbot/core_plugin/hooks/nick.rb