267 |
|
|
268 |
|
// put these details into the bot |
269 |
|
this.setLogin(user); |
270 |
< |
this.setVersion(comment); |
270 |
> |
this.setVersion("[" + getRevision() + "] " + comment); |
271 |
|
this.setFinger(finger); |
272 |
|
|
273 |
|
// attempt to connect, trying each nickname |
538 |
|
changeNick(newNick); |
539 |
|
} |
540 |
|
else if(message.equalsIgnoreCase(versionCommand)) { |
541 |
< |
sendMessage(source, "I am version "+REVISION.substring(11, REVISION.length()-2)+" of the i-scream alerting bot"); |
541 |
> |
sendMessage(source, "I am version " + getRevision() + " of the i-scream alerting bot"); |
542 |
|
} |
543 |
|
else if(message.equalsIgnoreCase(helpCommand)) { |
544 |
|
sendMessage(source, "Hello, I am the i-scream alerting bot version "+REVISION.substring(11, REVISION.length() -2)); |
627 |
|
try { |
628 |
|
Thread.sleep(delayTime * 1000); |
629 |
|
} catch (InterruptedException e) {} |
630 |
+ |
} |
631 |
+ |
|
632 |
+ |
/** |
633 |
+ |
* Returns the revision of the bot. |
634 |
+ |
* |
635 |
+ |
* @return the revision of this bot |
636 |
+ |
*/ |
637 |
+ |
private String getRevision() { |
638 |
+ |
return REVISION.substring(11, REVISION.length()-2); |
639 |
|
} |
640 |
|
|
641 |
|
/** |