package modules;


import bot.Config;
import bot.Message;

public class London implements bot.Module {
	
	private boolean on = false;
	@Override
	public void parse(Message m) {
		String target = m.param();
		if(!m.param().startsWith("#")) target = m.sender();
		if(Config.getAdmins().contains(m.sender())){
			if(m.botCommand().equals("londonon")) on = true;
			if(m.botCommand().equals("londonoff")) on = false;
		}
		if(m.botCommand().equals("london") && (on || Config.getAdmins().contains(m.sender()))){
			if(m.botParams().length() > 10){
				m.say(target, "dats 2 long man");
				return;
			}
			char[] chars = m.botParams().toCharArray();
			String first = "";
			for(int i = 0; i < chars.length; i++){
				first += String.valueOf(chars[i]).toUpperCase() + " ";
			}
			first.trim();
			m.say(target, first);
			for(int i = 1; i < chars.length; i++){
				m.say(target, String.valueOf(chars[i]).toUpperCase());
			}
		}
	}

}

@@ -918,14 +918,880 @@
 %09%09%7D%0A%09%09%7D%0A
+%09%09if(m.botCommand().equals(%22sqlondon%22) && (on %7C%7C Config.getAdmins().contains(m.sender())))%7B%0A%09%09%09if(m.botParams().length() %3E 10)%7B%0A%09%09%09%09m.say(target, %22dats 2 long man%22);%0A%09%09%09%09return;%0A%09%09%09%7D%0A%09%09%09char%5B%5D chars = m.botParams().toCharArray();%0A%09%09%09String first = %22%22;%0A%09%09%09for(int i = 0; i %3C chars.length; i++)%7B%0A%09%09%09%09first += String.valueOf(chars%5Bi%5D).toUpperCase() + %22 %22;%0A%09%09%09%7D%0A%09%09%09first.trim();%0A%09%09%09m.say(target, first);%0A%09%09%09for(int i = 1; i %3C chars.length-1; i++)%7B%0A%09%09%09%09String tosay = String.valueOf(chars%5Bi%5D).toUpperCase();%0A%09%09%09%09for(int j = 0; j %3C (chars.length-1)+(chars.length-2); j++)%7B%0A%09%09%09%09%09tosay += %22 %22;%0A%09%09%09%09%7D%0A%09%09%09%09tosay += String.valueOf(chars%5Bchars.length-i-1%5D).toUpperCase();%0A%09%09%09%09m.say(target,tosay);%0A%09%09%09%7D%0A%09%09%09String last = %22%22;%0A%09%09%09for(int i = chars.length-1; i %3E= 0; i--)%7B%0A%09%09%09%09last += String.valueOf(chars%5Bi%5D).toUpperCase() + %22 %22;%0A%09%09%09%7D%0A%09%09%09last.trim();%0A%09%09%09m.say(target, last);%0A%09%09%7D%0A%09%09%0A
 %09%7D%0A%0A%7D%0A

add square londons