mIRC Home    About    Download    Register    News    Help

Print Thread
Problem with on *:TEXT:*:#: { /trace $nick #199159 09/05/08 09:59 PM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
I have an ON TEXT for the channel so when $nick says something they get traced. If more than one person is talking, several /trace $nick are happening. The problem is that they overlap each other and if there is any server lag for the /trace $nick then the wrong variables get passed.

I.E. John and Steve are talking on the room. John says something and gets /trace'd first then Steve says something and gets /trace'd second. Although John said something first and got /trace'd first, Steve's /trace info came back first, due to server lag from John's /trace. So the variables for John's /trace now have the variables for Steve's /trace, which is wrong.

As a safety I 'set %nicktext $nick' before the '/trace $nick' in the ON JOIN. Then in the 'if TEXT' under the RAW for /trace I compare %nicktext to %nick (%nick of the userhost from the /trace). If (%nicktext == %nick) then the userhost gets checked against the FILE; if $null then it gets saved to the FILE. If (%nicktext != %nick) then re /trace %nickiptext. This sometimes can loop if several people are talking on the channel, until (%nicktext == %nick) again.

So is there any way to use some some kind of temp variables to prevent this?


I registered; you should too.
Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: AWEstun] #199162 09/05/08 11:41 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Based on what I was able to figure out from what you did post, the following worked on 3 networks that I can use the /trace command on
Code:
on *:text:*:#:{
  if $hget(Trace,0) {
    .enable #trace
    .trace $nick
  }
}
#trace off
raw 200:*:{
  .hadd -m Trace $4 $addtok($hget(Trace,$4),$5,32)
  haltdef
}
raw 204:*:{
  .hadd -m Trace $4 $addtok($hget(Trace,$4),$5,32)
  .disable #trace
  haltdef
}
#trace end
raw 008:*:{
  .hadd -m Trace 0 $iif(O isincs $usermode || C isincs $v2 || a isin $v2 || N isincs $v2,$true,$false)
  haltdef
}
on *:start:{
  if !$hget(Trace) {    .hmake Trace 100  }
  if $isfile($qt($scriptdirTrace.hsh)) {    .hload Trace $qt($scriptdirTrace.hsh)  }
  .hadd -m Trace 0 $iif(O isincs $usermode || C isincs $v2 || a isin $v2 || N isincs $v2,$true,$false)
}
on *:exit:{
  .hsave Trace $qt($scriptdirTrace.hsh)
}
on *:disconnect:{
  .hsave Trace $qt($scriptdirTrace.hsh)
}


If you'll post the actual code for that event, it would help allow me to either alter your code to work with the format that mine is using, or alter my code to work with the format that yours is using.

Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: RusselB] #199164 10/05/08 04:26 AM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Can you tell me what the 3 different RAW's are and what they do.


I registered; you should too.
Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: AWEstun] #199169 10/05/08 05:45 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
raw 200 & 204 were the only two that I found being returned when using the /trace command. These may be different for your network, so check the returns of the /trace command by using /debug

raw 008 is returned when a person's usermodes are changed (eg: using /oper or //mode $me -o )

Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: RusselB] #199172 10/05/08 07:00 AM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
What are the values of $4 ad $5, that are being added to the Trace table?

Is $4 the screenname, item?

Is $5 the userhost, data?


I registered; you should too.
Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: AWEstun] #199176 10/05/08 12:02 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Test it yourself by placing an echo line in that part of the script...

echo -a 4= $4 - 5= $5


Invision Support
#Invision on irc.irchighway.net
Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: Riamus2] #199177 10/05/08 12:28 PM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
The reason I asked was it doesn't work with this server since it's modified. If you tell me, then I can find out which RAW's I need to change to.

There are no op's, sop's, or voice on this server. Only KILL.


I registered; you should too.
Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: AWEstun] #199185 10/05/08 01:21 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Here's a copy of the debug window from a sample test. Note that me is for my nick and nick is the nick being traced
Quote:
-> Schizoid.XeroMem.Com TRACE nick
<- :Schizoid.XeroMem.Com 200 me Link Unreal3.2.7 nick Xanth.XeroMem.Com
<- :Xanth.XeroMem.Com 200 me Link Unreal3.2.7 nick :DeathStar.XeroMem.Com
<- :DeathStar.XeroMem.Com 205 me User clients nick [72.169.86.210] :1
-> Schizoid.XeroMem.Com TRACE me
<- :Schizoid.XeroMem.Com 204 me Operator clients me [ServicesAdmin.XeroMem.Com] 0


Re: Problem with on *:TEXT:*:#: { /trace $nick [Re: AWEstun] #199295 12/05/08 02:47 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
If you need to find out the RAW number and various other types of things, type:

/debug @debug

Then perform whatever command you want to perform. It will show what is sent to and from the server.


Invision Support
#Invision on irc.irchighway.net