You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
u mentioned Russians too, what about them? and the war has nothing to do with the topic, the guy is delaying him on purpose cuz he cant deliver anything.
I never said I hate Russians. Please read carefully.
What I meant is that, due to the ongoing war and other circumstances, I would avoid outsourcing development work to Ukrainian developers at the moment. The limited access to electricity throughout the day and the risk of being called to war at any time make it challenging for them to ensure timely delivery.
Unfortunately, working with Ukrainian developers right now can be unreliable.
Question
l2viserion
There are new changes in hopzone but I'm unable to fix it, not sure what I do wrong, can anybody help with below code to read the current votes?
protected static int getVotes()
{
InputStreamReader isr = null;
BufferedReader br = null;
try
{
if(!hopzoneUrl.endsWith(".html"))
hopzoneUrl+=".html";
URLConnection con = new URL(hopzoneUrl).openConnection();
con.addRequestProperty("User-Agent", "Mozilla/5.0");
isr = new InputStreamReader(con.getInputStream());
br = new BufferedReader(isr);
String line;
while ((line = br.readLine()) != null)
{
if (line.contains(":server-votes")||line.contains(":server-votes=")||line.contains("server-votes")||line.contains("server-votes=")||line.contains(":server-votes=\""))
{
int votes = Integer.valueOf(line.split("\"")[1].split("\"")[0].split("\"")[2]);
//Hopzone line source code:
// :server-votes="228"
return votes;
}
}
br.close();
Edited by l2viserionisr.close();
}
catch (Exception e)
{
System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage());
}
return -1;
}
help tag
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.