update
This commit is contained in:
parent
e50f10e87c
commit
f0e79e35df
@ -60,14 +60,15 @@ end
|
|||||||
|
|
||||||
def main
|
def main
|
||||||
begin
|
begin
|
||||||
|
h = { "-name" => 1, "-nick" => 1, "-serv" => 2, "-port" => 3 }
|
||||||
|
|
||||||
ARGV.each_with_index do |element,index|
|
ARGV.each_with_index do |element,index|
|
||||||
if element == "-name"
|
case h[element]
|
||||||
|
when h["-name"]
|
||||||
@name = ARGV[index + 1]
|
@name = ARGV[index + 1]
|
||||||
end
|
when h["-serv"]
|
||||||
if element == "-serv"
|
|
||||||
@serv = ARGV[index + 1]
|
@serv = ARGV[index + 1]
|
||||||
end
|
when h["-port"]
|
||||||
if element == "-port"
|
|
||||||
@port = ARGV[index + 1].to_i
|
@port = ARGV[index + 1].to_i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user