How to block DCC transfers of certain files on KVIRC reddit / irc ---------------------------------------------------------------------- 007ace · 2021-07-05 18:32 \*\*\*SOLVED\*\*\* I remember being able to do something similar in MiRC. The closest I can see is in 'General\\Media Types' I can tell it to put files in folders as they download. I was hoping to deny DCC transfers of all \*.exe files or something along those lines. Am I missing something? ---------------------------------------------------------------------- Gods_of_Sourdough · 2021-07-06 02:43 Don't you have to issue a specific command to accept the DCC transfer? Meaning that, just don't use that command when someone's trying to send you an exe. ---------------------------------------------------------------------- 007ace · 2021-07-06 03:52 I have auto accept turned on, this is more of a subscription service, and on occasion I get sent files that dont really fit, and arent compatible. Its not a major issue, but it is a waste of bandwidth to come in and delete files I accepted overnight. Most of the time I do request specific files, and that isnt an issue. Its just on the subscription stuff. ---------------------------------------------------------------------- RoLoLoLoLo · 2021-07-06 15:29 Not from a simple option in the settings dialog, but it should be possible with a bit KV scripting. Event handler for OnDCCFileTransferBegin, check the filename with $dcc.remoteFileName and if it ends on .exe, use dcc.abort to end the DCC session. ---------------------------------------------------------------------- 007ace · 2021-07-06 18:26 Awesome. Thanks, that gives me something to tinker with. I appreciate it. ---------------------------------------------------------------------- 007ace · 2021-07-10 22:04 Not to bug you, but how do I find out if the filename has exe in it? Ive been trying with some basic if else statements, but they never see the filename itself, they always fail. This is what Ive got so far. Any ideas? ​ if($dcc.remoteFileName($0) .= "*.exe") echo "$dcc.remoteFileName($0) is EXE file" else echo "$dcc.remoteFileName($0) is not EXE file"; ---------------------------------------------------------------------- RoLoLoLoLo · 2021-07-10 22:12 Have you tried this? if($str.match("*.exe", $dcc.remoteFileName($0), e)) { echo $dcc.remoteFileName($0) is EXE file } else { echo $dcc.remoteFileName($0) is not EXE file } ---------------------------------------------------------------------- 007ace · 2021-07-10 22:58 Thanks u/RoLoLoLoLo you really sent me off in the right direction. This is the end result. It cancels any files that contain HEVC since none of my players get along with that format. In Event Editor, OnDCCFileTransferBegin I made a new handler with this bit of code in it.$0 is just the DCC ID number and you could have anything, not just \*hevc\* as a flag. It isnt case sensitive but could be if you needed. Heres the [webpage with the instructions for str.match](http://www.kvirc.net/doc/fnc_str.match.html).Honestly I spent more time making if/then/else statements before finding a command that used language instead of integers. %d=$dcc.remoteFileName($0) echo "%d Has been added to File Transfers" #if($str.match(hevc,%d))echo "%d is a 265 file" #This is just my test line to make sure things are working properly if($str.match(hevc,%d))dcc.abort $0 ---------------------------------------------------------------------- RoLoLoLoLo · 2021-07-10 23:03 Glad that it worked out.