package heufybot.modules;

import java.util.List;

public class Quit extends Module
{
	public Quit()
	{
		this.authType = Module.AuthType.OPs;
		this.triggerTypes = new TriggerType[] { TriggerType.Message };
		this.trigger = "^" + commandPrefix + "(quit)$";
	}
	
	@Override
	public void processEvent(String source, String message, String triggerUser, List<String> params) 
	{
		bot.stop("Quit command issued by " + triggerUser);
	}

	public String getHelp(String message)
	{
		return "Commands: " + commandPrefix + "quit | Makes the bot quit the server.";
	}

	@Override
	public void onLoad() 
	{
	}

	@Override
	public void onUnload()
	{
	}
}
@@ -20,16 +20,52 @@
 dules;%0A%0A
+import heufybot.utils.StringUtils;%0A%0A
 import j
@@ -287,9 +287,15 @@
 uit)
-$
+($%7C .*)
 %22;%0A%09
@@ -411,16 +411,46 @@
 ms) %0A%09%7B%0A
+%09%09if(params.size() == 1)%0A%09%09%7B%0A%09
 %09%09bot.st
@@ -494,16 +494,100 @@
 rUser);%0A
+%09%09%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09params.remove(0);%0A%09%09%09bot.stop(StringUtils.join(params, %22 %22));%0A%09%09%7D%0A
 %09%7D%0A%0A%09pub
@@ -669,16 +669,28 @@
  + %22quit
+ (%3Cmessage%3E)
  %7C Makes

Add an optional parameter to Quit (fixes #21)