diff --git a/CHANGELOG b/CHANGELOG
index 633fbb4..c3ca4be 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.6 - Apr. 26, 2015
+Added option to only allow guests with a global password
+
Version 1.5 - Apr. 20, 2015
Added incognito mode
diff --git a/chat.php b/chat.php
index 69053e2..656031b 100755
--- a/chat.php
+++ b/chat.php
@@ -133,12 +133,16 @@ if(!isSet($_REQUEST['action'])){
approve_session();
send_approve_waiting();
}elseif($_REQUEST['do']=='guestaccess'){
- if(isSet($_REQUEST['set']) && preg_match('/^[0123]$/', $_REQUEST['set'])){
+ if(isSet($_REQUEST['set']) && preg_match('/^[01234]$/', $_REQUEST['set'])){
update_setting('guestaccess', $_REQUEST['set']);
}
}elseif($_REQUEST['do']=='filter'){
manage_filter();
send_filter();
+ }elseif($_REQUEST['do']=='globalpass'){
+ if(isSet($_REQUEST['globalpass'])){
+ update_setting('globalpass', $_REQUEST['globalpass']);
+ }
}
send_admin();
}elseif($_REQUEST['action']=='setup'){
@@ -153,7 +157,7 @@ if(!isSet($_REQUEST['action'])){
if(!valid_admin()) send_alogin();
if(!isSet($_REQUEST['do'])){
}elseif($_REQUEST['do']=='guestaccess'){
- if(isSet($_REQUEST['set']) && preg_match('/^[0123]$/', $_REQUEST['set'])){
+ if(isSet($_REQUEST['set']) && preg_match('/^[01234]$/', $_REQUEST['set'])){
update_setting('guestaccess', $_REQUEST['set']);
}
}elseif($_REQUEST['do']=='messages'){
@@ -163,6 +167,10 @@ if(!isSet($_REQUEST['action'])){
$_REQUEST['rulestxt']=preg_replace("/\n/", '
', $_REQUEST['rulestxt']);
$_REQUEST['rulestxt']=preg_replace("/\r/", '
', $_REQUEST['rulestxt']);
update_setting('rulestxt', $_REQUEST['rulestxt']);
+ }elseif($_REQUEST['do']=='globalpass'){
+ if(isSet($_REQUEST['globalpass'])){
+ update_setting('globalpass', $_REQUEST['globalpass']);
+ }
}
send_setup();
}elseif($_REQUEST['action']=='init'){
@@ -288,10 +296,21 @@ function send_setup(){
echo '
| |
";
+ echo '
| |
";
echo ' | |
| ".submit($I['change']).' |
';
+ echo "> | ";
+ echo ' | '.submit($I['change']).' |
';
thr();
+ if($ga==4){
+ echo "$I[globalloginpass] | ";
+ echo "<$H[form]>".hidden('action', 'setup').hidden('do', 'globalpass').hidden('session', $U['session']).' |
|
';
+ thr();
+ }
echo "$I[sysmessages] | ";
echo "<$H[form]>".hidden('action', 'setup').hidden('do', 'messages').hidden('session', $U['session']).' |
|
';
thr();
+ if($ga==4){
+ echo "$I[globalloginpass] | ";
+ echo frmadm('globalpass').' |
|
';
+ thr();
+ }
if($C['suguests']){
echo "$I[addsuguest] | ";
echo frmadm('superguest')." | |
|
|