Macro Mods
Moderator: Moderators
-
sli
- Perl Monk

- Posts: 810
- Joined: 04 Apr 2008, 17:26
- Noob?: No
Macro Mods
So I have a fully modded macro plugin. What I want to discuss are the reasons why the macro plugin isn't being maintained despite having a huge appeal. ("Because it's arachno's plugin" is not a reason.) I'm debating just committing this modded macro plugin myself.
cs : ee : realist
-
h4rry84
- Moderators

- Posts: 234
- Joined: 04 Apr 2008, 09:30
- Noob?: Yes
- Location: My House
Re: Macro Mods
as long it's stable, why must denying improvements ?
-
sli
- Perl Monk

- Posts: 810
- Joined: 04 Apr 2008, 17:26
- Noob?: No
Re: Macro Mods
Because the improvements are nice. I like the localtime mod and I don't see any reason why it shouldn't be added, along with just about all of the other ones.
cs : ee : realist
-
Click
- Human

- Posts: 39
- Joined: 15 Apr 2008, 06:08
- Noob?: Yes
- Location: Russia, Velikiy Novgorod
Re: Macro Mods
need change macro plugin for work
@eval(43+@rand(10,30))
and
@rand(10,30)+@rand(10,30)
-
Click
- Human

- Posts: 39
- Joined: 15 Apr 2008, 06:08
- Noob?: Yes
- Location: Russia, Velikiy Novgorod
Re: Macro Mods
pls test it
plugins/macro/Parser.pm:
plugins/macro/Parser.pm:
Code: Select all
+use Text::Balanced qw/extract_bracketed/;
sub parseKw {
- my @pair = $_[0] =~ /@($macroKeywords)s*(s*(.*?)s*)/i;
+ my @full = $_[0] =~ /@($macroKeywords)s*((s*(.*?)s*).*)$/i;
+ my @pair = ($full[0]);
+ my ($bracketed) = extract_bracketed ($full[1], '()');
+ return unless $bracketed;
+ push @pair, substr ($bracketed, 1, -1);
return unless @pair;
if ($pair[0] eq 'arg') {
return $_[0] =~ /@(arg)s*(s*(".*?",s*d+)s*)/
} elsif ($pair[0] eq 'random') {
return $_[0] =~ /@(random)s*(s*(".*?")s*)/
}
while ($pair[1] =~ /@($macroKeywords)s*(/) {
- @pair = $pair[1] =~ /@($macroKeywords)s*((.*)/
+ @pair = parseKw ($pair[1])
}
return @pair
}Code: Select all
macro test {
log @eval (@eval (1 + 2) * 3) @eval (4)
}Code: Select all
macro test
eval; @eval (1 + 2) * 3;
eval; 1 + 2;
eval; 3 * 3;
eval; 4;
[macro][log] 9 4
You do not have the required permissions to view the files attached to this post.

