public void run() { try { String var1 = (new BigInteger(CryptManager.func_75895_a(NetLoginHandler.func_72526_a(this.field_72590_a), NetLoginHandler.func_72530_b(this.field_72590_a).func_71250_E().getPublic(), NetLoginHandler.func_72525_c(this.field_72590_a)))).toString(16); URL var2 = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(NetLoginHandler.func_72533_d(this.field_72590_a), "UTF-8") + "&serverId=" + URLEncoder.encode(var1, "UTF-8")); BufferedReader var3 = new BufferedReader(new InputStreamReader(var2.openConnection(NetLoginHandler.func_72530_b(this.field_72590_a).func_110454_ao()).getInputStream())); String var4 = var3.readLine(); var3.close(); if(!"YES".equals(var4)) { this.field_72590_a.func_72527_a("Failed to verify username!"); return; } NetLoginHandler.func_72531_a(this.field_72590_a, true); } catch (Exception var5) { this.field_72590_a.func_72527_a("Failed to verify username! [internal error " + var5 + "]"); var5.printStackTrace(); } }
public void func_71766_a() { List var1 = this.field_71775_b; synchronized(this.field_71775_b) { for(int var2 = 0; var2 < this.field_71775_b.size(); ++var2) { NetLoginHandler var3 = (NetLoginHandler)this.field_71775_b.get(var2); try { var3.func_72532_c(); } catch (Exception var6) { var3.func_72527_a("Internal server error"); this.field_71771_f.func_71746_d().func_98033_al().func_98235_b("Failed to handle packet for " + var3.func_72528_e() + ": " + var6, var6); } if(var3.field_72539_c) { this.field_71775_b.remove(var2--); } var3.field_72538_b.func_74427_a(); } } }
public void run() { while (this.myNetworkListenThread.isListening) { try { Socket socket = this.myServerSocket.accept(); NetLoginHandler netloginhandler = new NetLoginHandler(this.myNetworkListenThread.getServer(), socket, "Connection #" + this.connectionCounter++); this.addPendingConnection(netloginhandler); } catch (IOException ioexception) { ioexception.printStackTrace(); } } this.myNetworkListenThread.getServer().getLogAgent().logInfo("Closing listening thread"); }
private void addPendingConnection(NetLoginHandler par1NetLoginHandler) { if (par1NetLoginHandler == null) { throw new IllegalArgumentException("Got null pendingconnection!"); } else { List list = this.pendingConnections; synchronized (this.pendingConnections) { this.pendingConnections.add(par1NetLoginHandler); } } }
public void run() { while(this.field_71771_f.field_71749_b) { try { Socket var1 = this.field_71774_e.accept(); NetLoginHandler var2 = new NetLoginHandler(this.field_71771_f.func_71746_d(), var1, "Connection #" + this.field_71773_d++); this.func_71764_a(var2); } catch (IOException var3) { var3.printStackTrace(); } } this.field_71771_f.func_71746_d().func_98033_al().func_98233_a("Closing listening thread"); }
private void func_71764_a(NetLoginHandler p_71764_1_) { if(p_71764_1_ == null) { throw new IllegalArgumentException("Got null pendingconnection!"); } else { List var2 = this.field_71775_b; synchronized(this.field_71775_b) { this.field_71775_b.add(p_71764_1_); } } }
public void processPendingConnections() { List list = this.pendingConnections; synchronized (this.pendingConnections) { for (int i = 0; i < this.pendingConnections.size(); ++i) { NetLoginHandler netloginhandler = (NetLoginHandler)this.pendingConnections.get(i); try { netloginhandler.tryLogin(); } catch (Exception exception) { netloginhandler.raiseErrorAndDisconnect("Internal server error"); FMLLog.log(Level.SEVERE, exception, "Error handling login related packet - connection from %s refused", netloginhandler.getUsernameAndAddress()); this.myNetworkListenThread.getServer().getLogAgent().logWarningException("Failed to handle packet for " + netloginhandler.getUsernameAndAddress() + ": " + exception, exception); } if (netloginhandler.connectionComplete) { this.pendingConnections.remove(i--); } netloginhandler.myTCPConnection.wakeThreads(); } } }
/** * gets the INetworkManager associated with the given NetHandler * * @param netHandler the NetHandler to get the INetworkManager from * @return the INetworkManager */ public static INetworkManager getNetworkManager(NetHandler netHandler) { if (!netHandler.isServerHandler()) { return SevenCommons.proxy.getNetworkManagerFromClient(netHandler); } else if (netHandler instanceof NetServerHandler) { return ((NetServerHandler) netHandler).netManager; } else { return ((NetLoginHandler) netHandler).myTCPConnection; } }
@Override public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) { return null; }
ThreadLoginVerifier(NetLoginHandler p_i1526_1_) { this.field_72590_a = p_i1526_1_; }
@Override public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) { return ""; }
@Override public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) //server { return null; }
@Override //SERVER SIDE public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) { return null; }
/** * {@inheritDoc} */ @Override public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) { return null; }
/** * If you don't want the connection to continue, return a non-empty string here * If you do, you can do other stuff here- note no FML negotiation has occured yet * though the client is verified as having FML installed * * SERVER SIDE * * @param netHandler * @param manager */ String connectionReceived(NetLoginHandler netHandler, INetworkManager manager);