Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
** EPITECH PROJECT, 2024 |
3 |
|
|
** zappy/ai |
4 |
|
|
** File description: |
5 |
|
|
** ListenBroadcastResponse.cpp |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
#include "../../../bots/ABot.hpp" |
9 |
|
|
|
10 |
|
|
#include <iostream> |
11 |
|
|
#include <string> |
12 |
|
|
#include <sstream> |
13 |
|
|
|
14 |
|
✗ |
void ABot::listenBroadcastResponse() |
15 |
|
|
{ |
16 |
|
|
// Listeners Broadcast |
17 |
|
✗ |
if (_allyMessage.content.find("group") != std::string::npos) |
18 |
|
|
{ |
19 |
|
✗ |
listenGroupBroadcast(_allyMessage.content); |
20 |
|
|
} |
21 |
|
✗ |
else if (_allyMessage.content.find("joined") != std::string::npos && _state.metadata["ask_for_group"] == "true") |
22 |
|
|
{ |
23 |
|
✗ |
listenGroupJoinedBroadcast(_allyMessage.content); |
24 |
|
|
} |
25 |
|
✗ |
else if (_allyMessage.content.find("meeting") != std::string::npos) |
26 |
|
|
{ |
27 |
|
✗ |
listenMeetingDoneBroadcast(_allyMessage.content); |
28 |
|
|
} |
29 |
|
✗ |
else if (_allyMessage.content.find("warns")) |
30 |
|
✗ |
listenWarnsBroadcast(_allyMessage.content); |
31 |
|
✗ |
} |
32 |
|
|
|