package modules;

import bot.Message;
import bot.Module;
import bot.config.Config;

public class Invite implements Module {

	@Override
	public void parse(Message m) {
		if(m.command().equals("INVITE")){
			m.send("JOIN " + m.trailing());
			Config.addRoom(m.trailing());
			m.say(m.trailing(), m.sender() + " has invited me here. To see my commands, use /MSG " + Config.getNick() + " HELP");
		}

	}

}

@@ -117,16 +117,66 @@
 odule %7B%0A
+%09public long timeout = System.currentTimeMillis();
 %0A%09@Overr
@@ -247,16 +247,190 @@
 ITE%22))%7B%0A
+%09%09%09if(timeout + 10000 %3E System.currentTimeMillis())%7B%0A%09%09%09%09m.notice(m.sender(), %22I am currently on invite cooldown%22);%0A%09%09%09%09return;%0A%09%09%09%7D%0A%09%09%09timeout = System.currentTimeMillis();%0A
 %09%09%09m.sen

add an invite timeout