Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
espidev committed Mar 27, 2017
1 parent b450bb2 commit f05fa38
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
164 changes: 145 additions & 19 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions src/main/java/net/estinet/eAuth/Configuration.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package net.estinet.eAuth

import java.io.*
import java.util.*
//seshpenguin was here pok
fun makeConfig(){
val f = File("config.properties")
if(!f.exists()) f.createNewFile()
val prop = Properties()
var output: FileOutputStream? = null
var reader: InputStreamReader? = null
try {
reader = InputStreamReader(FileInputStream(f))
prop.load(reader)
output = FileOutputStream(f)
if (prop.getProperty("port") == null) {
println("Input eAuth port (Default: 2169):")
var input = console.readLine()
if (input == "") input = "2169"
prop.setProperty("port", input)
}
} catch (io: IOException) {
io.printStackTrace()
} finally {
try {
prop.store(output, null)
if(reader != null) reader.close()
if(output != null) output.close()
} catch (e: IOException) {
e.printStackTrace()
}
callConfig()
}
}
fun callConfig(){

}

0 comments on commit f05fa38

Please sign in to comment.