commit | author | age
|
8bd4d9
|
1 |
<?php |
JK |
2 |
class bot_help_init implements BotModuleInit { |
|
3 |
function register() { |
|
4 |
$handler = array( |
|
5 |
array( |
|
6 |
'file' => 'handler.php', |
|
7 |
'class' => 'bot_help_module', |
|
8 |
'method' => 'handle', |
|
9 |
) |
|
10 |
); |
|
11 |
|
|
12 |
return array( |
|
13 |
'?' => $handler, |
|
14 |
'h' => $handler, |
|
15 |
'help' => $handler, |
|
16 |
'info' => $handler, |
|
17 |
'man' => $handler, |
|
18 |
'pomoc' => $handler, |
|
19 |
); |
|
20 |
} |
|
21 |
|
|
22 |
function help($params = NULL) { |
|
23 |
if($params === NULL) { |
|
24 |
return new BotMsg('<b>help</b> <i>[komenda]</i><br />'."\n" |
|
25 |
. ' Lista komend lub pomoc dla podanego polecenia <i>[komenda]</i><br />'."\n"); |
|
26 |
} |
|
27 |
else |
|
28 |
{ |
|
29 |
return new BotMsg('<b>help</b> <i>[komenda]</i> (aliasy: <b>h, pomoc, ?, info, man</b>)<br />'."\n" |
|
30 |
. ' Zwraca listę komend lub pomoc dotyczącą podanego polecenia <i>[komenda]</i>'); |
|
31 |
} |
|
32 |
} |
|
33 |
} |
|
34 |
|
|
35 |
return 'bot_help_init'; |
|
36 |
?> |