mIRC Home    About    Download    Register    News    Help

Print Thread
DCC script #107916 14/01/05 08:30 PM
Joined: Jan 2005
Posts: 25
L
LordoftheX Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
ok, what I am trying to accomplish is this.

I am set on auto-get DCC of a certain filename ( *.dxm) and I want it where, when the file is sent, the script looks at a certain part of the file name, and puts that part down in a hash table

44file.dxm <- I want it to record the 44 part in the hash table

Re: DCC script #107917 14/01/05 09:02 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
this trips off when you get sent the file, Although it might be better if u really did this when you have recieved the file intacked.

Code:
ctcp *:DCC SEND *file.dxm *:?:{
  if (*file.dxm iswm $nopath($filename)) {
    var %number = $left($nopath($filename),-8)
    .... jam %number into your hash table here how ever you want to ...
  }
}

^^ thats untested but looks right, i double check the filename becuase im kinda open matching for filename, in the On event, ie someone might send a file called "big dump of all file.dxm files in text format.txt" and it would match, but the later check on $filename would fail.

this might be what you want really, it goes off after the file is recieved.

Code:
on *:FILERCVD:*file.dxm:{
  var %number = $left($nopath($filename),-8)
  .... jam %number into your hash table here how ever you want to ...
}

Re: DCC script #107918 14/01/05 10:23 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
on $*:filercvd:/^(\d+)file\.dxm$/:{
  echo -a hadd table item data here using--&gt; $regml(1)
}

Last edited by Iori; 14/01/05 11:29 PM.
Re: DCC script #107919 14/01/05 11:21 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Don't forget to escape the . dot Iori.

I'm sorry, it seems I always catch these little things when you post something, if you find it annoying, next time I won't post, let me know.

Cya


Gone.
Re: DCC script #107920 14/01/05 11:28 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Good point, forgot the dot laugh
In this instance it wouldn't really matter though because ".dxm" = 1 char followed by dxm at the end of the filename.