Disconnect a player ip from gameserver (C#)

Results 1 to 8 of 8
  1. #1
    Account Upgraded | Title Enabled! HellYeahMU is offline
    MemberRank
    May 2011 Join Date
    260Posts

    Support Disconnect a player ip from gameserver (C#)

    I need a code example to disconnect a player via ip, port

    I searched a lot with TCPClient and TCPListener but couldn't success to disconnect specific IP.

    Can someone share an example ?


  2. #2

    Re: Disconnect a player ip from gameserver (C#)

    Client side dont have disconnect function GameServer get dc from function CloseClient() gObjDel() closesocket()

    record
    possible flood actions to non protected server because of that that send many packages and get dc all

    for
    only itself disconnect need write new function or send to gs not existing package



  3. #3
    Account Upgraded | Title Enabled! HellYeahMU is offline
    MemberRank
    May 2011 Join Date
    260Posts

    Re: Disconnect a player ip from gameserver (C#)

    Quote Originally Posted by Dankend View Post
    Client side dont have disconnect function GameServer get dc from function CloseClient() gObjDel() closesocket()

    record
    possible flood actions to non protected server because of that that send many packages and get dc all

    for
    only itself disconnect need write new function or send to gs not existing package


    But for example muguard firewall close connection in a second when you add an ip to blacklist. Is that so hard to close connection if you know connected ip and port?

  4. #4
    Kingdom of Shadows [RCZ]ShadowKing is offline
    MemberRank
    Jul 2007 Join Date
    1,644Posts

    Re: Disconnect a player ip from gameserver (C#)

    I guess muguard firewall is a proxy or something like that so it doesn't necessarily close the connection in GS but rather block the original client from accessing the GS which cause the disconnect (timeout).

    If you want to disconnect a client from GS using an external application I think you should study the protocol of JoinServer, as I remember there was a function which can disconnect an user from GS.

  5. #5
    Account Upgraded | Title Enabled! HellYeahMU is offline
    MemberRank
    May 2011 Join Date
    260Posts

    Re: Disconnect a player ip from gameserver (C#)

    Well it's not bad having an advice for anti-ddos. Just a day ago I couldnt decide one in a anti-ddos topic. There were many. And some of them kills my resources. This one Masteru suggested looks nice. Started to use and thanks.

    Now about my situation. I am good at C# and I was writing my own anti-cheat in server side. I am checking current log files but if I do it every minute or every 10 seconds it kills my resources. That's why I'm making a player report system on MVC project related with my own application now. When a player reports a speed hacker it will check logs and autoban acc and ip. Ofc we have a problem to disconnect cheater from server automatically.

    Till I find a solution in my project codebehind, I have alternative way to disconnect him.

    1. acc ban
    2. add ip to muguard black list
    3. kill process firewall
    4. status check runs muguard firewall back.

    and bb to cheater in a minute checking logs and disconnect from game till he change his ip and register new acc.

  6. #6
    Gamma DragonSeth is offline
    MemberRank
    Aug 2011 Join Date
    2,996Posts

    Re: Disconnect a player ip from gameserver (C#)

    Quote Originally Posted by sahip View Post
    Well it's not bad having an advice for anti-ddos. Just a day ago I couldnt decide one in a anti-ddos topic. There were many. And some of them kills my resources. This one Masteru suggested looks nice. Started to use and thanks.

    Now about my situation. I am good at C# and I was writing my own anti-cheat in server side. I am checking current log files but if I do it every minute or every 10 seconds it kills my resources. That's why I'm making a player report system on MVC project related with my own application now. When a player reports a speed hacker it will check logs and autoban acc and ip. Ofc we have a problem to disconnect cheater from server automatically.

    Till I find a solution in my project codebehind, I have alternative way to disconnect him.

    1. acc ban
    2. add ip to muguard black list
    3. kill process firewall
    4. status check runs muguard firewall back.

    and bb to cheater in a minute checking logs and disconnect from game till he change his ip and register new acc.
    Also btw you can't block anti ddos with software.

  7. #7

    Re: Disconnect a player ip from gameserver (C#)

    u better code a function to DC players Pc hardware Id instead

  8. #8
    Account Upgraded | Title Enabled! HellYeahMU is offline
    MemberRank
    May 2011 Join Date
    260Posts

    Re: Disconnect a player ip from gameserver (C#)

    Quote Originally Posted by DragonSeth View Post
    Also btw you can't block anti ddos with software.
    What you mean blocking anti-ddos ? Why do I need to block anti-ddos ?



Advertisement