mIRC Home    About    Download    Register    News    Help

Print Thread
#112467 24/02/05 05:24 AM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
I have a clone scanner that displays in a dialog window ( The clone scanner is not mine and i am taking NO credit for it! )
and i want to add some basic functions to it. I added an edit box that displays the nicks only of a selected group of clones and then with buttons i want to be able to whois, ping, notice, msg, kick, or ban. The problem is i want to be able to see these actions as i do them. For example when i ping them it shows the ping echo to status, same with notice msgs and msg. I cant get the whois to work at all. Heres what I added to it....
Code:
 on *:dialog:clonescanner:dclick:2: { 
  var %x = $gettok(%CSSC,3-,32) 
  var %t = $matchtok(%x,&,0,32)
  while (%t > 0) { 
    var %x = $remtok(%x,&,%t,32)
    dec %t 
  }
  .did -ra clonescanner 5 %x 
  .unset %CSSC
}  
on *:dialog:clonescanner:sclick:*: { 
  set %CSSC $did(2).seltext 
  if ($did == 10) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /whois $gettok($did(5),%n,32) $gettok($did(5),%n,32) 
      dec %n
    }
  }
  if ($did == 11) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ping $gettok($did(5),%n,32)  
      dec -c %n
    }
  }
  if ($did == 20) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      .notice $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Msg Me if there is a problem. %ac
      dec -c %n
    }
  }
  if ($did == 21) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      msg $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Msg Me if there is a problem. %ac
    }
  }
  if ($did == 22) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /query $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only...  %ac
      dec -c %n
    }
  }
  if ($did == 23) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /notice $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Final Warning!! %ac
      /msg $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Final Warning!! %ac
      dec -c %n
    }
  }
  if ($did == 30) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 31) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ban $gettok($did(5),%n,32)  |  /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 32) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ban -u600 $gettok($did(5),%n,32)  |  /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 33) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ban -u3600 $gettok($did(5),%n,32)  |  /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 40) {
    dialog -x clonescanner clonescanner
    /clonescan %ac 
  }
}
 

All i really have a problem with is the whois on multiple nicks giving me a return of "Server Load Too Heavy, Try Again" ... i imagine a timer is needed. ( It returns the first nick only )
And the actions when performed i need to echo to the $active channel so i can be certain that it was actually executed.
Thanks for the help!

#112468 24/02/05 05:27 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Where's the dialog?

#112469 24/02/05 05:32 AM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
lol.... i was avoidin that
Code:
 on *:load:if ($version >= 5.8) { echo $colour(info) -a * command: /clonescan [channel] [-a] } | else { echo $colour(info) -a * mirc version: $version - v5.8 needed, get newer mirc at www.mirc.co.uk, unloading.. | .unload -rs $script }
alias clonescan {
  var %chan = $iif($left($1,1) == $chr(35),$1,#), %type = $iif($2,$2,$iif($left($1,1) == -,$1)) | set %ac %chan
  if ($dialog(clonescanner) == $null) && (%type != -a) { dialog -m clonescanner clonescanner }
  if (%chan !ischan) {
    if (%type == -a) { echo $colour(info) -a * Please enter a valid channel, ie. a channel that you are in. | return }
    else { did -ra clonescanner 4 Please enter a valid channel, ie. a channel that you are in. | return }
  }
  if ($chan(%chan).ial != $true) {
    .ial on
    if (%type == -a) { echo $colour(info) -a * Updating IAL for %chan }
    else { did -ra clonescanner 4 Updating IAL for %chan $+ ... }
    set %cs.chan $addtok(%cs.chan,%chan,32) | raw -q WHO %chan | set %cs.type %type | return
  }
  else {
    if ($dialog(clonescanner)) { did -r clonescanner 2 | dialog -t clonescanner Clone Scanner - scanning %chan }
    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
    if (%type == -a) { echo -a - | echo -a * Clone Scan in %chan }
    while ($hget(cs,%o).item) {
      if ($numtok($hget(cs,$hget(cs,%o).item),38) > 1) {
        if (%type == -a) { echo -a $numtok($hget(cs,$hget(cs,%o).item),38) => $hget(cs,%o).item $+ : $hget(cs,$hget(cs,%o).item) }
        else { did -a clonescanner 2 $hget(cs,%o).item ( $+ $numtok($hget(cs,$hget(cs,%o).item),38) $+ ): $hget(cs,$hget(cs,%o).item) | did -z clonescanner 2 }
        inc %clones
      }
      inc %o
    }
    if (%type == -a) { echo -a * Done. $iif(%clones > 0,%clones,no) group $+ $iif(%clones > 1,s) of clones found. (done: $+ $calc($ticks - %ticks) $+ ms) | echo -a - }
    else { did -ra clonescanner 4 Done. $iif(%clones > 0,%clones,no) group $+ $iif(%clones > 1,s) of clones found. (done: $+ $calc($ticks - %ticks) $+ ms) }
    hfree cs
  }
}
raw 352:*:if ($istok(%cs.chan,$2,32)) { halt }
raw 315:*:if ($istok(%cs.chan,$2,32)) { set %cs.chan $remtok(%cs.chan,$2,1,32) | clonescan $2 %cs.type | unset %cs.type | halt }
menu channel {
  clone scanner:clonescan #
}

dialog clonescanner {
  title "Clone Scanner"
  size -1 -1 280 150
  option dbu
  button "", 1, 0 0 0 0, ok
  list 2, 2 2 276 93
  box "", 3, 2 87 276 12
  text "", 4, 5 91 170 7
  edit "",5,3 101 275 10
  button "Whois",10,5 115 40 10
  button "Ping",11,46 115 40 10
  button "Notice",20,5 126 40 10
  button "Msg",21,46 126 40 10
  button "Query",22,87 126 40 10
  button "Final Warn.",23,128 126 40 10
  button "Kick",30,5 137 40 10
  button "Ban",31,46 137 40 10
  button "Ban 10 min",32,87 137 40 10
  button "Ban Hour",33,128 137 40 10
  button "New Scan",40, 235 115 40 10
  button "Close",41,235 137 40 10,cancel

}

on *:dialog:clonescanner:dclick:2: { 
  var %x = $gettok(%CSSC,3-,32) 
  var %t = $matchtok(%x,&,0,32)
  while (%t > 0) { 
    var %x = $remtok(%x,&,%t,32)
    dec %t 
  }
  .did -ra clonescanner 5 %x 
  .unset %CSSC
}  
on *:dialog:clonescanner:sclick:*: { 
  set %CSSC $did(2).seltext 
  if ($did == 10) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /whois $gettok($did(5),%n,32) $gettok($did(5),%n,32) 
      dec %n
    }
  }
  if ($did == 11) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ping $gettok($did(5),%n,32)  
      dec -c %n
    }
  }
  if ($did == 20) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      .notice $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Msg Me if there is a problem. %ac
      dec -c %n
    }
  }
  if ($did == 21) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      msg $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Msg Me if there is a problem. %ac
    }
  }
  if ($did == 22) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /query $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only...  %ac
      dec -c %n
    }
  }
  if ($did == 23) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /notice $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Final Warning!! %ac
      /msg $gettok($did(5),%n,32)  4 No Clones, Servers and Ops Only... Final Warning!! %ac
      dec -c %n
    }
  }
  if ($did == 30) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 31) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ban $gettok($did(5),%n,32)  |  /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 32) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ban -u600 $gettok($did(5),%n,32)  |  /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 33) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      /ban -u3600 $gettok($did(5),%n,32)  |  /kick %ac $gettok($did(5),%n,32)  4 Clones
      dec -c %n
    }
  }
  if ($did == 40) {
    dialog -x clonescanner clonescanner
    /clonescan %ac 
  }
}


