| 83 | | if ($instance = $this->getPlugin($plugin)) { |
|---|
| 84 | | $instance->muted = true; |
|---|
| 85 | | $this->doPrivmsg($this->event->getSource(), 'Muted '.$plugin.'.'); |
|---|
| 86 | | } else { |
|---|
| 87 | | $this->doPrivmsg($this->event->getSource(), 'Plugin '.$plugin.' not found, could not mute.'); |
|---|
| 88 | | } |
|---|
| | 83 | $target = trim((!empty($target) && $this->fromAdmin(false)) ? $target : $this->event->getSource()); |
|---|
| | 84 | if (!empty($target)) { |
|---|
| | 85 | if ($instance = $this->getPlugin($plugin)) { |
|---|
| | 86 | $instance->muted[$target] = true; |
|---|
| | 87 | $this->doPrivmsg($this->event->getSource(), 'Muted '.$plugin.' for '.$target.'.'); |
|---|
| | 88 | } else { |
|---|
| | 89 | $this->doPrivmsg($this->event->getSource(), 'Plugin '.$plugin.' not found, could not mute.'); |
|---|
| | 90 | } |
|---|
| | 91 | } |
|---|
| 93 | | if ($instance = $this->getPlugin($plugin)) { |
|---|
| 94 | | $instance->muted = false; |
|---|
| 95 | | $this->doPrivmsg($this->event->getSource(), 'Unmuted '.$plugin.'.'); |
|---|
| 96 | | } else { |
|---|
| 97 | | $this->doPrivmsg($this->event->getSource(), 'Plugin '.$plugin.' not found, could not unmute.'); |
|---|
| 98 | | } |
|---|
| | 96 | $target = trim((!empty($target) && $this->fromAdmin(false)) ? $target : $this->event->getSource()); |
|---|
| | 97 | if (!empty($target)) { |
|---|
| | 98 | if ($instance = $this->getPlugin($plugin)) { |
|---|
| | 99 | $instance->muted[$target] = false; |
|---|
| | 100 | $this->doPrivmsg($this->event->getSource(), 'Unmuted '.$plugin.' for '.$target.'.'); |
|---|
| | 101 | } else { |
|---|
| | 102 | $this->doPrivmsg($this->event->getSource(), 'Plugin '.$plugin.' not found, could not unmute.'); |
|---|
| | 103 | } |
|---|
| | 104 | } |
|---|