public void timeout(String channel,String name,long time,String reason){
  if (onChannel(channel,true)) {
    if (time <= 0) {
      sendMessage(channel,".timeout " + name,"Trying to timeout " + name + "..");
    }
 else {
      String formatted=DateTime.duration(time * 1000,0,2,0);
      String onlySeconds=time + "s";
      String timeString=formatted.equals(onlySeconds) ? onlySeconds : onlySeconds + "/" + formatted;
      if (reason == null || reason.isEmpty()) {
        sendMessage(channel,".timeout " + name + " "+ time,"Trying to timeout " + name + " ("+ timeString+ ")");
      }
 else {
        sendMessage(channel,".timeout " + name + " "+ time+ " "+ reason,"Trying to timeout " + name + " ("+ timeString+ ", "+ reason+ ")");
      }
    }
  }
}

public void timeout ( String channel , String name , long time , String reason ) { if ( onChannel ( channel , true ) ) { if ( time <= 0 ) { sendMessage ( channel , ".timeout " + name , "Trying to timeout " + name + ".." ) ; } else { String formatted = DateTime . duration ( time * 1000 , 0 , 2 , 0 ) ; String onlySeconds = time + "s" ; String timeString = formatted . equals ( onlySeconds ) ? onlySeconds : onlySeconds + "/" + formatted ; if ( reason == null || reason . isEmpty ( ) ) { sendMessage ( channel , ".timeout " + name + " " + time , "Trying to timeout " + name + " (" + timeString + ")" ) ; } else { sendMessage ( channel , ".timeout " + name + " " + time + " " + reason , "Trying to timeout " + name + " (" + timeString + ", " + reason + ")" ) ; } } } }
sends a timeout command to the server .
