79 |
|
if(((alert.getLevel() == 0) && (alert.getLastLevel() >= level)) || (alert.getLevel() >= level)) { |
80 |
|
String alertType = Alert.alertLevels[alert.getLevel()]; |
81 |
|
String thresholdType = Alert.thresholdLevels[alert.getThreshold()]; |
82 |
< |
String timeFirstSince = DateUtils.formatTime(System.currentTimeMillis() - alert.getInitialAlertTime(), "%DAYS% days, %HOURS% hours, %MINS% mins, and %SECS% secs"); |
82 |
> |
String timeFirstSince = DateUtils.formatTime((System.currentTimeMillis() - alert.getInitialAlertTime())/1000, "%DAYS% days, %HOURS% hours, %MINS% mins, and %SECS% secs"); |
83 |
|
String timeFirstOccured = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.UK).format(new Date(alert.getInitialAlertTime())); |
84 |
|
// sort out the message |
85 |
|
String message; |
531 |
|
endOfChan = newChan.length(); |
532 |
|
} |
533 |
|
newChan = newChan.substring(0, endOfChan); |
534 |
< |
sendMsg(getMsgSender(line)+", okay, I'm off to "+newChan); |
535 |
< |
_socketOut.println("PART "+_channel); |
536 |
< |
_socketOut.println("JOIN "+newChan); |
537 |
< |
_channel = newChan; |
534 |
> |
if(newChan.equals(_channel)) { |
535 |
> |
sendMsg(getMsgSender(line)+", I'm already on "+newChan+"!"); |
536 |
> |
} else { |
537 |
> |
sendMsg(getMsgSender(line)+", okay, I'm off to "+newChan); |
538 |
> |
_socketOut.println("PART "+_channel); |
539 |
> |
_socketOut.println("JOIN "+newChan); |
540 |
> |
_channel = newChan; |
541 |
> |
} |
542 |
|
} |
543 |
|
else if(message.indexOf(nickChangeCommand)!=-1) { |
544 |
|
String nickChangeCmd = nickChangeCommand; |