X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FFactoids%2FReply.pl;h=b892a5ee0bb0b37632a238e1a4003a9041c4b0c2;hb=e029359714e3bff3e6d4e816cb16695bacd79f59;hp=89faac20de8f0600bf0eba97af5d636d3e2af0fa;hpb=40f6dad8bfd5a8a707a69cb31ba62cc6d26139c1;p=infobot.git diff --git a/src/Factoids/Reply.pl b/src/Factoids/Reply.pl index 89faac2..b892a5e 100644 --- a/src/Factoids/Reply.pl +++ b/src/Factoids/Reply.pl @@ -314,6 +314,11 @@ sub substVars { $reply =~ s/\$host(name)?/$hostname/g; } $reply =~ s/\$chan(nel)?/$talkchannel/g; + if ( $reply =~ /\$urlchannel/ ) { + my $urlchannel = $talkchannel; + $urlchannel =~ s/([^\w])/sprintf("%%%02x",ord($1))/gie; + $reply =~ s/\$urlchannel?/$urlchannel/g; + } if ( $msgType =~ /public/ ) { $reply =~ s/\$lastspeaker/$lastWho{$talkchannel}/g; }