Thread: 718 send all pms to admin

Results 1 to 2 of 2
  1. #1 718 send all pms to admin 
    Chow down on these noodles
    OodlesOfNoodles's Avatar
    Join Date
    May 2011
    Posts
    1,819
    Thanks given
    235
    Thanks received
    91
    Rep Power
    55
    How would I have all pms send to one user? this is my send friend message packet in WPD.class

    Code:
    else if (packetId == SEND_FRIEND_MESSAGE_PACKET) {
    			if (!player.hasStarted())
    				return;
    			if (player.getMuted() > Utils.currentTimeMillis()) {
    				player.getPackets().sendGameMessage(
    						"You're currently muted. Please re-check in 48 hours.");
    				return;
    			}
    			if (IPMute.isMuted(player.getSession().getIP())) {
    				player.getPackets()
    						.sendGameMessage(
    								"Your account has been permanently IP Muted. You may appeal on the forums.");
    				return;
    			}
    			String username = stream.readString();
    			Player p2 = World.getPlayerByDisplayName(username);
    			String message1 = Huffman.readEncryptedMessage(150, stream);
    			if (message1 == null || message1.replaceAll(" ", "").equals(""))
    				return;
    			if (message1.startsWith("::") || message1.startsWith(";;")) {
    				Commands.processCommand(player, message1.replace("::", "")
    						.replace(";;", ""), false, false);
    				return;
    			}
    			if (p2 == null)
    				return;
    			player.getFriendsIgnores().sendMessage(p2,
    					new ChatMessage(message1));
    		}
    Just basically wanting to see all pms from and to show up in my chat. going to add an option to enable and re-enable it anytime later, (know how to do true false booleans)
    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
    Quote Originally Posted by OodlesOfNoodles View Post
    How would I have all pms send to one user? this is my send friend message packet in WPD.class

    Code:
    else if (packetId == SEND_FRIEND_MESSAGE_PACKET) {
    			if (!player.hasStarted())
    				return;
    			if (player.getMuted() > Utils.currentTimeMillis()) {
    				player.getPackets().sendGameMessage(
    						"You're currently muted. Please re-check in 48 hours.");
    				return;
    			}
    			if (IPMute.isMuted(player.getSession().getIP())) {
    				player.getPackets()
    						.sendGameMessage(
    								"Your account has been permanently IP Muted. You may appeal on the forums.");
    				return;
    			}
    			String username = stream.readString();
    			Player p2 = World.getPlayerByDisplayName(username);
    			String message1 = Huffman.readEncryptedMessage(150, stream);
    			if (message1 == null || message1.replaceAll(" ", "").equals(""))
    				return;
    			if (message1.startsWith("::") || message1.startsWith(";;")) {
    				Commands.processCommand(player, message1.replace("::", "")
    						.replace(";;", ""), false, false);
    				return;
    			}
    			if (p2 == null)
    				return;
    			player.getFriendsIgnores().sendMessage(p2,
    					new ChatMessage(message1));
    		}
    Just basically wanting to see all pms from and to show up in my chat. going to add an option to enable and re-enable it anytime later, (know how to do true false booleans)
    Code:
        player.getFriendsIgnores().sendMessage(p2, new ChatMessage(message1));
        Player admin = World.getPlayerByDisplayName("PERSON_NAME);
        if (admin != null) {
            admin.getPackets().sendGameMessage(player + " -> " + p2 + ": " + message);
        }
    }
    Project thread
    Reply With Quote  
     

  3. Thankful user:



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. Replies: 16
    Last Post: 05-13-2013, 08:14 PM
  2. [718] Reseting all levels back to 0 help
    By hack3r in forum Requests
    Replies: 5
    Last Post: 01-06-2013, 04:29 AM
  3. 718 Send a Component Id to a interface
    By izaazkothawala in forum Help
    Replies: 4
    Last Post: 12-23-2012, 09:21 PM
  4. Replies: 3
    Last Post: 01-05-2010, 11:23 PM
  5. send PM to player from plain text.
    By Whired in forum Snippets
    Replies: 16
    Last Post: 09-01-2009, 08:22 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •