diff options
author | gumi <git@gumi.ca> | 2020-05-16 17:18:17 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-05-16 17:18:17 -0400 |
commit | 25a3c3fefae87d55da172f2aaef6a27987f439fd (patch) | |
tree | c410cdfd73c7cf9101f7f6dab1c8fa1772dd05c9 /server/frob/login.ts | |
parent | 1af05ee74d0b2ec4e132617ab71bedd30fbfe753 (diff) | |
download | tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.tar.gz tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.tar.bz2 tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.tar.xz tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.zip |
[frob] update for deno 1.0
Diffstat (limited to 'server/frob/login.ts')
-rw-r--r-- | server/frob/login.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/frob/login.ts b/server/frob/login.ts index fa130cc..ccf6d37 100644 --- a/server/frob/login.ts +++ b/server/frob/login.ts @@ -1,3 +1,5 @@ +import { SQLHandler } from "./sql.ts"; + class LoginParser { private login_line = "^" + @@ -16,7 +18,7 @@ class LoginParser { "(?<ban_until_time>[0-9]+)\t" + "$"; private login_regex: RegExp; - private encoder; + private encoder: TextEncoder; constructor () { this.login_regex = new RegExp(this.login_line); @@ -79,7 +81,7 @@ class LoginParser { while (true) { const nread = await Deno.read(file.rid, buf); - if (nread === Deno.EOF) { + if (nread === null) { break; } @@ -114,9 +116,9 @@ class LoginParser { } class LoginSQL { - private sql; + private sql: SQLHandler; - constructor (sql) { + constructor (sql: SQLHandler) { this.sql = sql; } |