Przeglądaj źródła

IP connections;

bjorn 11 lat temu
rodzic
commit
71c0a0a8e8
1 zmienionych plików z 5 dodań i 6 usunięć
  1. 5 6
      data/menu/menumain.lua

+ 5 - 6
data/menu/menumain.lua

@@ -52,12 +52,11 @@ function MenuMain:host()
 end
 end
 
 
 function MenuMain:join()
 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
 end
 
 
 function MenuMain:connect(ip)
 function MenuMain:connect(ip)