#
# 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)
}

#
# This is a new feature in epic which conflicts with this script.  You may want
# to not load this script and leave this feature on instead.
#
set dcc_dequote_filenames off
