[Issue] Banning menu

User Tag List

Results 1 to 13 of 13
  1. #1
    ~ViVo~'s Avatar Banned
    Reputation
    52
    Join Date
    Feb 2008
    Posts
    560
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Issue] Banning

    My .ban command doesn't work.
    putting a 1 in the Ban spot doesn't work.
    What can I do?

    [Issue] Banning
  2. #2
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which ban command?

  3. #3
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's my permaban command:

    Code:
    bool ChatHandler::HandleBanCharacterCommand(const char* args, WorldSession *m_session)
    {
    	if(!*args)
    		return false;
    
    	char * pCharacter = (char*)args;
    	char * pBanReason = strchr(pCharacter, ' ');
    
    	Player * pPlayer = objmgr.GetPlayer(pCharacter, false);
    	if(pPlayer == NULL)
    	{
    		string sCharacter = string(pCharacter);
    		pInfo = objmgr.GetPlayerInfoByName(sCharacter);
    		if(pInfo == NULL)
    		{
    			SystemMessage(m_session, "Player not found.");
    			return true;
    		}
    
    		SystemMessage(m_session, "Banning player '%s' in database for '%s'.", pCharacter, pReason);
    		string escaped_reason = CharacterDatabase.EscapeString(string(pReason));
    		
    		CharacterDatabase.Execute("UPDATE characters SET banned = 1, banReason = '%s' WHERE guid = %u", escaped_reason.c_str(), pInfo->guid);
    	}
    	else
    	{
    		SystemMessage(m_session, "Banning player '%s' ingame for '%s'.", pCharacter, pReason);
    		string sReason = string(pReason);
    		uint32 uBanTime = 1;
    		pPlayer->SetBanned(uBanTime, sReason);
    		pInfo = pPlayer->m_playerInfo;
    	}
    
    	if(pPlayer)
    	{
    		SystemMessage(m_session, "Kicking %s.", pPlayer->GetName());
    		pPlayer->Kick();
    	}
    
    	sGMLog.writefromsession(m_session, "used ban character on %s reason %s", pCharacter, pReason);
    	return true;
    }

  4. #4
    1ns0mnia's Avatar Active Member
    Reputation
    67
    Join Date
    Nov 2007
    Posts
    428
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    stupid question but are u doing .ban <char anme> reason?

    most servers are .banchar <char name> <time e.g. 31d0h> <reason>

  5. #5
    ~ViVo~'s Avatar Banned
    Reputation
    52
    Join Date
    Feb 2008
    Posts
    560
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spidey, Is that DLL?
    Can it be done VIA lua?

  6. #6
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No it can't be done by lua, delete the code in the level.cpp where its located at, then find the ban command, delete it, and paste ultra spideys code, then just compile

  7. #7
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, that's just a replacement for the current function, not a DLL.
    And it can't be done via LUA :P

    Tell me if it works for you, I didn't test it :P

  8. #8
    ~ViVo~'s Avatar Banned
    Reputation
    52
    Join Date
    Feb 2008
    Posts
    560
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not going to compile it today.. trying to See whats dropping my server.

  9. #9
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I say it's those damn Murlocs.

  10. #10
    1ns0mnia's Avatar Active Member
    Reputation
    67
    Join Date
    Nov 2007
    Posts
    428
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ultra Spidey View Post
    I say it's those damn Murlocs.
    i agree

    kill them all i say ^^

  11. #11
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DELETE FROM creature_names WHERE name LIKE "%murloc%"

  12. #12
    ~ViVo~'s Avatar Banned
    Reputation
    52
    Join Date
    Feb 2008
    Posts
    560
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol wtf?
    hey, can you just give me your .dll and ill replace mine with it?

  13. #13
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not a dll, it's a core change :P

Similar Threads

  1. Banned Issue
    By 5o4KING in forum Neverwinter
    Replies: 6
    Last Post: 06-12-2013, 09:05 PM
  2. Accont ban issue
    By yashiro in forum World of Warcraft General
    Replies: 6
    Last Post: 08-24-2012, 07:35 AM
All times are GMT -5. The time now is 11:36 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search