Greg
05-17-2003, 09:32 PM
This code checks to see if a user arrived at IRC via a link that included a NICK and a Room/channel name...
if ( !empty($_POST['Nick']) ) { // if nick POST var is not empty
$nickname=$_POST['Nick']; // set nick
$autoconnect=1; // set autoconnect ON
}
else { // else
if ( $Nick == "" ) { // if nick in URL is not there
$autoconnect=0; // set autoconnect OFF
$nickname="Guest????"; // fill in nick with random guest nick
}
else { // else if nick in URL
$nickname=$Nick; // set nick
$autoconnect=1; // set autoconnect ON
}
}
if( $room=="" ) { // if room name not set
$room="codeblu"; // set to default codeblu
}
if ( !empty($_POST['Nick']) ) { // if nick POST var is not empty
$nickname=$_POST['Nick']; // set nick
$autoconnect=1; // set autoconnect ON
}
else { // else
if ( $Nick == "" ) { // if nick in URL is not there
$autoconnect=0; // set autoconnect OFF
$nickname="Guest????"; // fill in nick with random guest nick
}
else { // else if nick in URL
$nickname=$Nick; // set nick
$autoconnect=1; // set autoconnect ON
}
}
if( $room=="" ) { // if room name not set
$room="codeblu"; // set to default codeblu
}