Add ลวนลาม handler with less chance than yiff

This commit is contained in:
2018-12-22 09:57:38 +00:00
parent 5bdce43f34
commit da79c3610c
2 changed files with 35 additions and 4 deletions

View File

@@ -30,16 +30,16 @@ class BlueRoomYiffHandler extends MessageHandler
public function TryHandle($room_id, $msgid, $message, $room_lang): bool
{
if($room_id !== BLUE_ROOM)
if ($room_id !== BLUE_ROOM)
return false;
if(randomorg(0,1) < 1)
if (randomorg(0, 1) < 1)
return false;
$message = strtolower($message);
foreach ($this->keywords as $word) {
if(strpos($message, $word) !== false) {
switch (randomorg(0,2)) {
if (strpos($message, $word) !== false) {
switch (randomorg(0, 2)) {
case 0:
$this->sendSticker($room_id, "CAADBQADtwADKkugCycBx71Mqx5DAg");
break;
@@ -58,6 +58,36 @@ class BlueRoomYiffHandler extends MessageHandler
}
}
class BlueRoomMolestHandler extends MessageHandler
{
public function TryHandle($room_id, $msgid, $message, $room_lang): bool
{
if ($room_id !== BLUE_ROOM)
return false;
if (randomorg(0, 2) < 1)
return false;
$message = strtolower($message);
if (strpos($message, "ลวนลาม") !== false) {
switch (randomorg(0, 2)) {
case 0:
$this->sendSticker($room_id, "CAADBQADtwADKkugCycBx71Mqx5DAg");
break;
case 1:
$this->sendSticker($room_id, "CAADBQADlAADKkugC5BlguxbLRbxAg");
break;
case 2:
$this->sendSticker($room_id, "CAADBQADigADKkugC8khRLbrMMjwAg");
break;
}
return true;
}
return false;
}
}
class BoopTextHandler extends MessageHandler
{
public function TryHandle($room_id, $msgid, $message, $room_lang): bool

View File

@@ -22,6 +22,7 @@ require_once 'Handlers.php';
$handlers = array(
new BeatHandler(),
new BlueRoomYiffHandler(),
new BlueRoomMolestHandler(),
new BoopTextHandler(),
new OwOHandler()
);