Add ลวนลาม handler with less chance than yiff
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -22,6 +22,7 @@ require_once 'Handlers.php';
|
||||
$handlers = array(
|
||||
new BeatHandler(),
|
||||
new BlueRoomYiffHandler(),
|
||||
new BlueRoomMolestHandler(),
|
||||
new BoopTextHandler(),
|
||||
new OwOHandler()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user