[Cherbot-commit] SF.net SVN: cherbot: [41] trunk/src/net/sf/cherbot
Status: Alpha
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-02-10 21:21:40
|
Revision: 41
http://svn.sourceforge.net/cherbot/?rev=41&view=rev
Author: christianhujer
Date: 2007-02-10 13:21:38 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Changed enum constant names to match code convention.
Fixed some code convention errors.
Modified Paths:
--------------
trunk/src/net/sf/cherbot/CherBot.java
trunk/src/net/sf/cherbot/CommType.java
Modified: trunk/src/net/sf/cherbot/CherBot.java
===================================================================
--- trunk/src/net/sf/cherbot/CherBot.java 2006-11-25 18:29:45 UTC (rev 40)
+++ trunk/src/net/sf/cherbot/CherBot.java 2007-02-10 21:21:38 UTC (rev 41)
@@ -270,7 +270,7 @@
}
/**
- * Tell
+ * Tell.
* @param p Player name
* @param s String to tell
*/
@@ -290,8 +290,9 @@
}
/**
- * Reply
+ * Reply.
* @param s String to tell
+ * @throws IOException in case of I/O problems.
*/
public void reply(final String s) throws IOException {
final StringBuilder sb = new StringBuilder();
@@ -396,7 +397,7 @@
if (username.equals(who)) {
return;
} // avoid loop dispatch!
- if (ct == CommType.shout) {
+ if (ct == CommType.SHOUT) {
final Pattern p = Pattern.compile(username + "(?:(?:,|:)? *)(.*)");
final Matcher matcher = p.matcher(msg);
if (matcher.matches()) {
Modified: trunk/src/net/sf/cherbot/CommType.java
===================================================================
--- trunk/src/net/sf/cherbot/CommType.java 2006-11-25 18:29:45 UTC (rev 40)
+++ trunk/src/net/sf/cherbot/CommType.java 2007-02-10 21:21:38 UTC (rev 41)
@@ -19,22 +19,29 @@
public enum CommType {
/**
- * SAY
- */say("(\\S+) says: (.*)"),
+ * SAY.
+ */
+ SAY("(\\S+) says: (.*)"),
+
/**
- * SHOUT
- */shout("(\\S+) shouts: (.*)"),
+ * SHOUT.
+ */
+ SHOUT("(\\S+) shouts: (.*)"),
+
/**
- * TELL
- */tell("(\\S+) tells you: (.*)"),
+ * TELL.
+ */
+ TELL("(\\S+) tells you: (.*)"),
+
/**
- * REPLY
- */reply("(\\S+) replies you: (.*)");
+ * REPLY.
+ */
+ REPLY("(\\S+) replies you: (.*)");
/**
* All Communicationtypes.
*/
- public static final Set<CommType> all = Collections.unmodifiableSet(EnumSet.allOf(CommType.class));
+ public static final Set<CommType> ALL = Collections.unmodifiableSet(EnumSet.allOf(CommType.class));
/**
* Regex pattern to match.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|