mIRC Home    About    Download    Register    News    Help

Print Thread
#125877 23/07/05 04:57 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
okay i have nick "scanner" in script that lists all simmiliar inputed names in @window...

Alias:

Code:
/nick.scan {
  if ($network == $null) { set %ntw $server } 
  else { set %ntw $network }
  if ($1 == $null)  { halt }
  if ($1 == -c) {
    if ($window(@NickScan) != $null) { .window -c @NickScan }
    window -lk -t4,15 +s @NickScan 220 50 320 290 @NickScan Verdana 11
    aline @NickScan $chr(160)
    aline @NickScan $chr(160)
    aline @NickScan $str($chr(160),1) 10 %script 15 %version Nick Scanner
    aline @NickScan $str($chr(160),2) 0User(s) with name " $+ %nkscn $+ " On %ntw $+ :
    aline @NickScan $chr(160)
    aline @NickScan $chr(160)
    set %Varnk.Total 0 | /.enable #Nick.Scan | who * $+ %nkscn $+ *
  }
}
 



Remote:

Code:
 
#Nick.Scan off
raw 352:*: { 
  if ($left($7,1) == G) { %temp.nuser.away = [Away] }
  else { unset %temp.nuser.away }
  inc %Varnk.Total 
  aline @NickScan $str($chr(160),3) %Varnk.Total $+ . $+ $chr(9) $+ $6 $+ $chr(9) $+ $+($3@,$4) %temp.nuser.away | halt
} 

raw 315:*: {
  if (%Varnk.Total == 0) { aline @NickScan $str($chr(160),3) No such user(s) with name " $+ %nkscn $+ " or server has scan protection ! | goto end }
  aline @NickScan $chr(160)
  aline @NickScan $chr(160)
  aline @NickScan $str($chr(160),3) Total: %Varnk.Total User(s) matching " $+ %nkscn $+ " found !
  :end
  .unset %varnk.total
  .disable #Nick.Scan | halt
}
#Nick.Scan end

menu @NickScan {
  dclick {
    if ($sline(@NickScan,1).ln == 1) { /window -c @NickScan | halt }
  }
  Query User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /query %unik
  Whois User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | whois %unik %unik
  DNS User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /dns %unik
  -
  Save Log: /savebuf 1-200 @NickScan $mircdirlogs\Misc\NickScan\ $+ %nkscn $+ . $+ $network $+ .Log
  -
  Close:/window -c @NickScan
}

 


i have this popups:

Code:
menu @nickscan {
  dclick {
    if ($sline(@nickscan,1).ln == 1) { /window -c @nickscan | halt }
  }
  Query User: tokenize 9 $strip($$sline($active,1)) | /set %uoper $gettok($1-,3,32) | /query %uoper
  Whois User: tokenize 9 $strip($$sline($active,1)) | /set %uoper $gettok($1-,3,32) | whois %uoper %uoper
  DNS User: tokenize 9 $strip($$sline($active,1)) | /set %uoper $gettok($1-,3,32) | /dns %uoper
  -
  Save Log: /savebuf 1-200 @nickscan $mircdirlogs\Misc\NickScan\ $+ $network $+ .Log
  -
  Close:/window -c @nickscan
}
 


problem is that even if i DONT select any line i have ENABLED
/whois
/dns
/query

so how what to do so it has "checkup" if line is selected or not so those options can be DISABLED or ENABLED ?

Last edited by raZOR; 23/07/05 05:00 AM.

IceCapped
#125878 23/07/05 06:38 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
menu @NickScan {
  dclick {
    if ($sline(@NickScan,1).ln == 1) { /window -c @NickScan | halt }
  }
  Query User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | $iif(%unik,/query %unik)
  Whois User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | $iif(%unik,/whois %unik %unik)
  DNS User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | $iif(%unik,/dns %unik)
  -
  Save Log: /savebuf 1-200 @NickScan $mircdirlogs\Misc\NickScan\ $+ %nkscn $+ . $+ $network $+ .Log
  -
  Close:/window -c @NickScan
}
  


Give those alterations a try.

#125879 23/07/05 12:42 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
nah it still is enabled but thanks for trying


IceCapped
#125880 23/07/05 06:07 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
dont get me wrong but now i see that you didnt edited anything in code lol !
no wodner itz all as it was...


IceCapped
#125881 23/07/05 06:53 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I tried your
Code:
alias nick.scan {
  if ($network == $null) { set %ntw $server } 
  else { set %ntw $network }
  if ($1 == $null)  { halt }
  if ($1 == -c) {
    if ($window(@NickScan) != $null) { .window -c @NickScan }
    window -lk -t4,15 +s @NickScan 220 50 320 290 @NickScan Verdana 11
    aline @NickScan $chr(160)
    aline @NickScan $chr(160)
    aline @NickScan $str($chr(160),1) 10 %script 15 %version Nick Scanner
    aline @NickScan $str($chr(160),2) 0User(s) with name " $+ %nkscn $+ " On %ntw $+ :
    aline @NickScan $chr(160)
    aline @NickScan $chr(160)
    set %Varnk.Total 0 | /.enable #Nick.Scan | who * $+ %nkscn $+ *
  }
}
#Nick.Scan off
raw 352:*: { 
  if ($left($7,1) == G) { %temp.nuser.away = [Away] }
  else { unset %temp.nuser.away }
  inc %Varnk.Total 
  aline @NickScan $str($chr(160),3) %Varnk.Total $+ . $+ $chr(9) $+ $6 $+ $chr(9) $+ $+($3@,$4) %temp.nuser.away | halt
} 
raw 315:*: {
  if (%Varnk.Total == 0) { aline @NickScan $str($chr(160),3) No such user(s) with name " $+ %nkscn $+ " or server has scan protection ! | goto end }
  aline @NickScan $chr(160)
  aline @NickScan $chr(160)
  aline @NickScan $str($chr(160),3) Total: %Varnk.Total User(s) matching " $+ %nkscn $+ " found !
  :end
  .unset %varnk.total
  .disable #Nick.Scan
  halt
}


what is the normal useage? I tried /nick.scan -c nickname

the output I got was a list of nicks on the network, after it completed it did disable the group #Nick.Scan

note I did change your line
.disable #Nick.Scan | halt

#125882 23/07/05 08:08 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
i want to DISABLE POPUPS if NO line (nick) is SELECTED

not the group


IceCapped
#125883 23/07/05 08:56 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You'd better look the code that I posted again, because there are differences...specifically in my code each line now contains a $iif command, as they don't exist in your original code. I've reposted my code with the alterations highlighted in red
Code:
 menu @NickScan {
  dclick {
    if ($sline(@NickScan,1).ln == 1) { /window -c @NickScan | halt }
  }
  Query User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) |  [color:red] $iif(%unik,/query %unik) [/color] 
  Whois User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) |  [color:red] $iif(%unik,/whois %unik %unik) [/color] 
  DNS User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) |  [color:red]$iif(%unik,/dns %unik)  [/color] 
  -
  Save Log: /savebuf 1-200 @NickScan $mircdirlogs\Misc\NickScan\ $+ %nkscn $+ . $+ $network $+ .Log
  -
  Close:/window -c @NickScan
} 


It may be that this still doesn't work, but your post about there being no changes made me wonder if the changes were taken or if you were still running the original code by accident.

Last edited by RusselB; 23/07/05 09:03 PM.
#125884 23/07/05 08:57 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
when the window opens, no line is selected, at what point should mIRC decide that you want the menu disabled?

maybe you could explain what you want differently?

#125885 23/07/05 10:24 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
to Russel:
i again copy/paste your code and it doesnt work frown

to Mike:

i want/ask that IF i dont select a line in that window (when line is clicked then it becomes blue coloured) then that

Query
Whois
DNS

popups become disabled
and if i click on nickname then that those popups become enabled

and yes, i forgot i use mirc 6.03 dunno if maybe some code wont be accepted for it so...

Last edited by raZOR; 23/07/05 10:29 PM.

IceCapped
#125886 24/07/05 12:06 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
there is no "disable" definition for a @window. you CAN change the color of a line when sclick with cline, however if the thing were disabled how could you click it to fire the whois and so on? this makes no sense.

#125887 24/07/05 02:01 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
well if nothing is selected i dont need whois and dns and query now do i?

who will i query if nothing is there ?


IceCapped
#125888 24/07/05 02:24 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:


well if nothing is selected i dont need whois and dns and query now do i?

who will i query if nothing is there ?


if ($sline(@NickScan,1).ln == 1) { /window -c @NickScan | halt }

this line in the code closes the window and halts/stops the rest of it from working now doesn't it

#125889 24/07/05 04:08 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
yes but i would like them to be disabled (grayed out) IF possible

Last edited by raZOR; 24/07/05 04:10 AM.

IceCapped
#125890 24/07/05 05:44 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:

Commands

The following commands allow you to manipulate the lines in a custom window.
/aline [c] <@name> <text> add line to list
/cline [c] <@name> <N> changes the color of the Nth line to color C
/dline [c] <@name> <N[-N2]> delete Nth line through N2th line
/iline [c] <@name> <N> <text> insert line at Nth line
/rline [c] <@name> <N> <text> replace Nth line
/sline [c] <@name> <N> select Nth line

The c parameter specifes a color number for the line.


so add to the events in Your script that if there are no clones detected that the lines are recolored grey

#125891 24/07/05 09:22 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Seems like there's some confusion in this thread smile

to not show anything when nothing's selected:
$iif($sline($active,0),Query User): tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /query %unik


to disable the command
$iif(!$sline($active,0),$style(2)) $+ Query User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /query %unik


If it's just for a nicklist, dump all the $sline stuff and use either $1 or $snicks.

ps: I did not change the code after the : but that does not mean I like it or would advise it.

#125892 24/07/05 12:38 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
allright my man !
you understood my problem... and i thank you
i would just want to ask you (if not too much to hassle with)
is it possible that those popups are grayed out/disabled IF no results are given/no nicknames showed coz if i still click on any line in window i can query or whois " " (nothing)


well if it is not too hard for you or anyone else i would apreciate it much

thanks again


IceCapped
#125893 24/07/05 10:04 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
So there's a line selected, but it contains no nickname? or nothing at all?

disable if first selected line is $null (or 0 or $false)
$iif($sline($active,1),$style(2)) $+ Query User: commands

disable if first selected line is not a nick in a specific channel (you might need to use $gettok or something)
$iif($sline($active,1) !ison #channel,$style(2)) $+ Query User: commands

#125894 24/07/05 10:11 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
now it is always disabled smirk

coz results are in this form:

1. Nickname1 (tab) ~ID@host.dns
2. Nickname2 (tab) ~ID@host-2.dns
3. Nick3 (tab) ~id@host3-blabla.dns

where (tab) is TAB :tongue:

if it is not possible then just say i dont want to bother you with some long line coding smile

Last edited by raZOR; 24/07/05 10:11 PM.

IceCapped
#125895 25/07/05 09:20 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
$iif($gettok($sline($active,1),1,9) !ison #channel,$style(2)) $+ Query User: commands

Change the colored parts ofcourse, and you most likely can't use $chan or # in there.
If you want it to work for all lines with nicknames on them (also those who left the channel or aren't on a channel), you'll have to give me some lines that aren't nicks and thus should have those commands disabled.

#125896 26/07/05 07:33 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
so if i cant use #channel then it cannot be done right?


IceCapped

Link Copied to Clipboard