on *:join:#:{
  var %i  = $ialchan($wildsite,#,0),%out
  if (%i > 1) {
    while (%i) {
      %out = $addtok(%out,$ialchan($wildsite,#,%i).nick,44)
      dec %i
    }
    echo -t # 4,0 * Clones: 9 $wildsite  8 %out
  }
} 

#112470 24/02/05 05:53 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Do you mean something like:

Code:
on *:load:if ($version >= 5.8) { echo $colour(info) -a * command: /clonescan [channel] [-a] } | else { echo $colour(info) -a * mirc version: $version - v5.8 needed, get newer mirc at www.mirc.co.uk, unloading.. | .unload -rs $script }
alias clonescan {
  var %chan = $iif($left($1,1) == $chr(35),$1,#), %type = $iif($2,$2,$iif($left($1,1) == -,$1)) | set %ac %chan
  if ($dialog(clonescanner) == $null) && (%type != -a) { dialog -m clonescanner clonescanner }
  if (%chan !ischan) {
    if (%type == -a) { echo $colour(info) -a * Please enter a valid channel, ie. a channel that you are in. | return }
    else { did -ra clonescanner 4 Please enter a valid channel, ie. a channel that you are in. | return }
  }
  if ($chan(%chan).ial != $true) {
    .ial on
    if (%type == -a) { echo $colour(info) -a * Updating IAL for %chan }
    else { did -ra clonescanner 4 Updating IAL for %chan $+ ... }
    set %cs.chan $addtok(%cs.chan,%chan,32) | raw -q WHO %chan | set %cs.type %type | return
  }
  else {
    if ($dialog(clonescanner)) { did -r clonescanner 2 | dialog -t clonescanner Clone Scanner - scanning %chan }
    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
    if (%type == -a) { echo -a - | echo -a * Clone Scan in %chan }
    while ($hget(cs,%o).item) {
      if ($numtok($hget(cs,$hget(cs,%o).item),38) > 1) {
        if (%type == -a) { echo -a $numtok($hget(cs,$hget(cs,%o).item),38) => $hget(cs,%o).item $+ : $hget(cs,$hget(cs,%o).item) }
        else { did -a clonescanner 2 $hget(cs,%o).item ( $+ $numtok($hget(cs,$hget(cs,%o).item),38) $+ ): $hget(cs,$hget(cs,%o).item) | did -z clonescanner 2 }
        inc %clones
      }
      inc %o
    }
    if (%type == -a) { echo -a * Done. $iif(%clones > 0,%clones,no) group $+ $iif(%clones > 1,s) of clones found. (done: $+ $calc($ticks - %ticks) $+ ms) | echo -a - }
    else { did -ra clonescanner 4 Done. $iif(%clones > 0,%clones,no) group $+ $iif(%clones > 1,s) of clones found. (done: $+ $calc($ticks - %ticks) $+ ms) }
    hfree cs
  }
}
raw 352:*:if ($istok(%cs.chan,$2,32)) { halt }
raw 315:*:if ($istok(%cs.chan,$2,32)) { set %cs.chan $remtok(%cs.chan,$2,1,32) | clonescan $2 %cs.type | unset %cs.type | halt }
menu channel {
  clone scanner:clonescan #
}

dialog clonescanner {
  title "Clone Scanner"
  size -1 -1 280 150
  option dbu
  button "", 1, 0 0 0 0, ok
  list 2, 2 2 276 93
  box "", 3, 2 87 276 12
  text "", 4, 5 91 170 7
  edit "",5,3 101 275 10
  button "Whois",10,5 115 40 10
  button "Ping",11,46 115 40 10
  button "Notice",20,5 126 40 10
  button "Msg",21,46 126 40 10
  button "Query",22,87 126 40 10
  button "Final Warn.",23,128 126 40 10
  button "Kick",30,5 137 40 10
  button "Ban",31,46 137 40 10
  button "Ban 10 min",32,87 137 40 10
  button "Ban Hour",33,128 137 40 10
  button "New Scan",40, 235 115 40 10
  button "Close",41,235 137 40 10,cancel

}

on *:dialog:clonescanner:dclick:2: { 
  var %x = $gettok(%CSSC,3-,32) 
  var %t = $matchtok(%x,&,0,32)
  while (%t > 0) { 
    var %x = $remtok(%x,&,%t,32)
    dec %t 
  }
  .did -ra clonescanner 5 %x 
  .unset %CSSC
} 
on *:dialog:clonescanner:sclick:*: { 
  set %CSSC $did(2).seltext 
  if ($did == 10) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      whois $gettok($did(5),%n,32) $gettok($did(5),%n,32) 
      dec %n
    }
  }
  if ($did == 11) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      .enable #ping
      ping $gettok($did(5),%n,32) 
      dec -c %n
    }
  }
  if ($did == 20) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      .notice $gettok($did(5),%n,32) 4 No Clones, Servers and Ops Only... Msg Me if there is a problem. %ac
      dec -c %n
    }
  }
  if ($did == 21) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      .msg $gettok($did(5),%n,32) 4 No Clones, Servers and Ops Only... Msg Me if there is a problem. %ac
      .echo -a < $+ $me $+ > 4 No Clones, Servers and Ops Only... Final Warning!! %ac
    }
  }
  if ($did == 22) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      query $gettok($did(5),%n,32) 4 No Clones, Servers and Ops Only... %ac
      dec -c %n
    }
  }
  if ($did == 23) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      .notice $gettok($did(5),%n,32) 4 No Clones, Servers and Ops Only... Final Warning!! %ac
      .msg $gettok($did(5),%n,32) 4 No Clones, Servers and Ops Only... Final Warning!! %ac
      .echo -a < $+ $me $+ > 4 No Clones, Servers and Ops Only... Final Warning!! %ac
      dec -c %n
    }
  }
  if ($did == 30) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      kick %ac $gettok($did(5),%n,32) 4 Clones
      dec -c %n
    }
  }
  if ($did == 31) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      ban $gettok($did(5),%n,32) 
kick %ac $gettok($did(5),%n,32) 4 Clones
      dec -c %n
    }
  }
  if ($did == 32) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      ban -u600 %ac $gettok($did(5),%n,32) 
kick %ac $gettok($did(5),%n,32) 4 Clones
      dec -c %n
    }
  }
  if ($did == 33) { 
    var %n = $numtok($did(5),32)
    while (%n > 0) {
      ban -u3600 %ac $gettok($did(5),%n,32) 
kick %ac $gettok($did(5),%n,32) 4 Clones
      dec -c %n
    }
  }
  if ($did == 40) {
    dialog -x clonescanner clonescanner
    clonescan %ac 
  }
}


on *:join:#:{
  var %i = $ialchan($wildsite,#,0),%out
  if (%i > 1) {
    while (%i) {
      %out = $addtok(%out,$ialchan($wildsite,#,%i).nick,44)
      dec %i
    }
    echo -t # 4,0 * Clones: 9 $wildsite 8 %out
  }
} 

#ping off
On ^*:Pong: {
  echo 2 -a * PONG from $1 $+ : $2
  .disable #ping
  haltdef
}
#ping end

#112471 24/02/05 06:10 AM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
I see where ya goin with that..... ill give it a shot, and be careful if you try out some of those other options .... i realy fubared some of them in the attempt to get it working and i just flooded off several times.

#112472 24/02/05 06:12 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Bit too late for that advice now. <WEG> grin

#112473 24/02/05 06:12 AM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
oops, sorry

#112474 24/02/05 06:26 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Heh. No worries man.


Link Copied to Clipboard