mIRC Home    About    Download    Register    News    Help

Print Thread
#180371 08/07/07 04:17 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I using /who for every channel i join, and i need the info for my channel theme/nicklist, how ever i cant figure out the best way to do the /who command, i know i have been asking about this befor, how ever the timer wasnt a good solution, so any other ideas on how to get the info? cos if i i join 1 channel, then the /who command arent any problem, how ever if i join 5+ channels, then i get a awful lag, so ideas please? im totaly stuck here..

And plz, if you paste any code, explain what it does. smile

thnx in advance.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Why wasnt a timer a good solution?

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you want to /who every channel you join, and you don't want them to happen all at once, your only option is to use timers. I don't see why several /who commands would lag you so badly, unless your RAW 352 code is bloated (slow).

Here is my code for reading /who replies and it is quite similar to what you likely need to do. (It's still in progress). Obviously, some of the code doesn't apply to your situation.

Code:
;### /WHO REPLY ###
RAW 352:*:{
  if (!$_hget(hash.connect)) return
  ;
  ;<me> <channel> <ident> <host> <server> <nick> <HGr*@+> <hops> <Real Name>
  ; 1    2         3       4      5        6      7       8      9
  echo -st RAW $numeric $+ : $1-

  if ($comchan($6,0) > 0) {
    _hadd $+(nick.,$6,.ident) $3
    _hadd $+(nick.,$6,.host) $4
    _hadd $+(nick.,$6,.server) $5
    _hadd $+(nick.,$6,.nick) $6
    if (* isin $7) _hadd $+(nick.,$6,.oper) 1
    else _hdel $+(nick.,$6,.oper)
    if (G isincs $7) _hadd $+(nick.,$6,.away) 1
    else _hdel $+(nick.,$6,.away)
    _hadd $+(nick.,$6,.hops) $8
    _hadd $+(nick.,$6,.name) $9-
  }

  if ($_hget($+(joinscan.,$6))) haltdef
  elseif ($_hget($+(joinscan.,$2))) haltdef 
}


Ideally, your code should have the high volume parts (scanning entire channels on join) at the top, and the low volume parts (displaying /who replies to windows, etc) at the bottom, separated by a /halt or /return.

-genius_at_work

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$_hget / /_hadd ?

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I use this to cline the nick's in the channel:
Code:
raw 352:*: {
  if ($me !ison $2) { return }
  if ($7 == H) && ( $6 $+ !*@* !isignore ) { cline $clinecol(no) $2 $6 }
  if (+ isin $7) && ( $6 $+ !*@* !isignore ) { cline $clinecol(vo) $2 $6 }
  if (@ isin $7) && ( $6 $+ !*@* !isignore ) { cline $clinecol(op) $2 $6 }
  if (* isin $7) && ( $6 $+ !*@* !isignore ) { cline $clinecol(po) $2 $6 }
  if ( $6 isnotify ) && ( $6 $+ !*@* !isignore ) { cline $clinecol(.no) $2 $6 }
  if (G isin $7) && ( $6 $+ !*@* !isignore ) && (@ !isin $7) && (* isin $7) { cline $clinecol(aw) $2 $6 }
  cline $clinecol(me) $2 $me
  haltdef
}

and i cant see why this one should be so slow? all it does is add colors to the nicks in the nicklist, and if you send a /who #channel to 5 channels, then the script get a lag, and it will take several seconds befor i'm able to DCC a bot, /op someone and kick someone, thats the problem i trying to solve, cos when i join my channels, then i want to DCC my bots, and after that be able to take ops from them, how ever i as i said befor i get lag.

;--------- Edit

$clinecol()

just return the colors from a alias, so shouldent slow it down. and i know it should be "else if" but havent got that far yet, still trying to solve how to gather the result when i join.

Last edited by sparta; 08/07/07 05:40 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Custom aliases that eliminate the need for <hashname> in every command. No processing of any kind.

@OP
Have you tried it using elseif? Or have you tried ;commenting some/all of the if statements to see if the lag disappears? If you have a blank RAW 352 and you still have lag, then the problem lies elsewhere, possibly in your connection/hardware speed.

You could also try enabling /debug onCONNECT to see if your script is only sending the /who commands that you think it is sending and no extras.

-genius_at_work

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I tested it without anything, just sent the /who $chan event, still same lag, and no, i havent tested it with else if, but i will do that now, also look at debug and see what that gives me..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard