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!

Account ban & Not Ip

Custom Title Activated
Loyal Member
Joined
Apr 29, 2008
Messages
1,297
Reaction score
509
Hmm, i got this idea from Roamer from this thread http://forum.ragezone.com/showthread.php?p=3757381

So i just made this out of boredom

Add this to your MapleCharacter.java
Code:
        public void Ban(String reason) {
		if (lastmonthfameids == null) {
			throw new RuntimeException("Trying to ban a non-loaded character (testhack)");
		}
		try {
			Connection con = DatabaseConnection.getConnection();
			PreparedStatement ps = con.prepareStatement("UPDATE accounts SET banned = ?, banreason = ? WHERE id = ?");
			ps.setInt(1, 1);
			ps.setString(2, reason);
			ps.setInt(3, accountid);
			ps.executeUpdate();
			ps.close();
		} catch (SQLException ex) {
			log.error("Error while banning", ex);
		}
		client.getSession().close();
	}

And this to your CommandProcessor.java
Btw, you can either change !ban to this one
or just change this to something else like !banacc
Code:
			} else if (splitted[0].equals("!ban")) {
				if (splitted.length < 3) {
					new ServernoticeMapleClientMessageCallback(2, c).dropMessage("Syntaxhelper : Syntax: !ban charname reason");
					return true;
				}
				String originalReason = StringUtil.joinStringFrom(splitted, 2);
				String reason = c.getPlayer().getName() + " banned " + splitted[1] + ": " +
				originalReason;
				MapleCharacter target = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                                if (target != null) {
					String readableTargetName = MapleCharacterUtil.makeMapleReadable(target.getName());
					target.Ban(reason);
					mc.dropMessage("Banned " + readableTargetName + " reason: " + originalReason);
				} else {
					if (MapleCharacter.ban(splitted[1], reason, false)) {
						mc.dropMessage("Offline Banned " + splitted[1]);
					} else {
						mc.dropMessage("Failed to ban " + splitted[1]);
					}
                                }

Btw, didnt test this.
If it doesnt work tell me please.
Ty
 
Newbie Spellweaver
Joined
Jul 1, 2008
Messages
69
Reaction score
0
Re: [Release]Account ban & Not Ip

1ST POST :)

Nice Release Going to test it I have been waiting for a release like this because some fagg in my server keeps changing her ip and Hacking more and more and more which is really pissing me off :(

Edit:Wait a sec if you ban account not ip dosent it mean they can make more accounts?
 
Legendary Battlemage
Loyal Member
Joined
Dec 7, 2007
Messages
622
Reaction score
11
Re: [Release]Account ban & Not Ip

Nice Release Thx Ima Wait Till Someone tests lolz but anyway looks good hope it works
 
Newbie Spellweaver
Joined
Jul 14, 2008
Messages
26
Reaction score
0
Re: [Release]Account ban & Not Ip

lol nice and thnxs
 
Experienced Elementalist
Joined
Jul 18, 2008
Messages
232
Reaction score
0
Re: [Release]Account ban & Not Ip

So does this give a pop-up when they try to get in their account?
 
Custom Title Activated
Loyal Member
Joined
Apr 29, 2008
Messages
1,297
Reaction score
509
Re: [Release]Account ban & Not Ip

Every ban gives a popup when they get into their account o0
This just wont ip ban them
 
Custom Title Activated
Loyal Member
Joined
Apr 29, 2008
Messages
1,297
Reaction score
509
Re: [Release]Account ban & Not Ip

No prob, thanks for giving me something to do XD
Lol
 
Newbie Spellweaver
Joined
Aug 11, 2008
Messages
94
Reaction score
1
Re: [Release]Account ban & Not Ip

Why would you want to ban the Account only?
That means that they can make more accounts and hack even more. -.-
 
Newbie Spellweaver
Joined
Aug 8, 2008
Messages
50
Reaction score
0
Re: [Release]Account ban & Not Ip

Nice release, I hope hackers learn something of this ''Account Warning''.
 
Newbie Spellweaver
Joined
May 24, 2008
Messages
8
Reaction score
0
Re: [Release]Account ban & Not Ip

isn't it still a MAC ban though???????
 
Junior Spellweaver
Joined
Jul 20, 2008
Messages
100
Reaction score
0
Re: [Release]Account ban & Not Ip

Thanks man very useful
 
Newbie Spellweaver
Joined
Jul 25, 2008
Messages
29
Reaction score
0
Re: [Release]Account ban & Not Ip

Thanks for showing how its done mate.
 
Back
Top