How to fix invite group crash (AllRight) ?

Results 1 to 10 of 10
  1. #1
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    How to fix invite group crash (AllRight) ?

    code

    Code:
    IMPL_PACKET_FUNC(ServerGameLogic, PKT_S2C_SendGroupInvite)
    {
    	char find[128];
    	r3dscpy(find, n.intogamertag);
    	obj_ServerPlayer* tplr = FindPlayer(find);
    
    	char find1[128];
    	r3dscpy(find1, n.fromgamertag);
    	obj_ServerPlayer* plr = FindPlayer(find1);
    
    	if (!tplr || !plr)
    	{
    		return;
    	}
    	if (plr == tplr)
    	{
    		return;
    	}
    	const float curTime = r3dGetTime();
    	const float CHAT_DELAY_BETWEEN_MSG = 1.0f;	// expected delay between message
    	const int   CHAT_NUMBER_TO_SPAM    = 5;	// default 4 -number of messages below delay time to be considered spam
    	float diff = curTime - plr->lastChatTime_;
    
    	if (plr)
    	{
    		if(diff > CHAT_DELAY_BETWEEN_MSG)
    		{
    			plr->numChatMessages_ = 0;
    			plr->lastChatTime_    = curTime;
    		}
    		else
    		{
    			plr->numChatMessages_++;
    			if(plr->numChatMessages_ >= CHAT_NUMBER_TO_SPAM)
    			{
    				char message[128] = {0};
    				PKT_S2C_CheatMsg_s n2;
    				sprintf(message, "Kicked from server : invalid PKT_C2C_SendGroupinvite - spam"); // fix group
    				r3dscpy(n2.cheatreason,message);
    				//gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
    				gServerLogic.p2pSendRawToPeer(plr->peerId_, &n2, sizeof(n2));
    				DisconnectPeer(plr->peerId_, true, "invalid PKT_C2C_SendGroupinvite - spam");
    				return;
    			}
    		}
    	}
    
    
    	if(tplr && plr)
    	{
    		if (!tplr->loadout_->isInvite)
    		{
    			char message1[128] = {0};
    			char message2[128] = {0};
    			PKT_S2C_ReceivedGroupInvite_s n2;
    			n2.status = 2;
    			n2.peerId = plr->peerId_;
    			sprintf(message1, "Received group from %s",n.fromgamertag);
    			r3dscpy(n2.text,message1);
    			//gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
    			gServerLogic.p2pSendToPeer(tplr->peerId_, tplr, &n2, sizeof(n2));
    
    			PKT_S2C_ReceivedGroupInvite_s n3;
    			n3.status = 2;
    			sprintf(message2, "Group invite send successfully",n.fromgamertag);
    			r3dscpy(n3.text,message2);
    			n3.peerId = 99999;
    			//gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
    			gServerLogic.p2pSendToPeer(plr->peerId_, plr, &n3, sizeof(n3));
    
    			tplr->loadout_->isInvite = true;
    			plr->loadout_->isInvite = true;
    		}
    		else
    		{
    			char message2[128] = {0};
    			PKT_S2C_ReceivedGroupInvite_s n3;
    			sprintf(message2, "Allready Invited");
    			r3dscpy(n3.text,message2);
    			n3.peerId = 99999;
    			//gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
    			gServerLogic.p2pSendToPeer(plr->peerId_, plr, &n3, sizeof(n3));
    		}
    	}
    }
    - - - Updated - - -

    if invite a player to group > client kick and crash....


  2. #2
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    bumppp

  3. #3
    Sorcerer Supreme skyone is offline
    Member +Rank
    Nov 2013 Join Date
    254Posts

    Re: How to fix invite group crash (AllRight) ?

    Quote Originally Posted by javaz97 View Post
    code

    Code:
    IMPL_PACKET_FUNC(ServerGameLogic, PKT_S2C_SendGroupInvite)
    {
        char find[128];
        r3dscpy(find, n.intogamertag);
        obj_ServerPlayer* tplr = FindPlayer(find);
    
        char find1[128];
        r3dscpy(find1, n.fromgamertag);
        obj_ServerPlayer* plr = FindPlayer(find1);
    
        if (!tplr || !plr)
        {
            return;
        }
        if (plr == tplr)
        {
            return;
        }
        const float curTime = r3dGetTime();
        const float CHAT_DELAY_BETWEEN_MSG = 1.0f;    // expected delay between message
        const int   CHAT_NUMBER_TO_SPAM    = 5;    // default 4 -number of messages below delay time to be considered spam
        float diff = curTime - plr->lastChatTime_;
    
        if (plr)
        {
            if(diff > CHAT_DELAY_BETWEEN_MSG)
            {
                plr->numChatMessages_ = 0;
                plr->lastChatTime_    = curTime;
            }
            else
            {
                plr->numChatMessages_++;
                if(plr->numChatMessages_ >= CHAT_NUMBER_TO_SPAM)
                {
                    char message[128] = {0};
                    PKT_S2C_CheatMsg_s n2;
                    sprintf(message, "Kicked from server : invalid PKT_C2C_SendGroupinvite - spam"); // fix group
                    r3dscpy(n2.cheatreason,message);
                    //gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
                    gServerLogic.p2pSendRawToPeer(plr->peerId_, &n2, sizeof(n2));
                    DisconnectPeer(plr->peerId_, true, "invalid PKT_C2C_SendGroupinvite - spam");
                    return;
                }
            }
        }
    
    
        if(tplr && plr)
        {
            if (!tplr->loadout_->isInvite)
            {
                char message1[128] = {0};
                char message2[128] = {0};
                PKT_S2C_ReceivedGroupInvite_s n2;
                n2.status = 2;
                n2.peerId = plr->peerId_;
                sprintf(message1, "Received group from %s",n.fromgamertag);
                r3dscpy(n2.text,message1);
                //gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
                gServerLogic.p2pSendToPeer(tplr->peerId_, tplr, &n2, sizeof(n2));
    
                PKT_S2C_ReceivedGroupInvite_s n3;
                n3.status = 2;
                sprintf(message2, "Group invite send successfully",n.fromgamertag);
                r3dscpy(n3.text,message2);
                n3.peerId = 99999;
                //gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
                gServerLogic.p2pSendToPeer(plr->peerId_, plr, &n3, sizeof(n3));
    
                tplr->loadout_->isInvite = true;
                plr->loadout_->isInvite = true;
            }
            else
            {
                char message2[128] = {0};
                PKT_S2C_ReceivedGroupInvite_s n3;
                sprintf(message2, "Allready Invited");
                r3dscpy(n3.text,message2);
                n3.peerId = 99999;
                //gServerLogic.p2pSendToPeer(peerId_, NULL, &n2, sizeof(n2));
                gServerLogic.p2pSendToPeer(plr->peerId_, plr, &n3, sizeof(n3));
            }
        }
    }
    - - - Updated - - -

    if invite a player to group > client kick and crash....
    very strange, me i have tested group system and work fine ....

  4. #4
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    log

    Line 1263: 002544.710| !!! cheat: peer02, r:DisconnectPeer invalid PKT_C2C_SendGroupinvite - spam, CID:1001911 [EternityBox], ip:58.9.213.xx
    Line 3745: 006111.420| !!! cheat: peer00, r:DisconnectPeer invalid PKT_C2C_SendGroupinvite - spam, CID:1003448 [LASVEGAS], ip:58.9.213.xx
    Line 4991: 007613.606| !!! cheat: peer07, r:DisconnectPeer invalid PKT_C2C_SendGroupinvite - spam, CID:1001790 [VEGAS], ip:61.90.124.xx
    Line 8707: 014304.512| !!! cheat: peer01, r:DisconnectPeer invalid PKT_C2C_SendGroupinvite - spam, CID:1007615 [poov], ip:58.9.213.xx

  5. #5
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    some one...

  6. #6
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    bumpppp

  7. #7
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    some one....

  8. #8
    Elite Member D132ian1 is offline
    Member +Rank
    Nov 2013 Join Date
    138Posts

    Re: How to fix invite group crash (AllRight) ?

    None is going to help you, you can stop asking and bumping your thread like a retard^^

  9. #9
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    noo bumppp

  10. #10
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: How to fix invite group crash (AllRight) ?

    help ppppp



Advertisement