diff --git a/bot.php b/bot.php index bbc3793..f5af0b0 100644 --- a/bot.php +++ b/bot.php @@ -73,7 +73,7 @@ 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]); @@ -87,7 +87,7 @@ } } 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]); } }