Enabled support for auto-IP detection updates.
This commit is contained in:
parent
40a7b53203
commit
f185aceb41
|
@ -177,9 +177,14 @@ module Ildus
|
|||
end
|
||||
end
|
||||
|
||||
def updt_cmd(host, addr)
|
||||
def updt_cmd(host, addr=nil)
|
||||
raise NotAuthError unless @account.authenticated?
|
||||
addr = IPAddr.new(addr)
|
||||
if addr.nil?
|
||||
addr = Socket.getnameinfo(@io.getpeername).first
|
||||
addr = IPAddr.new(addr)
|
||||
else
|
||||
addr = IPAddr.new(addr)
|
||||
end
|
||||
@commit ||= @domain.update_host(host, addr)
|
||||
rescue HostNotFoundError
|
||||
prot_msg 425, host
|
||||
|
|
Reference in New Issue