mIRC Home    About    Download    Register    News    Help

Topic Options
#495 - 09/12/02 07:39 AM Show Clone Nick and Total User in the Join Line
aZnLupin Offline
Babel fish

Registered: 09/12/02
Posts: 76
Loc: Vietnam
Can you help me, i need show clone nick and total user of channel in the join line of person who joined to my channel like
* Joins: Nick (~ident@host) - Clones: Nick1 Nick2 Nick3 [4] - Total: 108 user of #mychannel
Pls help me out

Top
#496 - 09/12/02 08:07 AM Re: Show Clone Nick and Total User in the Join Line
Merlin Offline
Vogon poet

Registered: 08/12/02
Posts: 164
Loc: Germany
Ok, I replaced my previous code examples (Thanks Hammer)
Code:
  
ON ^*:JOIN:#:{
  IF ($ialchan($wildsite,$chan,0) > 1) {
    VAR %string = * Joins: $nick ( $+ $gettok($fulladdress,2,33) $+ ) - Clones:
    VAR %i = 1
    WHILE ($ialchan($wildsite,$chan,%i)) {
      IF ($ialchan($wildsite,$chan,%i).nick != $nick) { %string = %string $ialchan($wildsite,$chan,0).nick }
      INC %i
    }
    %string = %string - Total users in $chan $+ : $nick($chan,0)
    echo $colour(join) -qlbfi2 $chan %string
    haltdef
  }
}

Remark: This forum usually is trying to help you with a problem so you can learn from it. Our solutions are just helping you to find the right direction smile


Edited by Merlin (09/12/02 09:43 AM)
_________________________
DALnet: #HelpDesk, #mIRC, #MISHScript - Undernet: #mIRC, #mIRC-Scripts

Top
#497 - 09/12/02 08:41 AM Re: Show Clone Nick and Total User in the Join Line
aZnLupin Offline
Babel fish

Registered: 09/12/02
Posts: 76
Loc: Vietnam
Thx 4 help but i need show clone check in the Join Line, I mean:
* Joins: Nick (~ident@host) - Clones: Nick2 Nick3 Nick4 Nick5 [5] - Total: 108 user in #mychannel

Top
#498 - 09/12/02 04:23 PM Re: Show Clone Nick and Total User in the Join Line
wshs Offline
Babel fish

Registered: 07/12/02
Posts: 56
Code:
alias clonescan {
  var %chan = $iif($left($1,1) == $chr(35),$1,#), %type = $iif($2,$2,$iif($left($1,1) == -,$1)), %tclones = 0
  if (%chan !ischan) {
    echo $colour(info) -a * Please enter a valid channel, ie. a channel that you are in.
    return
  }
  if ($chan(%chan).ial != $true) {
    .ial on
    echo $colour(info) -a * Updating IAL for %chan
    set %cs.chan $addtok(%cs.chan,%chan,32)
    raw -q WHO %chan 
    set %cs.type %type 
    return
  }
  else {
    if ($hget(cs)) { hfree cs }
    hmake cs $nick(%chan,0)
    var %i = 1, %ticks = $ticks, %clones
    while ($nick(%chan,%i)) { hadd cs $address($nick(%chan,%i),2) $hget(cs,$address($nick(%chan,%i),2)) $iif($numtok($hget(cs,$address($nick(%chan,%i),2)),38) > 0,$chr(38)) $nick(%chan,%i) | inc %i }
    var %o = 1
    echo -a -
    echo -a * Clone Scan in %chan
  }
  while ($hget(cs,%o).item) {
    if ($numtok($hget(cs,$hget(cs,%o).item),38) > 1) {
      echo -a $numtok($hget(cs,$hget(cs,%o).item),38) => $hget(cs,%o).item $+ : $hget(cs,$hget(cs,%o).item)
      inc %tclones $numtok($hget(cs,$hget(cs,%o).item),38)
      inc %clones
    }
    inc %o
  }
  echo -a * Done. $iif(%clones > 0,%clones,no) group $+ $iif(%clones > 1,s) of clones found, for a grand total of %tclones clones. (done: $+ $calc($ticks - %ticks) $+ ms)
  echo -a -
  hfree cs
}


I don't recall who, but I got this from someone in #helpdesk at DALnet. It returns the results in the following format:

* Clone Scan in #channel
x => *!*@host: nick & nick & ....
* Done. x groups of clones found, for a grand total of x clones. (done:xms)

...where the bold text represents variable data which depends on the channel and clones involved. You can use this to help you do what you want.
_________________________
Acquire. Analyze. Adapt.

Top
#499 - 11/12/02 01:18 PM Re: Show Clone Nick and Total User in the Join Line
aZnLupin Offline
Babel fish

Registered: 09/12/02
Posts: 76
Loc: Vietnam
* Joins: hoangvu (~v@6b45bb2.12ed360d.24624475.7795dbeX) - Clones: 5 5 5 5 - Total users in #lobby: 274

What wrong with your help ??? pls check it

Top
#500 - 11/12/02 04:24 PM Re: Show Clone Nick and Total User in the Join Line
Hammer Offline
Hoopy frood

Registered: 07/12/02
Posts: 1321
Loc: Georgia, USA
Code:
     IF ($ialchan($wildsite,$chan,%i).nick != $nick) { %string = %string $ialchan($wildsite,$chan,%i).nick }


The IF had $ialchan($wildsite,$chan,0).nick rather than $ialchan($wildsite,$chan,%i).nick, which is what it should be.
_________________________
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Top