浏览代码

IP connections;

bjorn 11 年之前
父节点
当前提交
71c0a0a8e8
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      data/menu/menumain.lua

+ 5 - 6
data/menu/menumain.lua

@@ -52,12 +52,11 @@ function MenuMain:host()
 end
 
 function MenuMain:join()
-  self:connect('localhost')
-  do return end
-  gorgeous:send(gorgeous.msgMatchmake, {}, function(data)
-    if #data.ip > 0 then self:connect(data.ip)
-    else print('No servers running :[') end
-  end)
+  if love.system.getClipboardText():match('%d+%.%d+%.%d+%.%d+') then
+    return self:connect(love.system.getClipboardText())
+  end
+
+  self:connect('')
 end
 
 function MenuMain:connect(ip)