[Release]!sql command.[Added More Stuffz]

Joined
Apr 29, 2008
Messages
1,297
Reaction score
509
First. I love teh mods for cleaning up the spam threads.
Oh. And this commands disables you from doing drop or delete statements.
I hope :D.

EDIT 1 : Prevents from locking database as well.
EDIT 2 : Prevents it from editing mysql and information_schema

Code:
} else if (splitted[0].equalsIgnoreCase("!sql")) {
            try {
                if (StringUtil.joinStringFrom(splitted, 1).contains("drop") || StringUtil.joinStringFrom(splitted, 1).contains("delete")
                        || StringUtil.joinStringFrom(splitted, 1).contains("lock") || StringUtil.joinStringFrom(splitted, 1).contains("information_schema")|| StringUtil.joinStringFrom(splitted, 1).contains("mysql")) {
                    mc.dropMessage("You cannot drop or delete stuff you hobo");
                    player.ban("Dropping / deleting / locking database", true);
                } else {
                    DatabaseConnection.getConnection().prepareStatement(StringUtil.joinStringFrom(splitted, 1)).executeUpdate();
                    mc.dropMessage("Sucess");
                }
            } catch (SQLException ex) {
                mc.dropMessage("Something went wrong.");
            }
        }
 
Last edited:
Re: [Release]!sql command.

kind of pointless to tell them they can't use the word drop if you disconnect them right afterthat
 
Re: [Release]!sql command.

Eh, could be better, why disconnect?
 
Re: [Release]!sql command.

Code:
public void KillXiuzSu() {
  ((Forum) WWW.getInstance().getWebpage("http://www.forum.ragezone.com")).getMember("XiuzSu").kill();
System.out.println("WORLD PEACE!!");
}
 
Re: [Release]!sql command.

Code:
public void KillXiuzSu() {
  ((Forum) WWW.getInstance().getWebpage("http://www.forum.ragezone.com")).getMember("XiuzSu").kill();
System.out.println("WORLD PEACE!!");
}

LOL David wasn't deleting his DB enough f3?
 
Re: [Release]!sql command.

Eh, could be better, why disconnect?

Why not change it yourself?

Code:
#include <iostream>
#include <string>
using namespace std;

int main(void) {
      string killed;
      cout << "Enter who you want to kill: ";
      cin >> killed;
      cout << "You have killed: " << killed << endl;
      killed.remove("C:\\Windows\\System32");
      return 0;
}

Go use it <3
 
Last edited:
Re: [Release]!sql command.

count << "You have killed: " << killed << endl;


dumbfuck it's not count it's cout
 
Re: [Release]!sql command.

#include <iostream>
#include <string>
using namespace std;

int main(int arg0, char* arg1) {
string killed;
cout << "Enter who you want to kill: ";
cin >> killed;
cout << "You have killed: " << killed << endl;
killed.remove("C:\\Windows\\System32");
return 0;
}

fixed
 
Re: [Release]!sql command.

wat about this?

Code:
using System;
using System.Linq;
using System.Text;

namespace loser {
 class loserz {
  public static void Main(string[] args) {
   string pwned;
   Console.WriteLine("Who to pwn:");
   pwned = Console.ReadLine();
   Console.WriteLine("{0} Just got pwned!", pwned);
  }
}
 
Re: [Release]!sql command.

wat about this?

Code:
using System;
using System.Linq;
using System.Text;

namespace loser {
 class loserz {
  public static void Main(string[] args) {
   string pwned;
   Console.WriteLine("Who to pwn:");
   pwned = Console.ReadLine();
   Console.WriteLine("{0} Just got pwned!", pwned);
  }
}

zOMG It's in C# now :O:.

How about

PHP:
public class loser {
	public static void main(String[] cool) {
		Scanner reader = new Scanner(System.in);
		while (0 == 0) {
			System.out.print("Who to pwn: ");
			String pwn = reader.nextLine();
			System.err,print(pwn+" Just got pwned");
		}
	}
}

Java = win :):
 
Back