Skip to content

Commit 971b704

Browse files
committed
update
1 parent b94a59e commit 971b704

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

src/Module/Modules/Module.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,27 @@ public function onCommandMessage(Wrapper $wrapper, $message)
6262
switch ($module) {
6363
//AlreadyLoaded
6464
case 'AL':
65-
$wrapper->Channel->sendMessage('The Module `' . $message['arguments'][1] .
65+
$wrapper->Channel->send('The Module `' . $message['arguments'][1] .
6666
'` is already loaded.');
6767
break;
6868

6969
//Loaded
7070
case 'L':
71-
$wrapper->Channel->sendMessage('Module `' . $message['arguments'][1] .
71+
$wrapper->Channel->send('Module `' . $message['arguments'][1] .
7272
'` loaded successfully.');
7373
break;
7474

7575
//NotFound
7676
case 'NF':
77-
$wrapper->Channel->sendMessage('The Module `' . $message['arguments'][1] . '` was not found.');
77+
$wrapper->Channel->send('The Module `' . $message['arguments'][1] . '` was not found.');
7878
break;
7979
}
8080
break;
8181

8282
case 'unload':
8383
//Prevent for loading a file in the memory for nothing.
8484
if (Configure::read('debug') === false) {
85-
$wrapper->Channel->sendMessage('You can\'t unload a Module when the debug is `false`.');
85+
$wrapper->Channel->send('You can\'t unload a Module when the debug is `false`.');
8686
break;
8787
}
8888

@@ -91,17 +91,17 @@ public function onCommandMessage(Wrapper $wrapper, $message)
9191

9292
//AlreadyUnloaded
9393
if ($module === 'AU') {
94-
$wrapper->Channel->sendMessage('The Module `' . $message['arguments'][1] .
94+
$wrapper->Channel->send('The Module `' . $message['arguments'][1] .
9595
'` is already unloaded or doesn\'t exist.');
9696
} else {
97-
$wrapper->Channel->sendMessage('Module `' . $message['arguments'][1] . '` unloaded successfully.');
97+
$wrapper->Channel->send('Module `' . $message['arguments'][1] . '` unloaded successfully.');
9898
}
9999
break;
100100

101101
case 'reload':
102102
//Prevent for loading a file in the memory for nothing.
103103
if (Configure::read('debug') === false) {
104-
$wrapper->Channel->sendMessage('You can\'t reload a Module when the debug is `false`.');
104+
$wrapper->Channel->send('You can\'t reload a Module when the debug is `false`.');
105105
break;
106106
}
107107

@@ -131,7 +131,7 @@ public function onCommandMessage(Wrapper $wrapper, $message)
131131

132132
//If $time is false, that mean the Module is not loaded and/or doesn't exist.
133133
if ($time === false) {
134-
$wrapper->Channel->sendMessage('This Module is not loaded.');
134+
$wrapper->Channel->send('This Module is not loaded.');
135135
break;
136136
}
137137

@@ -140,7 +140,7 @@ public function onCommandMessage(Wrapper $wrapper, $message)
140140
$start = new DateTime("@0");
141141
$end = new DateTime("@$seconds");
142142

143-
$wrapper->Channel->sendMessage('The Module `' . Inflector::camelize($message['arguments'][1]) .
143+
$wrapper->Channel->send('The Module `' . Inflector::camelize($message['arguments'][1]) .
144144
'` is loaded since ' . $start->diff($end)->format('%a days, %h hours, %i minutes and %s seconds.'));
145145
break;
146146

@@ -149,11 +149,11 @@ public function onCommandMessage(Wrapper $wrapper, $message)
149149
$modules = $wrapper->ModuleManager->getLoadedModules();
150150
$modules = implode("`, `", $modules);
151151

152-
$wrapper->Channel->sendMessage('Modules loaded : `' . Inflector::camelize($modules) . '`.');
152+
$wrapper->Channel->send('Modules loaded : `' . Inflector::camelize($modules) . '`.');
153153
break;
154154

155155
default:
156-
$wrapper->Channel->sendMessage(Command::unknown($message));
156+
$wrapper->Channel->send(Command::unknown($message));
157157
}
158158
}
159159

@@ -174,22 +174,22 @@ protected function reloadModule(Wrapper $wrapper, $module)
174174
switch ($moduleStatus) {
175175
//AlreadyUnloaded
176176
case 'AU':
177-
$wrapper->Channel->sendMessage('The Module `' . $module . '` doesn\'t exist and cannot be reloaded.');
177+
$wrapper->Channel->send('The Module `' . $module . '` doesn\'t exist and cannot be reloaded.');
178178
break;
179179

180180
//AlreadyLoaded
181181
case 'AL':
182-
$wrapper->Channel->sendMessage('The Module `' . $module . '` is already loaded.');
182+
$wrapper->Channel->send('The Module `' . $module . '` is already loaded.');
183183
break;
184184

185185
//Loaded
186186
case 'L':
187-
$wrapper->Channel->sendMessage('Module `' . $module . '` reloaded successfully.');
187+
$wrapper->Channel->send('Module `' . $module . '` reloaded successfully.');
188188
break;
189189

190190
//NotFound
191191
case 'NF':
192-
$wrapper->Channel->sendMessage('Failed to reload the Module `' . $module . '`.');
192+
$wrapper->Channel->send('Failed to reload the Module `' . $module . '`.');
193193
break;
194194
}
195195
}

0 commit comments

Comments
 (0)