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.17 by ajm, Tue Mar 6 02:33:55 2001 UTC vs.
Revision 1.18 by tdb, Thu Mar 8 13:43:54 2001 UTC

# Line 106 | Line 106 | public class IRC__Alerter implements PluginAlerter {
106                  _alertCount ++;
107              }
108          }
109 +        else {
110 +            _ignoredCount ++;
111 +        }
112      }
113  
114      /**
# Line 172 | Line 175 | public class IRC__Alerter implements PluginAlerter {
175      /**
176       * Number of alerts sent
177       */
178 <    private long _alertCount = 0;
178 >    private int _alertCount = 0;
179      
180      /**
181 +     * Number of alerts ignored when in "stopped" mode
182 +     */
183 +    private int _ignoredCount = 0;
184 +    
185 +    /**
186       * Time of IRCBot startup
187       */
188      private long _startTime;
# Line 555 | Line 563 | public class IRC__Alerter implements PluginAlerter {
563                      sendPrivMsg(getMsgSender(line), helpCommand);
564                  }
565                  else if(message.indexOf(statCommand)!=-1) {
566 <                    sendMsg(getMsgSender(line)+", I have sent a total of "+_alertCount+" alerts!");
566 >                    sendMsg(getMsgSender(line)+", I have sent a total of "+_alertCount+" alerts, and ignored a total of "+_ignoredCount+"!");
567                  }
568                  else if(message.indexOf(uptimeCommand)!=-1) {
569                      long uptime = (System.currentTimeMillis() - _startTime) / 1000;
570                      String uptimeText = DateUtils.formatTime(uptime, "%DAYS% days, %HOURS% hours, %MINS% mins, and %SECS% secs");
571                      sendMsg(getMsgSender(line)+", I have been running for "+uptimeText);
572 +                }
573 +                else if(message.indexOf("ping")!=-1) {
574 +                    sendMsg("pong");
575                  }
576                  else if(message.indexOf("do a jibble dance")!=-1) {
577                      // little joke :)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines