# scripts/kill_bind_off.cfg
cl_message_client_color green
echo Sewerslide disabled
bind space "cl_message_client_color white;echo Sewerslide attempted;say /rescue"
bind period "exec scripts/kill_bind_on.cfg"
# scripts/kill_bind_on.cfg
cl_message_client_color red
echo Sewerslide enabled
bind space "kill;+kill;say /kill"
bind period "exec scripts/kill_bind_off.cfg"
# scripts/kill_bind_off.cfg
cl_message_client_color green
echo Sewerslide disabled
bind space "cl_message_client_color white;echo Sewerslide attempted;say /rescue"
bind period "exec scripts/kill_bind_on.cfg"
# scripts/kill_bind_on.cfg
cl_message_client_color red
echo Sewerslide enabled
bind space "kill;+kill;say /kill"
bind period "exec scripts/kill_bind_off.cfg"
# scripts/kill_bind_off.cfg
cl_message_client_color green
echo Sewerslide disabled
bind space "cl_message_client_color white;echo Sewerslide attempted;say /rescue"
bind period "exec scripts/kill_bind_on.cfg"
# scripts/kill_bind_on.cfg
cl_message_client_color red
echo Sewerslide enabled
bind space "kill;+kill;say /kill"
bind period "exec scripts/kill_bind_off.cfg"
/**
* Generates a user-friendly alphanumeric random string of given length
* We remove 0 and O so users cannot confuse those in passwords etc.
*
* @return string
*/
function gen_rand_string_friendly($num_chars = 8)
{
$rand_str = unique_id();
// Remove Z and Y from the base_convert(), replace 0 with Z and O with Y
// [a, z] + [0, 9] - {z, y} = [a, z] + [0, 9] - {0, o} = 34
$rand_str = str_replace(array('0', 'O'), array('Z', 'Y'), strtoupper(base_convert($rand_str, 16, 34)));
return substr($rand_str, 0, $num_chars);
}