106 |
|
_alertCount ++; |
107 |
|
} |
108 |
|
} |
109 |
+ |
else { |
110 |
+ |
_ignoredCount ++; |
111 |
+ |
} |
112 |
|
} |
113 |
|
|
114 |
|
/** |
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; |
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 :) |