Macro Tests: refactored all macro tests to remove a very evil hack
for inserting macros into the config. The new method is much cleaner and uses the Config API. Updated the docs for the RootTitle macro, both POD and online help.
This commit is contained in:
parent
cc61639232
commit
f1159269a0
32 changed files with 245 additions and 132 deletions
|
|
@ -1,10 +1,11 @@
|
|||
package Macro_Config;
|
||||
package WebGUI::Macro_Config;
|
||||
|
||||
sub insert_macro {
|
||||
sub enable_macro {
|
||||
my ($session, $nickname, $macroName) = @_;
|
||||
my %macros = %{ $session->config->get('macros') };
|
||||
$macros{$nickname} = $macroName;
|
||||
$session->config->{_config}->{'macros'} = \%macros;
|
||||
return '' if $macros{$nickname};
|
||||
$session->config->addToHash("macros", $nickname, $macroName);
|
||||
return $nickname;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue