#
# The DCC protocol specifies no way to include spaces in the
# filename of a request.  Some clients attempt to fix this by
# enclosing spaced filenames in double quotes, but epic doesn't
# decode these requests correctly.
#
# What this script does is convert these requests to a form
# that epic normally can handle.
#
on #^ctcp_request 0 "% % DCC \\[SEND ACCEPT\\] *\"* *\"*" {
        @ :ll = before(\\" $2-)
        @ :mm = after(\\" $2-)
        @ :mm = before(-1 \\" $mm)
        @ :mm = urlencode($mm)
        @ :rr = after(-1 \\" $2-)
        pretend :$0!$userhost() PRIVMSG $1 :$chr(1)$ll$mm$rr$chr(1)
}
