| |
---|
| | $command = str_replace(array( |
---|
| | chr(10), |
---|
| | chr(13) |
---|
| | ), '', $ex[3]); |
---|
| | if ($command == ":!req" && $ex[4] <> "" && $ex[5] <> "") { |
---|
| | if ($command == ":!req" && isset($ex[4]) && isset($ex[5]) && $ex[4] <> "" && $ex[5] <> "") { |
---|
| | // 4 = bot name, 5 = their code |
---|
| | if(!in_array($ex[4], $collected)){ // not already added their code |
---|
| | $response = get_code($ex[5]); |
---|
| | if(preg_match("/^[0-9A-Fa-f]{32}/", $response)){ // valid code back |
---|
| |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | if ($command == ":!rsp") { |
---|
| | if ($ex[4] == $rand && $ex[5] <> ""){ // response is for this bot |
---|
| | if ($ex[4] == $rand && isset($ex[5]) && $ex[5] <> ""){ // response is for this bot |
---|
| | get_code($ex[5]); |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | |