diff --git a/config.yaml b/config.yaml index 44ece68379..ff9c3a7a7c 100644 --- a/config.yaml +++ b/config.yaml @@ -159,8 +159,8 @@ worlds: server: #Database Configuration - DB_URL_FORMAT: "jdbc:mysql://%s:3306/cosmic" - DB_HOST: "localhost" + DB_URL_FORMAT: "jdbc:mysql://%s:3306/cosmic" # If the docker ENV for DB_HOST is anything but "db", this string format should be changed from 3306 to 3307 (or whichever port it was changed to in docker) + DB_HOST: "localhost" DB_USER: "cosmic_server" DB_PASS: "snailshell" INIT_CONNECTION_POOL_TIMEOUT: 90 # Seconds diff --git a/database/sql/2-db_drops.sql b/database/sql/2-db_drops.sql index 91e6ea2b1b..07fd684c45 100644 --- a/database/sql/2-db_drops.sql +++ b/database/sql/2-db_drops.sql @@ -19993,7 +19993,7 @@ USE `cosmic`; (8220015, 1452015, 1, 1, 0, 22000), (8220015, 1472031, 1, 1, 0, 22000), (8220015, 1482010, 1, 1, 0, 22000), -(2110301, 4031568, 1, 1, 3911, 80000), +(2100108, 4031568, 1, 1, 3911, 80000), (9300150, 4031774, 1, 1, 3361, 100000), (9300150, 4031796, 1, 1, 3362, 100000), (9300105, 4001118, 1, 1, 3814, 200000), diff --git a/database/sql/3-db_shopupdate.sql b/database/sql/3-db_shopupdate.sql index 57f37dda51..f11b84e1cd 100644 --- a/database/sql/3-db_shopupdate.sql +++ b/database/sql/3-db_shopupdate.sql @@ -335,7 +335,7 @@ INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `pitch`, `position`) VALU (1301000, 2000006, 620, 0, 156), (1301000, 2000003, 200, 0, 160), (1301000, 2000002, 320, 0, 164), - (1301000, 2000015, 160, 0, 168), + (1301000, 2000001, 160, 0, 168), (1301000, 2000000, 50, 0, 172); # adding missing pirate items at Singapore npc's diff --git a/docker-compose.yml b/docker-compose.yml index dbadc52505..ea16d31f0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,9 +19,9 @@ services: - ./scripts:/opt/server/scripts - ./wz:/opt/server/wz environment: - DB_HOST: "db" + DB_HOST: "db" ## Remember if this is present it will OVERRIDE the host in the config.yaml, if you put here anything other than db, you'll need to change the config.yaml jdbc string to port 3307, and not port 3306 PG_DB_HOST: "pg_db" - + db: image: mysql:8.0.23 ports: diff --git a/src/main/java/client/Client.java b/src/main/java/client/Client.java index 04bbe340e0..4acdd0ab3f 100644 --- a/src/main/java/client/Client.java +++ b/src/main/java/client/Client.java @@ -39,7 +39,6 @@ import net.server.Server; import net.server.channel.Channel; import net.server.coordinator.login.LoginBypassCoordinator; import net.server.coordinator.session.Hwid; -import net.server.coordinator.session.IpAddresses; import net.server.coordinator.session.SessionCoordinator; import net.server.coordinator.session.SessionCoordinator.AntiMulticlientResult; import net.server.guild.Guild; @@ -169,10 +168,7 @@ public class Client extends ChannelInboundHandlerAdapter { private static String getRemoteAddress(io.netty.channel.Channel channel) { String remoteAddress = "null"; try { - String hostAddress = ((InetSocketAddress) channel.remoteAddress()).getAddress().getHostAddress(); - if (hostAddress != null) { - remoteAddress = IpAddresses.evaluateRemoteAddress(hostAddress); // thanks dyz for noticing Local/LAN/WAN connections not interacting properly - } + remoteAddress = ((InetSocketAddress) channel.remoteAddress()).getAddress().getHostAddress(); } catch (NullPointerException npe) { log.warn("Unable to get remote address for client", npe); } diff --git a/src/main/java/net/netty/ServerChannelInitializer.java b/src/main/java/net/netty/ServerChannelInitializer.java index dfcfde3b9d..bb25172215 100644 --- a/src/main/java/net/netty/ServerChannelInitializer.java +++ b/src/main/java/net/netty/ServerChannelInitializer.java @@ -15,7 +15,6 @@ import net.encryption.InitializationVector; import net.encryption.PacketCodec; import net.packet.logging.InPacketLogger; import net.packet.logging.OutPacketLogger; -import net.server.coordinator.session.IpAddresses; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import service.TransitionService; @@ -42,10 +41,7 @@ public abstract class ServerChannelInitializer extends ChannelInitializer