Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [67452a] Maximize Restore History

sorted classes into subpackages for irc and stendhal

Hendrik Brummermann Hendrik Brummermann 2012-11-01

1 2 3 > >> (Page 1 of 3)
added src/net/sf/arianne/postman/event
added src/net/sf/arianne/postman/irc
added src/net/sf/arianne/postman/stendhal
added tests/net/sf/arianne/postman/irc
added tests/net/sf/arianne/postman/scm
changed src
changed src/net
changed src/net/sf
changed src/net/sf/arianne
changed src/net/sf/arianne/postman
changed src/net/sf/arianne/postman/PostmanMain.java
changed src/net/sf/arianne/postman/scm
changed src/net/sf/arianne/postman/scm/CiaHandler.java
changed src/net/sf/arianne/postman/wiki
changed src/net/sf/arianne/postman/wiki/UdpHandler.java
changed tests
changed tests/net
changed tests/net/sf
changed tests/net/sf/arianne
changed tests/net/sf/arianne/postman
copied tests/net/sf/arianne/postman/cia.txt -> tests/net/sf/arianne/postman/scm/cia.txt
copied tests/net/sf/arianne/postman/cia2.txt -> tests/net/sf/arianne/postman/scm/cia2.txt
copied src/net/sf/arianne/postman/AdminNote.java -> src/net/sf/arianne/postman/stendhal/AdminNote.java
copied src/net/sf/arianne/postman/Ban.java -> src/net/sf/arianne/postman/irc/IrcBanAuth.java
copied src/net/sf/arianne/postman/CommandFactory.java -> src/net/sf/arianne/postman/irc/CommandFactory.java
copied src/net/sf/arianne/postman/CounterMap.java -> src/net/sf/arianne/postman/irc/CounterMap.java
copied src/net/sf/arianne/postman/EventHandler.java -> src/net/sf/arianne/postman/irc/EventHandler.java
copied src/net/sf/arianne/postman/EventRaiser.java -> src/net/sf/arianne/postman/event/EventRaiser.java
copied src/net/sf/arianne/postman/EventType.java -> src/net/sf/arianne/postman/event/EventType.java
copied src/net/sf/arianne/postman/FlashThing.java -> src/net/sf/arianne/postman/irc/FlashThing.java
copied src/net/sf/arianne/postman/FloodDetection.java -> src/net/sf/arianne/postman/irc/FloodDetection.java
copied src/net/sf/arianne/postman/IPBan.java -> src/net/sf/arianne/postman/stendhal/IPBan.java
copied src/net/sf/arianne/postman/IrcBan.java -> src/net/sf/arianne/postman/irc/IrcBan.java
copied src/net/sf/arianne/postman/IrcBanAuth.java -> src/net/sf/arianne/postman/stendhal/TellAll.java
copied src/net/sf/arianne/postman/IrcFloodBan.java -> src/net/sf/arianne/postman/irc/IrcFloodBan.java
copied src/net/sf/arianne/postman/IrcFloodKick.java -> src/net/sf/arianne/postman/irc/IrcFloodKick.java
copied src/net/sf/arianne/postman/IrcMessage.java -> src/net/sf/arianne/postman/irc/IrcMessage.java
copied src/net/sf/arianne/postman/NPCShout.java -> src/net/sf/arianne/postman/stendhal/NPCShout.java
copied src/net/sf/arianne/postman/PerceptionErrorListener.java -> src/net/sf/arianne/postman/stendhal/PerceptionErrorListener.java
copied src/net/sf/arianne/postman/Postman.java -> src/net/sf/arianne/postman/stendhal/Postman.java
copied src/net/sf/arianne/postman/PostmanIRC.java -> src/net/sf/arianne/postman/irc/PostmanIRC.java
copied src/net/sf/arianne/postman/Support.java -> src/net/sf/arianne/postman/stendhal/Support.java
copied src/net/sf/arianne/postman/SupportAnswer.java -> src/net/sf/arianne/postman/stendhal/SupportAnswer.java
copied src/net/sf/arianne/postman/TellAll.java -> src/net/sf/arianne/postman/stendhal/Ban.java
copied tests/net/sf/arianne/postman/CiaHandlerTest.java -> tests/net/sf/arianne/postman/scm/CiaHandlerTest.java
copied tests/net/sf/arianne/postman/CiaMessageTest.java -> tests/net/sf/arianne/postman/scm/CiaMessageTest.java
copied tests/net/sf/arianne/postman/PostmanIRCTest.java -> tests/net/sf/arianne/postman/irc/PostmanIRCTest.java
src
Directory.
src/net
Directory.
src/net/sf
Directory.
src/net/sf/arianne
Directory.
src/net/sf/arianne/postman/PostmanMain.java Diff Switch to side-by-side view
Loading...
src/net/sf/arianne/postman/scm/CiaHandler.java Diff Switch to side-by-side view
Loading...
src/net/sf/arianne/postman/wiki/UdpHandler.java Diff Switch to side-by-side view
Loading...
tests
Directory.
tests/net
Directory.
tests/net/sf
Directory.
src/net/sf/arianne/postman/AdminNote.java to src/net/sf/arianne/postman/stendhal/AdminNote.java
--- a/src/net/sf/arianne/postman/AdminNote.java
+++ b/src/net/sf/arianne/postman/stendhal/AdminNote.java
@@ -9,10 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
 
 
 /**
@@ -20,7 +24,7 @@
  *
  * @author hendrik
  */
