Can't join servers

When i am trying to launch a garry’s mod then click multiplayer it doesn’t load any servers so i try connecting by console from a server’s IP i am in the server but it kicks me out 30 seconds later.

Kicks you for what? Sounds like an issue with Steam connection.

This and that used to be an issue with pirated versions of GMod.

Do you have any unnecessary tags/filters set in your server browser?

Restart Steam, leave it for a few minutes and make sure all your Source games are properly working and installed by starting each one. Since the Steam Pipe update there has been a lot of weird issues caused by it and playing the games once since the update will convert them over to the new versions and then make sure they show as mounted in GMod.

Well it works all the sudden and no its not a pirated version.