X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/blobdiff_plain/4fb3b38caf464a9300131e6e8d61a8234d3dbbff..5620a68a8d20b5f49d6012131bb5dbb7a8185cf7:/js/auth.js diff --git a/js/auth.js b/js/auth.js index 2197b67..c58b85a 100644 --- a/js/auth.js +++ b/js/auth.js @@ -1,5 +1,24 @@ qwebirc.auth.loggedin = function() { var user = Cookie.read("user"); - + var expiry = Cookie.read("ticketexpiry"); + if(expiry && new Date().getTime() > expiry - (5 * 60 * 1000)) + return; + return user; } + +qwebirc.auth.enabled = function() { + return true; +} + +qwebirc.auth.quakeNetAuth = function() { + return true; +} + +qwebirc.auth.passAuth = function() { + return false; +} + +qwebirc.auth.bouncerAuth = function() { + return false; +}