-class AdminNote extends EventHandler {
+public class AdminNote extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
src/net/sf/arianne/postman/Ban.java to src/net/sf/arianne/postman/irc/IrcBanAuth.java
--- a/src/net/sf/arianne/postman/Ban.java
+++ b/src/net/sf/arianne/postman/irc/IrcBanAuth.java
@@ -9,50 +9,50 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import net.sf.arianne.postman.event.EventType;
 
 /**
- * ban
+ * creates a ban on irc
  *
  * @author hendrik
  */
-class Ban extends EventHandler {
+public class IrcBanAuth extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
-	
-	/** ban target hours message */
-	static final Pattern patternBan = Pattern.compile("(?i)^ban ([^ ]*) ([^ ]*) (.*)$");
+
+	/** ircban ip */
+	static final Pattern patternIrcBan = Pattern.compile("(?i)^ircban (.*)$");
 
 	/**
-	 * creates a ban handler
+	 * creates a IrcBan instance
 	 *
-	 * @param command    supportanswer-command
+	 * @param command ip address to ban
 	 * @param sender     sender
 	 * @param postmanIRC PostmanIRC
 	 */
-	public Ban(String command, String sender, PostmanIRC postmanIRC) {
+	public IrcBanAuth(String command, String sender, PostmanIRC postmanIRC) {
 		this.command = command;
 		this.sender = sender;
 		this.postmanIRC = postmanIRC;
 	}
 
 	@Override
-	public void fire(EventType eventType, String eventDetail, String ircAccountName) {
+	public void fire(EventType eventType, String channel, String ircAccountName) {
 		String charname = extractGameAccount(postmanIRC, sender, ircAccountName);
 		if (charname == null) {
 			return;
 		}
-		Matcher matcher = patternBan.matcher(command);
+		Matcher matcher = patternIrcBan.matcher(command);
 		if (matcher.find()) {
-			String target = matcher.group(1);
-			String hours = matcher.group(2);
-			String message = matcher.group(3);
-			Postman.get().ban(charname, target, hours, message);
+			String ip = matcher.group(1);
+			postmanIRC.sendSupportMessage(charname + " banned " + ip + " on irc.");
+			postmanIRC.banIp(ip);
 		}
 	}
 
src/net/sf/arianne/postman/CommandFactory.java to src/net/sf/arianne/postman/irc/CommandFactory.java
--- a/src/net/sf/arianne/postman/CommandFactory.java
+++ b/src/net/sf/arianne/postman/irc/CommandFactory.java
@@ -9,9 +9,16 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 import java.util.Locale;
+
+import net.sf.arianne.postman.stendhal.AdminNote;
+import net.sf.arianne.postman.stendhal.Ban;
+import net.sf.arianne.postman.stendhal.NPCShout;
+import net.sf.arianne.postman.stendhal.Support;
+import net.sf.arianne.postman.stendhal.SupportAnswer;
+import net.sf.arianne.postman.stendhal.TellAll;
 
 /**
  * creates a command handler based on a private message to postman
src/net/sf/arianne/postman/CounterMap.java to src/net/sf/arianne/postman/irc/CounterMap.java
--- a/src/net/sf/arianne/postman/CounterMap.java
+++ b/src/net/sf/arianne/postman/irc/CounterMap.java
@@ -10,7 +10,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 import java.util.HashMap;
 import java.util.Map;
src/net/sf/arianne/postman/EventHandler.java to src/net/sf/arianne/postman/irc/EventHandler.java
--- a/src/net/sf/arianne/postman/EventHandler.java
+++ b/src/net/sf/arianne/postman/irc/EventHandler.java
@@ -9,14 +9,16 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
+
+import net.sf.arianne.postman.event.EventType;
 
 /**
  * event handling
  *
  * @author hendrik
  */
-abstract class EventHandler {
+public abstract class EventHandler {
 
 	/**
 	 * handles an event
src/net/sf/arianne/postman/EventRaiser.java to src/net/sf/arianne/postman/event/EventRaiser.java
--- a/src/net/sf/arianne/postman/EventRaiser.java
+++ b/src/net/sf/arianne/postman/event/EventRaiser.java
@@ -9,12 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.event;
 
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+
+import net.sf.arianne.postman.irc.EventHandler;
 
 import marauroa.common.Pair;
 
@@ -23,7 +25,7 @@
  *
  * @author hendrik
  */
-class EventRaiser {
+public class EventRaiser {
 	private static EventRaiser instance;
 
 	private Map<Pair<EventType, String>, List<EventHandler>> waitingEventHandlers = new HashMap<Pair<EventType, String>, List<EventHandler>>();
src/net/sf/arianne/postman/EventType.java to src/net/sf/arianne/postman/event/EventType.java
--- a/src/net/sf/arianne/postman/EventType.java
+++ b/src/net/sf/arianne/postman/event/EventType.java
@@ -9,14 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.event;
 
 /**
  * event used by postman to handle asynchronous operations
  *
  * @author hendrik
  */
-enum EventType {
+public enum EventType {
 
 	/** irc identification */
 	IRC_WHOIS,
src/net/sf/arianne/postman/FlashThing.java to src/net/sf/arianne/postman/irc/FlashThing.java
--- a/src/net/sf/arianne/postman/FlashThing.java
+++ b/src/net/sf/arianne/postman/irc/FlashThing.java
@@ -9,7 +9,9 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
+
+import net.sf.arianne.postman.event.EventType;
 
 
 
src/net/sf/arianne/postman/FloodDetection.java to src/net/sf/arianne/postman/irc/FloodDetection.java
--- a/src/net/sf/arianne/postman/FloodDetection.java
+++ b/src/net/sf/arianne/postman/irc/FloodDetection.java
@@ -9,7 +9,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 import java.util.Iterator;
 import java.util.LinkedList;
src/net/sf/arianne/postman/IPBan.java to src/net/sf/arianne/postman/stendhal/IPBan.java
--- a/src/net/sf/arianne/postman/IPBan.java
+++ b/src/net/sf/arianne/postman/stendhal/IPBan.java
@@ -9,10 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
 
 
 /**
@@ -20,7 +24,7 @@
  *
  * @author hendrik
  */
-class IPBan extends EventHandler {
+public class IPBan extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
src/net/sf/arianne/postman/IrcBan.java to src/net/sf/arianne/postman/irc/IrcBan.java
--- a/src/net/sf/arianne/postman/IrcBan.java
+++ b/src/net/sf/arianne/postman/irc/IrcBan.java
@@ -9,7 +9,9 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
+
+import net.sf.arianne.postman.event.EventType;
 
 /**
  * creates a ban on irc
src/net/sf/arianne/postman/IrcBanAuth.java to src/net/sf/arianne/postman/stendhal/TellAll.java
--- a/src/net/sf/arianne/postman/IrcBanAuth.java
+++ b/src/net/sf/arianne/postman/stendhal/TellAll.java
@@ -9,48 +9,52 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
+
+
 /**
- * creates a ban on irc
+ * Tell all
  *
  * @author hendrik
  */
-public class IrcBanAuth extends EventHandler {
+public class TellAll extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
-
-	/** ircban ip */
-	static final Pattern patternIrcBan = Pattern.compile("(?i)^ircban (.*)$");
+	
+	/** tellall message */
+	static final Pattern patternTellall = Pattern.compile("(?i)^tellall (.*)$");
 
 	/**
-	 * creates a IrcBan instance
+	 * creates a tell all
 	 *
-	 * @param command ip address to ban
+	 * @param command    command
 	 * @param sender     sender
 	 * @param postmanIRC PostmanIRC
 	 */
-	public IrcBanAuth(String command, String sender, PostmanIRC postmanIRC) {
+	public TellAll(String command, String sender, PostmanIRC postmanIRC) {
 		this.command = command;
 		this.sender = sender;
 		this.postmanIRC = postmanIRC;
 	}
 
 	@Override
-	public void fire(EventType eventType, String channel, String ircAccountName) {
+	public void fire(EventType eventType, String eventDetail, String ircAccountName) {
 		String charname = extractGameAccount(postmanIRC, sender, ircAccountName);
 		if (charname == null) {
 			return;
 		}
-		Matcher matcher = patternIrcBan.matcher(command);
+		Matcher matcher = patternTellall.matcher(command);
 		if (matcher.find()) {
-			String ip = matcher.group(1);
-			postmanIRC.sendSupportMessage(charname + " banned " + ip + " on irc.");
-			postmanIRC.banIp(ip);
+			String message = matcher.group(1);
+			Postman.get().tellAll(charname, message);
 		}
 	}
 
src/net/sf/arianne/postman/IrcFloodBan.java to src/net/sf/arianne/postman/irc/IrcFloodBan.java
--- a/src/net/sf/arianne/postman/IrcFloodBan.java
+++ b/src/net/sf/arianne/postman/irc/IrcFloodBan.java
@@ -9,7 +9,9 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
+
+import net.sf.arianne.postman.event.EventType;
 
 /**
  * creates a ban on irc for flooding
src/net/sf/arianne/postman/IrcFloodKick.java to src/net/sf/arianne/postman/irc/IrcFloodKick.java
--- a/src/net/sf/arianne/postman/IrcFloodKick.java
+++ b/src/net/sf/arianne/postman/irc/IrcFloodKick.java
@@ -9,7 +9,9 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
+
+import net.sf.arianne.postman.event.EventType;
 
 /**
  * kicks someone on irc for flooding
src/net/sf/arianne/postman/IrcMessage.java to src/net/sf/arianne/postman/irc/IrcMessage.java
--- a/src/net/sf/arianne/postman/IrcMessage.java
+++ b/src/net/sf/arianne/postman/irc/IrcMessage.java
@@ -9,7 +9,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 /**
  * an IRC message with sender and timestamp
src/net/sf/arianne/postman/NPCShout.java to src/net/sf/arianne/postman/stendhal/NPCShout.java
--- a/src/net/sf/arianne/postman/NPCShout.java
+++ b/src/net/sf/arianne/postman/stendhal/NPCShout.java
@@ -9,10 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
 
 
 /**
@@ -20,7 +24,7 @@
  *
  * @author hendrik
  */
-class NPCShout extends EventHandler {
+public class NPCShout extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
src/net/sf/arianne/postman/PerceptionErrorListener.java to src/net/sf/arianne/postman/stendhal/PerceptionErrorListener.java
--- a/src/net/sf/arianne/postman/PerceptionErrorListener.java
+++ b/src/net/sf/arianne/postman/stendhal/PerceptionErrorListener.java
@@ -10,7 +10,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import marauroa.client.net.IPerceptionListener;
 import marauroa.common.game.RPObject;
src/net/sf/arianne/postman/Postman.java to src/net/sf/arianne/postman/stendhal/Postman.java
--- a/src/net/sf/arianne/postman/Postman.java
+++ b/src/net/sf/arianne/postman/stendhal/Postman.java
@@ -9,7 +9,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.Date;
 import java.util.StringTokenizer;
@@ -17,6 +17,7 @@
 import marauroa.client.ClientFramework;
 import marauroa.common.game.RPAction;
 import marauroa.common.game.RPObject;
+import net.sf.arianne.postman.irc.PostmanIRC;
 
 import org.apache.log4j.Logger;
 
@@ -257,7 +258,7 @@
 	/**
 	 * teleports postman to his favorite spot
 	 */
-	void teleportPostman() {
+	public void teleportPostman() {
 		final RPAction teleport = new RPAction();
 		teleport.put("type", "teleport");
 		teleport.put("target", "postman");
src/net/sf/arianne/postman/PostmanIRC.java to src/net/sf/arianne/postman/irc/PostmanIRC.java
--- a/src/net/sf/arianne/postman/PostmanIRC.java
+++ b/src/net/sf/arianne/postman/irc/PostmanIRC.java
@@ -10,7 +10,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -21,6 +21,9 @@
 import java.util.TreeSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import net.sf.arianne.postman.event.EventRaiser;
+import net.sf.arianne.postman.event.EventType;
 
 import org.apache.log4j.Logger;
 import org.jibble.pircbot.IrcException;
@@ -158,7 +161,7 @@
 	 *
 	 * @param text text to send
 	 */
-	void sendSupportMessage(final String text) {
+	public void sendSupportMessage(final String text) {
 		sendMultilineMessage(supportChannel, text.replaceAll("Please use #/supportanswer .*", "").trim());
 	}
 
@@ -180,7 +183,7 @@
 	 *
 	 * @param text message to send
 	 */
-	void sendMessageToAllStendhalChannels(final String text) {
+	public void sendMessageToAllStendhalChannels(final String text) {
 		for (final String channelName : stendhalChannels) {
 			sendMultilineMessage(channelName, text);
 		}
@@ -191,7 +194,7 @@
 	 *
 	 * @param text message to send
 	 */
-	void sendMessageToSignChannels(String text) {
+	public void sendMessageToSignChannels(String text) {
 		for (final String channelName : signChannels) {
 			sendMultilineMessage(channelName, text);
 		}
src/net/sf/arianne/postman/Support.java to src/net/sf/arianne/postman/stendhal/Support.java
--- a/src/net/sf/arianne/postman/Support.java
+++ b/src/net/sf/arianne/postman/stendhal/Support.java
@@ -9,10 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
 
 
 /**
@@ -20,7 +24,7 @@
  *
  * @author hendrik
  */
-class Support extends EventHandler {
+public class Support extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
src/net/sf/arianne/postman/SupportAnswer.java to src/net/sf/arianne/postman/stendhal/SupportAnswer.java
--- a/src/net/sf/arianne/postman/SupportAnswer.java
+++ b/src/net/sf/arianne/postman/stendhal/SupportAnswer.java
@@ -9,10 +9,14 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
 
 
 /**
@@ -20,7 +24,7 @@
  *
  * @author hendrik
  */
-class SupportAnswer extends EventHandler {
+public class SupportAnswer extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
src/net/sf/arianne/postman/TellAll.java to src/net/sf/arianne/postman/stendhal/Ban.java
--- a/src/net/sf/arianne/postman/TellAll.java
+++ b/src/net/sf/arianne/postman/stendhal/Ban.java
@@ -9,33 +9,37 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.stendhal;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import net.sf.arianne.postman.event.EventType;
+import net.sf.arianne.postman.irc.EventHandler;
+import net.sf.arianne.postman.irc.PostmanIRC;
+
 
 /**
- * Tell all
+ * ban
  *
  * @author hendrik
  */
-class TellAll extends EventHandler {
+public class Ban extends EventHandler {
 	private String command;
 	private String sender;
 	private PostmanIRC postmanIRC;
 	
-	/** tellall message */
-	static final Pattern patternTellall = Pattern.compile("(?i)^tellall (.*)$");
+	/** ban target hours message */
+	static final Pattern patternBan = Pattern.compile("(?i)^ban ([^ ]*) ([^ ]*) (.*)$");
 
 	/**
-	 * creates a tell all
+	 * creates a ban handler
 	 *
-	 * @param command    command
+	 * @param command    supportanswer-command
 	 * @param sender     sender
 	 * @param postmanIRC PostmanIRC
 	 */
-	public TellAll(String command, String sender, PostmanIRC postmanIRC) {
+	public Ban(String command, String sender, PostmanIRC postmanIRC) {
 		this.command = command;
 		this.sender = sender;
 		this.postmanIRC = postmanIRC;
@@ -47,10 +51,12 @@
 		if (charname == null) {
 			return;
 		}
-		Matcher matcher = patternTellall.matcher(command);
+		Matcher matcher = patternBan.matcher(command);
 		if (matcher.find()) {
-			String message = matcher.group(1);
-			Postman.get().tellAll(charname, message);
+			String target = matcher.group(1);
+			String hours = matcher.group(2);
+			String message = matcher.group(3);
+			Postman.get().ban(charname, target, hours, message);
 		}
 	}
 
tests/net/sf/arianne/postman/CiaHandlerTest.java to tests/net/sf/arianne/postman/scm/CiaHandlerTest.java
--- a/tests/net/sf/arianne/postman/CiaHandlerTest.java
+++ b/tests/net/sf/arianne/postman/scm/CiaHandlerTest.java
@@ -1,4 +1,4 @@
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.scm;
 
 import static org.hamcrest.Matchers.equalTo;
 import static org.junit.Assert.assertThat;
tests/net/sf/arianne/postman/CiaMessageTest.java to tests/net/sf/arianne/postman/scm/CiaMessageTest.java
--- a/tests/net/sf/arianne/postman/CiaMessageTest.java
+++ b/tests/net/sf/arianne/postman/scm/CiaMessageTest.java
@@ -1,4 +1,4 @@
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.scm;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertEquals;
tests/net/sf/arianne/postman/PostmanIRCTest.java to tests/net/sf/arianne/postman/irc/PostmanIRCTest.java
--- a/tests/net/sf/arianne/postman/PostmanIRCTest.java
+++ b/tests/net/sf/arianne/postman/irc/PostmanIRCTest.java
@@ -9,7 +9,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-package net.sf.arianne.postman;
+package net.sf.arianne.postman.irc;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
1 2 3 > >> (Page 1 of 3)