mIRC Home    About    Download    Register    News    Help

Print Thread
#223412 23/07/10 12:46 PM
Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
Code:
on *:join:#:{ 
  .write $qt($scriptdirtracker.txt) ( $time(HH:nn:ss) on $adate ) - $address - $nick 
} 
on *:text:!find*:*:{ 
  find $nick $2 
} 
alias find { 
  if !$2 {    .msg $1 Usage !find <nick>  } 
  else { 
    if !$read($qt($scriptdirtracker.txt),w,$+(*,$2)) { 
      .msg $1 No matches for $2 found 
    } 
    else { 
      var %a = 1, %b = $lines($qt($scriptdirtracker.txt)), %match 
      while %a <= %b { 
        inc %match 
        .timer 1 %match msg $1 $read($qt($scriptdirtracker.txt),w,$+(*,$2),%a) 
        %a = $readn 
        inc %a 
      } 
    } 
  } 
} 


@i paste that in my remote but whenever i type !find <nick> my iRC gets hang so that i constrained myself to quit the iRC..i dnt know what is the problem on that..

so, can u guys edit it? so that i can use that code. thnx.. if u can make it to hsh table .ini file to make it perfect go ahead sir..i realy need a help.. smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I recognize this code as one that I wrote and tested on several networks and channels with no problems.

I suggested to the OP that they should make sure that it is this code that is causing the freezing and not something else, however, after checking the original post, I don't see anything that states that they did make that check.

Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
sir ,as what ive said, when i !find <nick> sir my iRC gets Hang.. i Download new iRC but still hanging.. dont knw why..

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Downloading/installing a new version of mIRC will not help this situation if you re-install all of the same scripts.

When you get a hang, press Ctrl + Break/Pause and then look in your status window for a line that shows the name of the script and the line number that the break stopped.

As I believe I noted, a large file will take a while to search.

Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
russelB, what about if no alias find.? can u do it sir?. thnx.. remove the alias command sir.

Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
Hellow?. my server is irc.pldtplay.com you can test that script from there. please reply. thnx.. it's hanging.

Joined: Aug 2010
Posts: 134
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
If your mIRC freezes, press Ctrl-Break (several times if needed).

Then check your status window. It should display which line it broke on, which then tells you where to look further.

In addition, you mention that it freezes when YOU enter !find, but this script only triggers when other people enter !find.


Learning something new every day.
Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
i already did that sir.. when i ctrl+break,, all those ip and nicks save in tracker.txt ,will show all in my irc window and i can't stop it. try it in server irc.pldtplay.com

Joined: Aug 2010
Posts: 134
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
Originally Posted By: KenJiken
i already did that sir.. when i ctrl+break,, all those ip and nicks save in tracker.txt ,will show all in my irc window and i can't stop it. try it in server irc.pldtplay.com


When you use Ctrl-Break, it says in the Status Window what line the script broke at. It looks something like:

* Break: command halted (line 34, aliases.mrc)

Copy that line and paste it here.

Then look for that line in your scripts, and copy the entire routine of code around it, and paste it here as well. Please specify which line matches with the line in the error.


Learning something new every day.
Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
ow i see.. the problem is, when i !find <nick> my irc BOT is hanging and when i ctrl-break i can't see what line is broke in my window status. cauze when i click my Window status my irc Already Not responding. -,-

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Keep clicking Ctrl-Break on your bot until it stops freezing. You will then be able to see the message. You sometimes have to click it a few times to get the freeze to stop.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
Originally Posted By: Riamus2
Keep clicking Ctrl-Break on your bot until it stops freezing. You will then be able to see the message. You sometimes have to click it a few times to get the freeze to stop.

ow.. lemme try.

Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
this is the break code sir...

* Break: command halted (line 17, remote.ini)

this code. -> while %a <= %b {

hope u can fix sir.. thnx..

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Please post a few more lines. The format of that line looks correct, but we need to see a few lines before and after it.

As that is line 17, I'm going to suggest that you find the line that (probably) has inc %a on it
Then post from line 15 to that line (what ever line number it is).

This will give us the entire loop to work with to try to find why it's not working correctly.

P.S.: line 17 from the original code is the .timer line, thus the code has been altered.

Last edited by RusselB; 12/09/10 07:29 AM.
Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
i post in very top of the remote 1-23 lines, the -->> " while %a <= %b { " is in Line 15 but still not working, said

* Break: command halted (line 15, remote.ini)
and
* /msg: insufficient parameters

i also transfer the " while %a <= %b {" to Line 19 but still won't work.. i noticed that this "while %a <= %b { " is the problem.. this is weird huh.-.-

Last edited by KenJiken; 13/09/10 01:23 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You can't just move a line from one location to another.
Most (if not all) of the time, a line is in a certain location in the script because it needs to be in that location for the rest of the script to work.

The script I was referring to when I said that the line 17 was the timer line, is the code you posted earlier.
Specifically,
Code:
on *:join:#:{ 
  .write $qt($scriptdirtracker.txt) ( $time(HH:nn:ss) on $adate ) - $address - $nick 
} 
on *:text:!find*:*:{ 
  find $nick $2 
} 
alias find { 
  if !$2 {    .msg $1 Usage !find <nick>  } 
  else { 
    if !$read($qt($scriptdirtracker.txt),w,$+(*,$2)) { 
      .msg $1 No matches for $2 found 
    } 
    else { 
      var %a = 1, %b = $lines($qt($scriptdirtracker.txt)), %match 
      while %a <= %b { 
        inc %match 
        .timer 1 %match msg $1 $read($qt($scriptdirtracker.txt),w,$+(*,$2),%a) 
        %a = $readn 
        inc %a 
      } 
    } 
  } 
} 

