on *:CHAT:*:{
  if ($1 == !list) {
    unset %proba %number
    .msg =$nick Directory  $+ %dir $+ 
    :start
    inc %number
    inc %proba
    set %nam $findfile(%dir,*.*,0)
    if (%proba =< $calc(%nam + 1)) goto end
    set %file $remove($findfile(%dir,*.*,%proba),%dir)
    .msg =$nick ( $+ %number $+ ) $remove($findfile(%dir,*.*,%proba),%dir) [[ $+ $file(%dir $+ %file).size $+ ]]
    goto start
    :end
    .msg =$nick End Of List
  }
  if ($1 == !search) {
    unset %proba %number
    :start
    inc %number
    inc %proba
    set %nam $findfile(%dir,*.*,0)
    if (%proba =< $calc(%nam + 1)) goto end
    set %file $remove($findfile(%dir,*.*,%proba),%dir)
    if (* $+ $2 $+ * iswm %file) {
      .msg =$nick Found: $remove($findfile(%dir,*.*,%proba),%dir) Size: $file(%dir $+ %file).size
    }
    goto start
    :end
  }
  if ($1 == !get) {
    if ($2 == $null) { .msg =$nick eg. !get /file.txt | return }
    if (C:\ isin $2-) { .msg =$nick eg. !get /file.txt | return }
    if ($file($2) != $null) { .msg =$nick eg. !get /file.txt | return }
    else { /dcc send -c $nick %dir $+ $2- | return }
  }
  if ($1 == !stats) {
    msg =$nick Uptime: $DURATION($CALC($TICKS / 1000)) Connections: $send(0) Chat: $chat(0)
    msg =$nick Transfer System written by codelibary.com
  }
  else /halt
}
on *!:OPEN:=:{
  set %dir C:\bot\download
  msg =$nick Uptime: $DURATION($CALC($TICKS / 1000)) Connections: $send(0) Chat: $chat(0)
  msg =$nick Transfer System written by codelibary.com
}
on *!:CLOSE:=:/close -c $nick
on *:FILESENT:*:/write dcc/sent.txt $filename to $nick $address
on *:SENDFAIL:*:/write dcc/error.txt $filename to $nick $address
Published in: mIRC
Download

Related snippets