Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

GunZ Patch Library (27 patches and counting)

Rival Gamers Owner
Loyal Member
Joined
Jul 7, 2007
Messages
962
Reaction score
161
got bored scrolled through this thought id correct a few

/////////////////////////////// this one is not needed really but whatever

Code:
case MC_NET_CLEAR:
        {
        	if (pCommand->GetSenderUID() == GetUID()) //GetUID() gets server uid although uid low is always 2 for the server but w/e
		{
	            MUID uid;
        	    if (pCommand->GetParameter(&uid, 0, MPT_UID)==false) break;
            		OnNetClear(uid);
        	} 
	   return true;
        }
        break;


/////////////////////////////////// this is pretty needed lol!!!!!


Code:
case MC_NET_BANPLAYER_FLOODING :
            {
		if (pCommand->GetSenderUID() != GetUID()) return true; //why remove a packet that disconnects flooders when u can uid check it as it originates from mserver lol
                MUID uidPlayer;
                
                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                if (MGetServerConfig()->IsUseBlockFlooding())
                {
                    MMatchObject* pObj = GetObject( uidPlayer );
                    if( pObj && pObj->GetDisconnStatusInfo().GetStatus() == MMDS_CONNECTED)
                    {
                        if( pObj->GetAccountName() ) {
                            LOG(LOG_PROG,"Ban Player On Flooding - (MUID:%d%d, ID:%s)"
                                , uidPlayer.High, uidPlayer.Low, pObj->GetAccountName());
                        } else {
                            LOG(LOG_PROG,"Ban Player On Flooding - (MUID:%d%d, ID:%s)"
                                , uidPlayer.High, uidPlayer.Low);
                        }
                        
                        pObj->DisconnectHacker( MMHT_COMMAND_FLOODING );
                    }
                    else
                    {
                        LOG(LOG_PROG,"Ban Player On Flooding - Can't Find Object");
                    }
                }
            }
            break;


/////////////////////////////////// and just fyi this is quicker and a better way
Code:
strSQL.Format(g_szDB_GET_LOGININFO, m_DBFilter.Filtering(szUserID).c_str());

if there is any syntax error blame notepad.
Enjoy.
 
Last edited:
Back
Top