Thread: [667] How can I unban someone [667]

Results 1 to 5 of 5
  1. #1 [667] How can I unban someone [667] 
    Registered Member
    Join Date
    Nov 2014
    Posts
    63
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Ok so I've recently used the :ermban command on my test dummy.
    I used the ::unpermban command on the test dummy after that.

    My account says it's been disabled.

    Can anyone tell me how do i unban accounts manually?
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    ...Have you tried ;;unban?
    Project thread
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2014
    Posts
    63
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by clem585 View Post
    ...Have you tried ;;unban?
    Yes, the account still remains disabled.

    Is there a way where I can locate where the banned accounts go to and just remove it?

    This is the source I'm using - https://www.moparscape.org/smf/index.php?topic=663550.0
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Jan 2014
    Posts
    1,617
    Thanks given
    8
    Thanks received
    196
    Rep Power
    39
    Quote Originally Posted by MrVoter View Post
    Yes, the account still remains disabled.

    Is there a way where I can locate where the banned accounts go to and just remove it?

    This is the source I'm using - https://www.moparscape.org/smf/index.php?topic=663550.0
    Code:
    	if (cmd[0].equalsIgnoreCase("unban")) {
    			String name = "";
    			for (int i = 1; i < cmd.length; i++)
    				name = (new StringBuilder(String.valueOf(name))).append(cmd[i])
    						.append(i == cmd.length - 1 ? "" : " ").toString();
    
    			Player target = World.getPlayerByDisplayName(name);
    			boolean loggedIn = true;
    			if (target == null) {
    				target = SerializableFilesManager.loadPlayer(Misc
    						.formatPlayerNameForProtocol(name));
    				loggedIn = false;
    			}
    			if (target != null) {
    target.setPermBanned(false);
    				target.permBanned = false;
    				System.currentTimeMillis();
    				if (loggedIn)
    					target.getSession().getChannel().close();
    				else
    					
    					SerializableFilesManager.savePlayer(target);
    				player.getPackets().sendGameMessage(
    						(new StringBuilder("You've unbanned "))
    								.append(loggedIn ? target.getDisplayName()
    										: name).append(".").toString());
    				System.out.println("" +Misc.formatPlayerNameForDisplay(name)+" has been unbanned by "+Misc.formatPlayerNameForDisplay(player.getUsername())+"");
    			} else {
    				player.getPackets().sendGameMessage(
    						(new StringBuilder("Couldn't find player "))
    								.append(name).append(".").toString());
    			}
    			return true;
    		}
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2014
    Posts
    63
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Enth_ View Post
    Code:
    	if (cmd[0].equalsIgnoreCase("unban")) {
    			String name = "";
    			for (int i = 1; i < cmd.length; i++)
    				name = (new StringBuilder(String.valueOf(name))).append(cmd[i])
    						.append(i == cmd.length - 1 ? "" : " ").toString();
    
    			Player target = World.getPlayerByDisplayName(name);
    			boolean loggedIn = true;
    			if (target == null) {
    				target = SerializableFilesManager.loadPlayer(Misc
    						.formatPlayerNameForProtocol(name));
    				loggedIn = false;
    			}
    			if (target != null) {
    target.setPermBanned(false);
    				target.permBanned = false;
    				System.currentTimeMillis();
    				if (loggedIn)
    					target.getSession().getChannel().close();
    				else
    					
    					SerializableFilesManager.savePlayer(target);
    				player.getPackets().sendGameMessage(
    						(new StringBuilder("You've unbanned "))
    								.append(loggedIn ? target.getDisplayName()
    										: name).append(".").toString());
    				System.out.println("" +Misc.formatPlayerNameForDisplay(name)+" has been unbanned by "+Misc.formatPlayerNameForDisplay(player.getUsername())+"");
    			} else {
    				player.getPackets().sendGameMessage(
    						(new StringBuilder("Couldn't find player "))
    								.append(name).append(".").toString());
    			}
    			return true;
    		}
    I get this error -

    Code:
    src\com\rs\game\player\content\Commands.java:4649: error: permBanned has private
     access in Player
                                    target.permBanned = false;
                                          ^
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [667] How can I rename items? [667]
    By MrVoter in forum Help
    Replies: 3
    Last Post: 12-08-2014, 05:00 AM
  2. [667] How can i add a rotten potatoe?
    By the aa pker in forum Help
    Replies: 1
    Last Post: 08-25-2014, 09:38 PM
  3. Replies: 2
    Last Post: 07-21-2014, 01:32 PM
  4. How do i unban someone [matrix 667]
    By T3rminator in forum Help
    Replies: 1
    Last Post: 03-03-2012, 01:53 PM
  5. How do i unban someone [matrix 667]
    By T3rminator in forum Help
    Replies: 2
    Last Post: 02-25-2012, 07:51 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •