diff --git a/public/css/chatlogin.css b/public/css/chatlogin.css deleted file mode 100644 index cf395b9..0000000 --- a/public/css/chatlogin.css +++ /dev/null @@ -1,72 +0,0 @@ -h1, h3 { - font-weight: 100; - margin: 0px; -} - -h1 { - font-size: 3em; - text-shadow: 0px 0px .5em #F1F1F1; -} - -h3 { - display: inline-block; - box-shadow: 0px 0px .5em #700; - min-width: 300px; - font-size: 15px; - padding: 2px; - margin: 10px; - background-color: #700; - background-image: linear-gradient(to bottom, #900, #600); - background-image: -moz-linear-gradient(to bottom, #900, #600); - background-image: -webkit-linear-gradient(top, #900, #600); -} - -div.copyright { - font-size: 12px; - color: #CCC; -} - -form { - margin: 10px; -} - -form input[type="text"], form input[type="password"] { - height: 18px; - width: 288px; -} - -form input[type="text"] { - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} - -form input[type="submit"] { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - background: #404; - box-shadow: 0px 0px 1em #707 inset; - color: #FFF; - font-weight: 700; - border-color: #808; -} - -form *:not(option) { - height: 30px; - display: block; - margin: 1px auto; - width: 300px; - padding: 5px; - border: 1px #888 solid; - background: transparent; - box-shadow: 0px 0px 1em #888 inset -} - -a { - color: inherit; - text-decoration: none; - transition: text-shadow .2s; -} - -a:hover { - text-shadow: 0px 0px 1em #F1F1F1; -} diff --git a/src/AJAXChat.php b/src/AJAXChat.php index 2306cb8..beb9773 100644 --- a/src/AJAXChat.php +++ b/src/AJAXChat.php @@ -328,14 +328,6 @@ class AJAXChat { return AJAX_CHAT_PATH . '/template/mobile.html'; case 'legacy': return AJAX_CHAT_PATH . '/template/legacyLogin.html'; - case 'banned': - return AJAX_CHAT_PATH . '/template/banned.html'; - case 'legacy1': - return AJAX_CHAT_PATH . '/template/~loggedOut.html'; - case 'legacy2': - return AJAX_CHAT_PATH . '/template/loggedOut~.html'; - case 'legacy3': - return AJAX_CHAT_PATH . '/template/loggedOut.html'; default: return AJAX_CHAT_PATH . '/template/loggedOutFA.html'; } @@ -355,32 +347,25 @@ class AJAXChat { } function hasAccessTo($view) { - if(substr($view, 0, 6) === 'legacy') - return !$this->isLoggedIn(); - switch($view) { case 'legacy': - if($this->isLoggedIn()) { - return false; - } - return true; - case 'banned': - return true; + return !$this->isLoggedIn(); case 'chat': case 'mobile': case 'teaser': - if($this->isLoggedIn()) { - return true; - } - return false; + return $this->isLoggedIn(); case 'logs': - if($this->isLoggedIn() && ($this->getUserRole() == AJAX_CHAT_ADMIN || $this->getUserRole() == CMOD || $this->getUserRole() == AJAX_CHAT_MODERATOR || $this->getUserRole() == PURPLE || $this->getUserRole() == DONATOR || - ($this->getConfig('logsUserAccess') && - ($this->getUserRole() == AJAX_CHAT_USER)) - )) { - return true; - } - return false; + return $this->isLoggedIn() && ( + $this->getUserRole() == AJAX_CHAT_ADMIN + || $this->getUserRole() == CMOD + || $this->getUserRole() == AJAX_CHAT_MODERATOR + || $this->getUserRole() == PURPLE + || $this->getUserRole() == DONATOR + || ( + $this->getConfig('logsUserAccess') + && $this->getUserRole() == AJAX_CHAT_USER + ) + ); default: return false; } @@ -455,16 +440,6 @@ class AJAXChat { $this->purgeLogs(); } - // Report login to Satori: - /*$boatcom = @fsockopen('marie.railgun.sh', 9064, $errno, $errstr, 5); - if($boatcom) { - $message = sprintf('{sock}[i][url=https://flashii.net/profile.php?u=%d][b]%s[/b][/url] logged into [url=https://flash.moe/chat/]Flashii Chat Legacy[/url].[/i]', $userData['userID'], $userData['userName']); - $message = chr(0xF) . hash_hmac('sha256', $message, 'lol glad i caught this, that could\'ve been pretty funny if i forgot to remove this') . $message . chr(0xF); - fwrite($boatcom, $message); - fflush($boatcom); - fclose($boatcom); - }*/ - return true; } @@ -494,20 +469,21 @@ class AJAXChat { if($channelName !== null) { $channelID = $this->getChannelIDFromChannelName($channelName); // channelName might need encoding conversion: - if($channelID === null) { + if($channelID === null) $channelID = $this->getChannelIDFromChannelName( - $this->trimChannelName($channelName, $this->getConfig('contentEncoding')) - ); - } + $this->trimChannelName($channelName, $this->getConfig('contentEncoding')) + ); } } + // Validate the resulting channelID: if(!$this->validateChannel($channelID)) { - if($this->getChannel() !== null) { + if($this->getChannel() !== null) return $this->getChannel(); - } + return $this->getConfig('defaultChannelID'); } + return $channelID; } diff --git a/template/banned.html b/template/banned.html deleted file mode 100644 index 0dd4a79..0000000 --- a/template/banned.html +++ /dev/null @@ -1,65 +0,0 @@ - - - -
- -