ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java (file contents):
Revision 1.4 by tdb, Fri Mar 2 01:29:22 2001 UTC vs.
Revision 1.6 by tdb, Fri Mar 2 02:46:56 2001 UTC

# Line 58 | Line 58 | public class IRC__Alerter implements PluginAlerter {
58              _logger.write(toString(), Logger.ERROR, "Error starting IRCBot: "+e);
59          }
60          
61 <        _logger.write(toString(), Logger.SYSINT, "IRC Alerter started");
61 >        _logger.write(toString(), Logger.SYSINIT, "IRC Alerter started");
62      }
63  
64   //---PUBLIC METHODS---
# Line 66 | Line 66 | public class IRC__Alerter implements PluginAlerter {
66      public void sendAlert(Alert alert) {
67          // only send if it's equal (or above) our level
68          if(alert.getLevel() >= _level) {
69 +            String alertType = Alert.alerts[alert.getLevel()]+"["+String.valueOf(alert.getLevel())+"]";
70              // sort out the message
71              String message = _message;
72 <            message = StringUtils.replaceText(message, "%level%", String.valueOf(alert.getLevel()));
72 >            message = StringUtils.replaceText(message, "%level%", alertType);
73              message = StringUtils.replaceText(message, "%source%", alert.getSource());
74              message = StringUtils.replaceText(message, "%value%", alert.getValue());
75              message = StringUtils.replaceText(message, "%thresholdValue%", alert.getThresholdValue());
# Line 228 | Line 229 | public class IRC__Alerter implements PluginAlerter {
229           * @throws IOException if the disconnection fails
230           */
231          public void disconnect() throws IOException {
232 <            // send proper QUIET
232 >            // send proper QUIT
233              _socketOut.println("QUIT : iscreamBot component shutting down...");
234              // close the socket
235              _socketOut.close();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines