send http:// before the url?
|
I'm having a problem, when I use my ::vote or ::forums the links won't open.
I believe it has to do with not having www. before the url as my :onate works.
I can't use www. before my other links so how can i get around this?
This doesn't work
This doesCode:VOTE { @Override public void execute(Player c, String input) { c.getPA().sendFrame126("name.motivoters.com/motivote/", 12000); } },
Code:DONATE { @Override public void execute(Player c, String input) { c.getPA().sendFrame126("www.rsps-pay.com/store.php?id=", 12000); } },
I just had a look at my client and if yours is similar, you'll need a small modification.
This is code in my PacketHandler where packets are handled (126: setInterfaceText in particular):
As you can see, it only launches the url when it starts with "www.".Code:case 126: //Set Interface Text String text = packetInStream.getString(); interfaceId = packetInStream.getShortA(); if (text.startsWith("www.")) { clnt.launchURL(text); packetType = -1; return true; } GameInterface.interfaceCache[interfaceId].disabledText = text; packetType = -1; return true;
If you link doesn't work with "www." in a browser, then I suggest adding the "http://" to the if-statement as well:
Code:if (text.startsWith("www.") || text.startsWith("http://"))
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |