mIRC Home    About    Download    Register    News    Help

Print Thread
#213029 15/06/09 04:02 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In the DCC Options, there is a button to Ignore all in the On Send Request section.
Is there a command line, or a scriptable version of this same sequence, and one to reverse the option (same as setting the Show Get Dialog option in the DCC options dialog)?

I looked in the help file, and the closest that I could find was /dcc ignore [on|off|accept|ignore]

RusselB #213030 15/06/09 05:25 AM
Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Edit: This can probably be done with sendkeys/$COM, but that's beyond my ability to help you.

Re-Edit: The Code below will sort of do what you want. Is a bit of a hack, but it will ignore any DCC send that is sent to you. However, it will ALSO ignore DCC chat requests as well. I suspect with some tinkering, this could be workable. You'd have to ignore the user for DCC's for a second or two, then unignore them. Not optimal, but it works.

Debug gives me this when I get a DCC send request

<- :Thrull14!Thrull@ThrullX.users.undernet.org NOTICE Thrull :DCC Send Clocks.txt (IP DELETED)
<- :Thrull14!Thrull@ThrullX.users.undernet.org PRIVMSG Thrull :DCC SEND Clocks.txt 1222832016 1024 850

From there we get:

Code:
on 1:NOTICE:*:?: { if dcc send == $1-2 { ignore -du5 $nick } }


Alter as you see fit.

Last Edit:

This is a script someone created to deal with the DCC exploit that came out a couple of years ago. If you figure out what's its doing, you could probably use it as a base for new code.

Code:
on *:start:{
  scid -a RawWin
  ; Remove flood protection variables that weren't cleaned before mIRC exited
  unset %exploit
  unset %exploit.*
  echo $color(info) -ae *** Raw window/exploit blocking script loaded.
}

alias RawWin {
  window -ek0mnv $+(@Raw-, $cid)
  .debug -ipt $+(@Raw-, $cid) DCCWorkaround
  window -a $+(@Raw-, $cid)
}

on ^*:LOGON:*:{
  window -ek0mv $+(@Raw-, $cid)
  .debug -inpt $+(@Raw-, $cid) DCCWorkaround
}

menu @Raw-* {
  Save past raw text to log file:{
    var %i = 1, %file = $sfile($logdir $+ *.log, Save As, Save)
    %file = $+($chr(34), $iif($chr(46) isin %file, %file, %file $+ .log), $chr(34))
    if (%file != $null) {
      while (%i <= $line($active, 0)) {
        write %file $line($active, %i)
        inc %i
      }
    }
  }
}

on *:INPUT:@Raw-*:{
  if ($left($gettok($1-, 1 ,32), 1) != $chr(47)) {
    scid $cid .raw $1-
    haltdef
  }
}

on *:CLOSE:@Raw-*:{
  ; Continue to block exploits without using a window or writing to a file.  /rawwin will reopen the window.
  .debug -i NUL DCCWorkaround
}

alias DCCWorkaround {
  if ($regex($1, /^<- :([^!]*)![^@]*@[^ ]*\s*PRIVMSG\s*(\S*)\s*:\001\s*DCC\s*(SEND|RESUME).*"(?:[^" ]*\s){32}.*$/i)) {
    var %nick = $regml(1), %target = $regml(2), %type = $regml(3)
    echo 4 -ae *** %nick sent a DCC %type exploit to %target
    .ignore -du2 %nick
    ; Protect against flooding from botnets
    inc -z %exploit 2
    if ($($+(%, exploit., %nick), 2) != stop) {
      ; Protect against flooding from one nick
      set -u30 $+(%, exploit., %nick) stop
      if (%exploit < 5) {
        whois %nick
        notice %nick Please do not exploit me.
      }
    }
  }
  return $1-
}

Last edited by Thrull; 15/06/09 05:51 AM.

Yar

Link Copied to Clipboard