phoenixpirated Posted September 23, 2011 Author Share Posted September 23, 2011 OK i was ask by a friend to show how i blocked multi IP connections in my Game(s)So why not show all how to do it aswell.Ok everything is Server side editsAS ALWAYS MAKE A BACKUP OF YOUR FILES.look in modServerTCPfind Sub SockectConnectedreplace the whole sub with this one:```Sub SocketConnected(ByVal Index As Long)Dim i As Long If Index <> 0 Then ' make sure they're not banned If Not IsBanned(GetPlayerIP(Index)) Then Call TextAdd("Received connection from " & GetPlayerIP(Index) & ".") Else Call AlertMsg(Index, "You have been banned from " & Options.Game_Name & ", and can no longer play.") End If ' re-set the high index Player_HighIndex = 0 For i = MAX_PLAYERS To 1 Step -1 If IsConnected(i) Then Player_HighIndex = i Exit For End If Next ' now that player is connected lets check for multi(ip) connections If Not IsMultiIPOnline(GetPlayerIP(Index)) Then Call TextAdd("Received connection from " & GetPlayerIP(Index) & ".") Else Call AlertMsg(Index, "Multi Connections From Same Ip Is Not Alowed Any Longer.") End If ' send the new highindex to all logged in players SendHighIndex End IfEnd Sub```next find Sub IsMultiIPOnlineand under the```Dim n as long```add this:``` n = 0```then in the same sub change this:``` If (n > 0) then```to this:``` if (n > 1) then```that should be all you need to dowhat we have done is tell the server to check for multi IPs when a new client is connectingthe first IP wil be numbered (1)so we block anything that is more than (1)if you find a problem please post so i can editthis may not be the best way to block IPs but is what i needed for my game(s)Please enjoyyou may message me for edits, if i feel it is needed to be done i will add it when i have free time to do so Link to comment Share on other sites More sharing options...
Robin Posted September 23, 2011 Share Posted September 23, 2011 Not the greatest idea ever. Now anyone connecting from the same internet connection can't play your game. Not very nice blocking one of your player's brothers from playing. Link to comment Share on other sites More sharing options...
phoenixpirated Posted September 23, 2011 Author Share Posted September 23, 2011 yes i understand that but like i said, this is what i needed may not be for everyonethis is put in place for people that want to make more than one account and trade items onto one account which would make gameplay uneven Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 23, 2011 Share Posted September 23, 2011 @ robin: >.< then what's to stop them from making a new account and trolling? XD I think this adds to the security of the games in a somewhat needed way =D(DAMN I GOT POST NINJA'D!) Link to comment Share on other sites More sharing options...
phoenixpirated Posted September 23, 2011 Author Share Posted September 23, 2011 I agree there must be a block in place if there is a better way i am open to options Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 23, 2011 Share Posted September 23, 2011 The truth is that the IP block is still a favorite for the option of PERMA-BAN of MANY online services. if a relative in the house has an account too, they can beat the shat out of the person who invoked the ban Link to comment Share on other sites More sharing options...
Robin Posted September 23, 2011 Share Posted September 23, 2011 Silly argument. Plenty of other things you can do to block a player from running the game on the same computer. Hardware serials are probably a good shot.Also, keep in mind it's _insanely_ easy to change your IP. Hell, it's easy to fake just about any data leaving your computer.If you're really having so much trouble from someone you should fix whatever system they're abusing, not ignore it all and try and cut them out.Trolls will be trolls no matter what you do. Link to comment Share on other sites More sharing options...
phoenixpirated Posted September 23, 2011 Author Share Posted September 23, 2011 I have already coded the client to run a check and call "Destroygame" if the client is running on a the same computer.but that does not stop a player with more than one computer,(this is the problem i had)so i with the multi IP block this problem no longer happens(yes i know a player can get help from friends in trying to cheat the game)But anyway like the first post saysI was asked how "I" block the same IP from multi connectingif you feel so strongly that this is wrong then remove the topic this was only added here thinking it might could be modified or improved by other users( i won't make that mistake again) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now