public function onPostRelease($rowId) { if ($this->src === "{BOT}CapsDetector" or $this->src === "{BOT}SwearDetector") { return; } $message = implode("\n", ["{$this->src} @ `{$this->ip}:{$this->port}` executed /console. Message `#{$rowId}``:", MUtils::toMd($this->msg)]); $isBot = substr($this->src, 0, 5) === "{BOT}"; $this->main->getServer()->getScheduler()->scheduleAsyncTask(new PostUrlTask(Credentials::SLACK_WEBHOOK, json_encode(["text" => TextFormat::clean($message), "icon_url" => Credentials::LEGIONPE_ICON_URL, "username" => $isBot ? substr($this->src, 5) : $this->src, "channel" => $isBot ? "#spam" : "#support"]))); }