/ban <player>

Results 1 to 10 of 10
  1. #1
    Valued Member etropulus is offline
    MemberRank
    Jun 2012 Join Date
    118Posts

    /ban <player>

    ZChat_Cmds.cpp :

    Line : 189

    Code:
    _CC_AC("ban",    &ChatCmd_Ban,    CCF_ADMIN|CCF_STAGE|CCF_GAME, ARGVNoMin, 2, true, "/ban <player>", "");
    Line : 1470

    Code:
    void ChatCmd_Ban(const char* line, const int argc, char **const argv) {
        if (argc < 2)
        {
            OutputCmdWrongArgument(argv[0]);
            return;
        }
        char* pszTargetName = argv[1];
     
                   ZPostAdminBan(pszTargetName);
    
    
    }
    Line : 97

    ZPost.h :
    Code:
    void ChatCmd_Ban(const char* line, const int argc, char **const argv);
    Line: 1029

    Code:
    inline void ZPostAdminBan(char* pszTargetName)
    {
        ZPOSTCMD1(MC_BAN, MCmdParamStr(pszTargetName));
    }
    MSharedCommandTable.cpp :

    Line : 886

    Code:
            C(MC_BAN, "ban", "Banned Player", MCDT_MACHINE2MACHINE)
                P(MPT_STR, "strTargetName")
    MSharedCommandTable.h :

    Line : 659

    Code:
    #define MC_BAN            50010
    MMatchServer_OnCommand.cpp :

    Line : 866 :
    Code:
            case MC_BAN:
                {
                    char szTargetName[128]="";
                    pCommand->GetParameter(szTargetName, 0, MPT_STR, sizeof(szTargetName) );
                    Ban(pCommand->GetSenderUID(), szTargetName);
                }
    MMatchServer_Stage.cpp :

    Line : 2765

    Code:
    void MMatchServer::Ban(const MUID& uidAdmin, const char* pszTargetName)
    {
        MMatchObject* pObj = GetObject(uidAdmin);
        if( 0 == pObj )
            return;
    
        if (!IsEnabledObject(pObj)) return;
    
        MMatchStage* pStage = FindStage(pObj->GetStageUID());
        if (pStage == NULL) return;
    
        // °ü¸®ÀÚ ±ÇÇÑÀ» °¡Áø »ç¶÷ÀÌ ¾Æ´Ï¸é ¿¬°áÀ» ²÷´Â´Ù.
        if (!IsAdminGrade(pObj))
        {
            return;
        }
        
        MMatchObject* pTargetObj = GetPlayerByName(pszTargetName);
        if (pTargetObj == NULL) return;            // ¾îµå¹Î ´ë»óÀ¸·Î ¯ºÒ°¡
    
        pTargetObj->GetAccountInfo()->m_nUGrade = MMUG_BLOCKED;
    
        if (m_MatchDBMgr.Ban(pTargetObj->GetAccountInfo()->m_nAID, true)) {
            MMatchObjectCacheBuilder CacheBuilder;
            CacheBuilder.AddObject(pTargetObj);
            MCommand* pCmdCacheUpdate = CacheBuilder.GetResultCmd(MATCHCACHEMODE_REPLACE, this);
            RouteToStage(pStage->GetUID(), pCmdCacheUpdate);
    
            MCommand* pCmdUIUpdate = CreateCommand(MC_BAN, MUID(0,0));
            pCmdUIUpdate->AddParameter(new MCommandParameterUID(pTargetObj->GetUID()));
            pCmdUIUpdate->AddParameter(new MCommandParameterBool(false));
            RouteToStage(pStage->GetUID(), pCmdUIUpdate);
        }
    }

    MMatchServer.h


    Line : 530

    Code:
    void Ban(const MUID& uidAdmin, const char* pszTargetName);
    MMatchDBMgr.cpp :

    Line : 71

    Code:
    TCHAR g_szDB_BAN[] = _T("UPDATE Account SET UGradeID=%d WHERE AID=%d");
    Line : 1513
    Code:
    bool MMatchDBMgr::Ban(const int nAID, bool bJjang)
    {
        _STATUS_DB_START;
        if (!CheckOpen()) return false;
    
        CString strSQL;
    
        try {
            MMatchUserGradeID nGrade = MMUG_BLOCKED;
            strSQL.Format(g_szDB_BAN, nGrade, nAID);
            m_DB.ExecuteSQL( strSQL );
        }
        catch(CDBException* e)
        {
    
            ExceptionHandler(strSQL, e);
            return false;
        }
    
        _STATUS_DB_END(48);
        return true;
    }
    MMatchDBMgr.h :

    Line : 236
    Code:
        bool Ban(const int nAID, const bool bJjang);

    so will affect the player when online


  2. #2
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: /ban <player>

    hahaha,

    now u release it
    but this better one than mine

    ( i can see u have watch at the jjang cmd :P )


    - tankado

  3. #3
    Valued Member etropulus is offline
    MemberRank
    Jun 2012 Join Date
    118Posts

    Re: /ban <player>

    Quote Originally Posted by Tankado View Post
    hahaha,

    now u release it
    but this better one than mine

    ( i can see u have watch at the jjang cmd :P )


    - tankado

    yes, that's very simple

  4. #4
    Hakuna Matata bulli10 is offline
    MemberRank
    Feb 2011 Join Date
    697Posts

    Re: /ban <player>

    make it ban his ip/mac ?

  5. #5
    2D > 3D Wucas is offline
    MemberRank
    Dec 2008 Join Date
    In your bed :3Location
    2,523Posts

    Re: /ban <player>

    Quote Originally Posted by bulli10 View Post
    make it ban his ip/mac ?
    All this simply does is change a ugrade. OP simply took the /jjang function, copied it, and moved it to do the same thing for /ban, no new functions were really added. If you were to create IP/Mac ID bans, it would take a much greater amount of coding indeed, seeing that these functions have never existed in Gunz prior.

  6. #6
    Valued Member etropulus is offline
    MemberRank
    Jun 2012 Join Date
    118Posts

    Re: /ban <player>

    Quote Originally Posted by bulli10 View Post
    make it ban his ip/mac ?
    this is ban in account.

  7. #7
    Hakuna Matata bulli10 is offline
    MemberRank
    Feb 2011 Join Date
    697Posts

    Re: /ban <player>

    i know is ban account i ask make it ip ban or mac? that could be so useful :)

  8. #8
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: /ban <player>

    Quote Originally Posted by Squiddy View Post
    All this simply does is change a ugrade. OP simply took the /jjang function, copied it, and moved it to do the same thing for /ban, no new functions were really added. If you were to create IP/Mac ID bans, it would take a much greater amount of coding indeed, seeing that these functions have never existed in Gunz prior.
    Hardware ID bans have been used in GunZ before. Just not coded anywhere, it was done manually.

  9. #9
    Member MixBanana is offline
    MemberRank
    Sep 2012 Join Date
    55Posts

    Re: /ban <player>

    Good idea you took the /jjang command and you make a new one with /ban and you changed the grade to 253.
    Good release.

  10. #10
    Die() Secured is offline
    MemberRank
    Sep 2011 Join Date
    /home/SDev/Location
    555Posts

    Re: /ban <player>

    Quote Originally Posted by Squiddy View Post
    All this simply does is change a ugrade. OP simply took the /jjang function, copied it, and moved it to do the same thing for /ban, no new functions were really added. If you were to create IP/Mac ID bans, it would take a much greater amount of coding indeed, seeing that these functions have never existed in Gunz prior.
    Not to much cause getting Mac is extremely simple, you can easily make it update on login with the connecting ip.



Advertisement