]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Reply.pl
- if autoload fails, make poor attempt to load module.
[infobot.git] / src / Factoids / Reply.pl
index 78c13d876be57231c52e292d62f791b76b97d373..dbe933644db5861370640a663796c33110adce9f 100644 (file)
@@ -243,7 +243,7 @@ sub SARit {
 }
 
 sub substVars {
-    my($reply) = @_;
+    my($reply,$flag) = @_;
 
     # $date, $time.
     my $date   =  scalar(localtime());
@@ -253,8 +253,11 @@ sub substVars {
     $reply     =~ s/\$time/$date/gi;
 
     # dollar variables.
-    $reply     =~ s/\$nick/$who/g;
-    $reply     =~ s/\$who/$who/g;      # backward compat.
+    if ($flag) {
+       $reply  =~ s/\$nick/$who/g;
+       $reply  =~ s/\$who/$who/g;      # backward compat.
+    }
+
     if ($reply =~ /\$(user(name)?|host)/) {
        my ($username, $hostname) = split /\@/, $uh;
        $reply  =~ s/\$user(name)?/$username/g;