@@ 109-120 (lines=12) @@ | ||
106 | $msg->setHandled(true); |
|
107 | } |
|
108 | ||
109 | public function releaseMine(Message $msg, array $matches) |
|
110 | { |
|
111 | $me = $msg->getUsername(); |
|
112 | $results = []; |
|
113 | foreach ($this->resources->getAll() as $key => $resource) { |
|
114 | if (isset($resource['user']) && ($resource['user'] === $me)) { |
|
115 | $results = array_merge($results, $this->releaseReservation($msg, $key)); |
|
116 | } |
|
117 | } |
|
118 | $msg->reply(implode("\n", $results)); |
|
119 | $msg->setHandled(true); |
|
120 | } |
|
121 | ||
122 | public function releaseAll(Message $msg, array $matches) |
|
123 | { |
|
@@ 139-150 (lines=12) @@ | ||
136 | $msg->setHandled(true); |
|
137 | } |
|
138 | ||
139 | public function listMine(Message $msg, array $matches) |
|
140 | { |
|
141 | $me = $msg->getUsername(); |
|
142 | $results = []; |
|
143 | foreach ($this->resources->getAll() as $key => $resource) { |
|
144 | if (isset($resource['user']) && ($resource['user'] === $me)) { |
|
145 | $results[] = $key; |
|
146 | } |
|
147 | } |
|
148 | $msg->reply(implode(',', $results)); |
|
149 | $msg->setHandled(true); |
|
150 | } |
|
151 | ||
152 | public function listFree(Message $msg, array $matches) |
|
153 | { |