lets assume you get the text portion of the message via
<form action="post">
<input type="text" name="msg">
</form>
php logic could start off looking something like this:
it basically uses $string{x} where x is the blah-th character in the string, starting with 0 as the first character
/// get the message, minus dead space
$msg = trim($_POST['msg']);
/// check to make sure it's not empty
if ( !empty($msg) ) {
/// if the first character is '/'
if ( $msg{0} == '/' ) {
/// if the seconds char is also '/'
if ( $msg{1} == '/' ) {
sendPublic($msg);
}
sendTeam($msg);
}
}