I found a solution, I'll be more careful since the first time I posted it I got banned for an unknown, most likely technical or anti-spam, reason. (This is not a new account, I repealed the ban, but my posts are still gone.)
Try all common solutions to the problem before doing either of these, especially the second one, as it is very tedious and you have to do it every single time.
You can open the SRB2 kart server browser (not to be confused with the SRB2 server browser) in your web browser. I am not 100% sure that this website is safe, but it is what worked for me. I won't post the link but you will find it if you search "srb2 kart master server". Then you want to look at the IP address of the server you want to connect to and then enter it in SRB2 kart where it says specify IPV4 address.
I also found the solution to another, possibly related issue:
When you try to connect to a modded server it goes through the process of downloading the mods in the menu, but it doesn't actually download them and the download progress bars are empty. In the logs it will say that some files are larger than the server is willing to send. You will again open the server browser in your web browser (refer to the bold text above), but this time you will download all the server's mods from there and set them up.
This may be a one time error, having to do with the host messing up, but it may prove useful as a work-around for any server-mod related issues.