which makes line 17, which is the line you stated was the break line
Code:
.timer 1 %match msg $1 $read($qt($scriptdirtracker.txt),w,$+(*,$2),%a) 


If you have moved, added or removed lines in regards to the code, then we need to have you post the actual code you are currently using.
Having the correct error/break information is no good if we don't have the correct code.

Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
this is what im using now.


Code:
on *:join:#:{ 
  .write $qt($scriptdirtracker.txt) ( $time(HH:nn:ss) on $adate ) - $address - $nick 
}
on *:text:!find*:#:{ 
  find $nick $2
} 
alias find { 
  if !$2 {    .notice $1 Usage !find <nick>  } 
  else { 
    if !$read($qt($scriptdirtracker.txt),w,$+(*,$2)) { 
      .notice $1 No matches for $2 found 
    } 
    else { 
      var %a = 1, %b = $lines($qt($scriptdirtracker.txt)), %match = 0
      while %a <= %b { 
        inc %match 
        .timer 1 %match msg $1 $read($qt($scriptdirtracker.txt),w,$+(*,$2),%a) 
        ;%a = $readn 
        inc %a 
      } 
    } 
  } 
}  


@PuNktured change the "%a = $readn" he add a ";".. ";%a = $readn" .. and this ->
Quote:
var %a = 1, %b = $lines($qt($scriptdirtracker.txt)), %match


he add a - = 0 in end of it.

Quote:
var %a = 1, %b = $lines($qt($scriptdirtracker.txt)), %match = 0


and still this code has a Break issue. -> while %a <= %b { in Line 15.
but still won't work..

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
hmmm.. ok, since that didn't work (though I don't understand why not), give this a try. It shouldn't lock up, as it uses mIRC's /filter command to get the output, rather than looping.
Code:
on *:join:#:{ 
  .write $qt($scriptdirtracker.txt) ( $time(HH:nn:ss) on $adate ) - $address - $nick 
}
on *:text:!find*:#:{ 
  find $nick $2
} 
alias -l find { 
  if !$2 {    .notice $1 Usage !find <nick>  } 
  else { 
    if !$read($qt($scriptdirtracker.txt),w,$+(*,$2)) { 
      .notice $1 No matches for $2 found 
    } 
    else { 
      var %infile = $qt($scriptdirtracker.txt), %outfile = $qt($scriptdirtracker.tmp)
      filter -fft 9 32 %infile %outfile $+(*,$2)
      .play $nick %outfile
    }
  }  
}
on *:playend:{
  if %outfile && $filename == %outfile {
    .remove %outfile
  }
}

Joined: Jul 2010
Posts: 17
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2010
Posts: 17
how to use that /filter said - * /filter: invalid window and * /filter: invalid parameters

and when i !find [nick] , the results is okei but when i !find again different nick the results is like this,

--------

!find mico

testing : ( 10:36:24 on 09/11/2010 ) - PLDTPlaySS@824B2E80.8ED7F401.24DAC449.IP - mico
testing : ( 10:42:19 on 09/11/2010 ) - PLDTPlaySS@824B2E80.8ED7F401.24DAC449.IP - mico

but when i do !find again Other names , its

-------

!find jayjay

testing : ( 10:36:24 on 09/11/2010 ) - PLDTPlaySS@824B2E80.8ED7F401.24DAC449.IP - mico
testing : ( 10:42:19 on 09/11/2010 ) - PLDTPlaySS@824B2E80.8ED7F401.24DAC449.IP - mico
testing : ( 11:24:14 on 09/12/2010 ) - PLDTPlaySS@202.201.173.137 - jayjay
testing : ( 10:36:35 on 09/11/2010 ) - jay2@221.1.104.51 - jayjay
testing : ( 10:46:14 on 09/11/2010 ) - jay2@221.1.104.51 - jayjay

-------

which means the Bot is retrieve those nicks that i already !find he PM again.. try it sir..
and what's the tracker.tmp file sir? i can't open..

Last edited by KenJiken; 14/09/10 01:56 AM.

Link Copied to Clipboard