I have never programmed for wolfteam, but generally each channel has a port , at booting the server sends to the client a list of active channels with names then the client calls a function which enables a button for it in the channel list
After checking the code,
From, /Mateo-M/wtserver/blob/master/database/DatabaseConnection.java, you can see that the origianl coder had some local server "http://localhost/wolfteam/"
From , Mateo-M/wtserver/blob/master/database/Channels.java , One of the files of this server is "channels.php" in this file it handles channels it gets them from a DB and sends them as a response , a function called getChannels() gets the available channels from this php response.
In this file, /Mateo-M/wtserver/blob/master/server/broker/WorldInfoAck.java, the channels you received is made into a packet in a function called getData()
Soln (1):
Create this page "http://localhost/wolfteam/channels.php" and make it respond with the channel name and port so that getChannels() function can get them
The format is:
Channel1Name;Channel1Port;Channel2Name;Channel2Por t;Channel3Name;Channel3Port ... and so on
Soln (2):
Easier solution , but not neat, Instead of making the PHP page, just hardcode the channel port and name.
This is the code:
replace getChannels() function with this one
public ArrayList<Channel> getChannels()
{
ArrayList<Channel> channels = new ArrayList<Channel>();
Channel channel = new Channel("Lyneix", 4444); //The second argument is the port:4444
channels.add(channel)
return channels;
}
EXTRA:
From, "/Mateo-M/wtserver/blob/master/database/Users.java", Another page of the local server was called: "users.php". It was used to access the database to get user related info (kill count ,death count, gold, etc...).
>>>>>Which client are you using ? send it to me i may help you.
>>>>>Update me with the results
I have never programmed for wolfteam, but generally each channel has a port , at booting the server sends to the client a list of active channels with names then the client calls a function which enables a button for it in the channel list
After checking the code,
From, /Mateo-M/wtserver/blob/master/database/DatabaseConnection.java, you can see that the origianl coder had some local server "http://localhost/wolfteam/"
From , Mateo-M/wtserver/blob/master/database/Channels.java , One of the files of this server is "channels.php" in this file it handles channels it gets them from a DB and sends them as a response , a function called getChannels() gets the available channels from this php response.
In this file, /Mateo-M/wtserver/blob/master/server/broker/WorldInfoAck.java, the channels you received is made into a packet in a function called getData()
Soln (1):
Create this page "http://localhost/wolfteam/channels.php" and make it respond with the channel name and port so that getChannels() function can get them
The format is:
Channel1Name;Channel1Port;Channel2Name;Channel2Por t;Channel3Name;Channel3Port ... and so on
Soln (2):
Easier solution , but not neat, Instead of making the PHP page, just hardcode the channel port and name.
This is the code:
replace getChannels() function with this one
public ArrayList<Channel> getChannels()
{
ArrayList<Channel> channels = new ArrayList<Channel>();
Channel channel = new Channel("Lyneix", 4444); //The second argument is the port:4444
channels.add(channel)
return channels;
}
EXTRA:
From, "/Mateo-M/wtserver/blob/master/database/Users.java", Another page of the local server was called: "users.php". It was used to access the database to get user related info (kill count ,death count, gold, etc...).
>>>>>Which client are you using ? send it to me i may help you.
>>>>>Update me with the results
I have never programmed for wolfteam, but generally each channel has a port , at booting the server sends to the client a list of active channels with names then the client calls a function which enables a button for it in the channel list
After checking the code,
From, /Mateo-M/wtserver/blob/master/database/DatabaseConnection.java, you can see that the origianl coder had some local server "http://localhost/wolfteam/"
From , Mateo-M/wtserver/blob/master/database/Channels.java , One of the files of this server is "channels.php" in this file it handles channels it gets them from a DB and sends them as a response , a function called getChannels() gets the available channels from this php response.
In this file, /Mateo-M/wtserver/blob/master/server/broker/WorldInfoAck.java, the channels you received is made into a packet in a function called getData()
Soln (1):
Create this page "http://localhost/wolfteam/channels.php" and make it respond with the channel name and port so that getChannels() function can get them
The format is:
Channel1Name;Channel1Port;Channel2Name;Channel2Por t;Channel3Name;Channel3Port ... and so on
Soln (2):
Easier solution , but not neat, Instead of making the PHP page, just hardcode the channel port and name.
This is the code:
replace getChannels() function with this one
public ArrayList<Channel> getChannels()
{
ArrayList<Channel> channels = new ArrayList<Channel>();
Channel channel = new Channel("Lyneix", 4444); //The second argument is the port:4444
channels.add(channel)
return channels;
}
EXTRA:
From, "/Mateo-M/wtserver/blob/master/database/Users.java", Another page of the local server was called: "users.php". It was used to access the database to get user related info (kill count ,death count, gold, etc...).
>>>>>Which client are you using ? send it to me i may help you.
>>>>>Update me with the results
Good infos, if you are interesed in it, we can try working developing it together.
Hello everybody, I'm the guy who shared those files on GitHub.
If you plan on finishing those files, do not hesitate to create Pull Requests to add what you've coded into the Git repository.
We couldn't open the channels yet, even you help me (Google Translate)