Exemple #1
0
 public function msg($pl, $txt)
 {
     if (MPMU::apiVersion("1.12.0")) {
         $pl->sendTip($txt);
         return;
     }
     list($time, $otxt) = $this->getState("spam", $pl, [0, ""]);
     if (time() - $time < self::SPAM_DELAY && $otxt == $txt) {
         return;
     }
     $this->setState("spam", $pl, [time(), $txt]);
     $pl->sendMessage($txt);
 }