- # freshmeat
- if (&IsChanConf("freshmeatForFactoid")) {
- if (&dbGet("freshmeat", "name", $lhs, "name")) {
- &msg($who, "permission denied. (freshmeat)");
- &status("alert: $who wanted to teach me something that freshmeat already has info on.");
- return 1;
+ # factoid arguments handler.
+ # must start with a non-variable
+ if (&IsChanConf("factoidArguments") > 0 and $lhs =~ /^[^\$]+.*\$/) {
+ &status("Update: Factoid Arguments found.");
+ &status("Update: orig lhs => '$lhs'.");
+ &status("Update: orig rhs => '$rhs'.");
+
+ my @list;
+ my $count = 0;
+ $lhs =~ s/^/cmd: /;
+ while ($lhs =~ s/\$(\S+)/(.*?)/) {
+ push(@list, "\$$1");
+ $count++;
+ last if ($count >= 10);
+ }
+
+ if ($count >= 10) {
+ &msg($who, "error: could not SAR properly.");
+ &DEBUG("error: lhs => '$lhs' rhs => '$rhs'.");
+ return;