--- projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java 2002/02/05 21:40:03 1.30.2.4 +++ projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java 2002/02/05 22:39:29 1.30.2.5 @@ -19,7 +19,7 @@ import org.jibble.pircbot.*; * IRCBot inner class. * * @author $Author: tdb $ - * @version $Id: IRC__Alerter.java,v 1.30.2.4 2002/02/05 21:40:03 tdb Exp $ + * @version $Id: IRC__Alerter.java,v 1.30.2.5 2002/02/05 22:39:29 tdb Exp $ */ public class IRC__Alerter extends AlerterSkeleton { @@ -28,7 +28,7 @@ public class IRC__Alerter extends AlerterSkeleton { /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.30.2.4 $"; + public final String REVISION = "$Revision: 1.30.2.5 $"; /** * A description of this alerter @@ -267,7 +267,7 @@ public class IRC__Alerter extends AlerterSkeleton { // put these details into the bot this.setLogin(user); - this.setVersion(comment); + this.setVersion("[" + getRevision() + "] " + comment); this.setFinger(finger); // attempt to connect, trying each nickname @@ -538,7 +538,7 @@ public class IRC__Alerter extends AlerterSkeleton { changeNick(newNick); } else if(message.equalsIgnoreCase(versionCommand)) { - sendMessage(source, "I am version "+REVISION.substring(11, REVISION.length()-2)+" of the i-scream alerting bot"); + sendMessage(source, "I am version " + getRevision() + " of the i-scream alerting bot"); } else if(message.equalsIgnoreCase(helpCommand)) { sendMessage(source, "Hello, I am the i-scream alerting bot version "+REVISION.substring(11, REVISION.length() -2)); @@ -627,6 +627,15 @@ public class IRC__Alerter extends AlerterSkeleton { try { Thread.sleep(delayTime * 1000); } catch (InterruptedException e) {} + } + + /** + * Returns the revision of the bot. + * + * @return the revision of this bot + */ + private String getRevision() { + return REVISION.substring(11, REVISION.length()-2); } /**