mIRC Home    About    Download    Register    News    Help

Print Thread
some help plz #193917 27/01/08 09:22 AM
Joined: Jan 2008
Posts: 4
L
lefter0v1 Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Jan 2008
Posts: 4
i try to make simple script, who execute:

1.when i post !list , script will scan dir and write in fail and then send me via dcc.

Code:
//echo -ace info2 * Found $findfile($scriptdir/logs,*,0,echo -ac info $1-) file(s)


2. when i post !get file1.log ,script will send me file1.log
maybe something like this:
Code:
ON *:TEXT:!get*:*: {
  ........................
  if ($exists(%log)) {
    dcc send $nick %log
  }


any can help me?

Last edited by lefter0v1; 27/01/08 09:22 AM.
Re: some help plz [Re: lefter0v1] #193922 27/01/08 11:36 AM
Joined: Oct 2007
Posts: 36
A
asmodeo Offline
Ameglian cow
Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Hi lefter0v1,

Code:
On *:TEXT:*:#myroom:{
;==== 1.-
   if $1 == !file && $2 != $null {
     write -c ListLog.txt info2 * Found $findfile($scriptdir/logs,*,0,write ListLog.txt info $1-) file(s)
     .timer 1 2 /dcc send $nick ListLog.txt
     .notice $nick Sending File ListLog.txt...
   }
;==== 2.-
   if $1 == !get && $3 != $null {
     if $findfile($mircdir,$2,0) == 1 {
       dcc send $nick $getdir($2) $+ $2
       .notice $nick Sending File $2 ...
       }
     else { .notice $nick File $2 Dont Found. }
   }
}  


Bye! smile


`.Jk f ll r꧅MtR f Nnꔸ.`
Re: some help plz [Re: asmodeo] #194097 29/01/08 10:20 AM
Joined: Jan 2008
Posts: 4
L
lefter0v1 Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Jan 2008
Posts: 4
thanks a lot for help,but your code its not work:(
can you help me, plz!

Re: some help plz [Re: lefter0v1] #194113 29/01/08 05:56 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
did you change #myroom to the channel you are on? and remember that you cant trigger the code by type it your self, you need to ether make a friend type it, or connect a second mirc and trigger it from there.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: some help plz [Re: sparta] #194123 29/01/08 08:22 PM
Joined: Jan 2008
Posts: 4
L
lefter0v1 Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Jan 2008
Posts: 4
Originally Posted By: sparta
did you change #myroom to the channel you are on? and remember that you cant trigger the code by type it your self, you need to ether make a friend type it, or connect a second mirc and trigger it from there.


yes,i change channel, and i connect with other mirc but isnt work,
i think that problem is here:
Code:
  if $1 == !file && $2 != $null {
     write -c ListLog.txt info2 * Found $findfile($scriptdir/logs,*,0,write ListLog.txt info $1-) file(s)


don`t send me any problem..,any ideas?

Re: some help plz [Re: lefter0v1] #194159 30/01/08 05:45 PM
Joined: Jan 2008
Posts: 4
L
lefter0v1 Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Jan 2008
Posts: 4
i fix code to:

Code:
On *:TEXT:!file:#abcdf:{
     writeini logs.ini Found $findfile($scriptdir/logs,*,0,write logs.ini $1-) file(s)
     .timer 1 2 /dcc send $nick logs.ini
     .notice $nick Sending File logs.ini...
  }

   On *:TEXT:!get:#abcdf:{
     if $findfile($scriptdir/logs,$2,0) == 1 {
       dcc send $nick $getdir($2) $+ $2
       .notice $nick Sending File $2 ...
       }
     else { .notice $nick File $2 Dont Found. }
}


first phase works fine, when i post !file, but how i make to send me specific file,description in logs.ini ?
help me with any idea`s,tnx!