mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 18
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2003
Posts: 18
Hey,

I'm not sure how this would be done, but I'm after a script where you put in the hostmask into a dialog, and it searches the channel for whoever has that hostmask, and displays the nickname of whoever matches that hostmask.

Anyone wanna have a bash at it?

Thanks, this will be MUCH appreciated!!!

andy

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Perhaps this addon has what you're looking for?

Similar affects can be gained with the /who command. Not all networks have the same /who flags, however, you might try:

/who +Mh *hostname/IP*

+M searches all channels you're in.
+h searches for a hostname or IP.

Also ask in the #Help or #mIRC channels of the network you're on, they should have some information.

Have fun!

Regards,


Mentality/Chris
Joined: Jan 2003
Posts: 18
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2003
Posts: 18
Is there any way to make the WHO command display its received info in the Server Window, or in its own window?

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Well, a very very simple way to display /who result to an @window would be to use raws.

The raw for the /who result is 352. The raw for the 'end of /who search' line is 315.

raw 352:*: window -a @WHO | aline @WHO $2-
raw 315:*: aline @WHO $2-

/aline is a little blocky, but it does it's job.

What did you mean by "Server Window"? /who will, by default, echo in your Status window. Simply change the "aline @WHO" in the code to "echo -a" if you wish it to show in the active window.

I suggest you do some reading too to help you understand, and customise, the above. I suggest /help /window and /help raw.

Have fun smile

Regards,


Mentality/Chris
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Lets not forget about the IAL (Internal Address List).

Here are 2 scripts for searching for users in either a specific channel or all channels.

Usage:
/hc [#channel] <hostmask> <-- Searches a specific/active channel and selects nicks.
/hs <hostmask> <-- Searches all channels and displays first 8 results.

If the user you are searching for has been in the channel longer than you, and has said and done nothing since you joined, then use this command to freshen the IAL for that channel.

/wc

Paste these into Aliases Section...

/hc {
if ( $1 ischan ) var %chan = $1, %host = $2
else var %chan = #, %host = $1
if ( !%host ) var %host = $input(Enter the host to search for in %chan,e,Input Host,*!*@*)
if ( *!*@* !iswm %host ) var %host = *!*@ $+ %host
echo $colour(info) -a *** Found $chr(3) $+ 05 $+ $ialchan(%host,%chan,0) users $+ $chr(3) with the host matching $chr(3) $+ 05 $+ %host $+ $chr(3)
sline -r %chan
var %i = 1
WHILE $ialchan(%host,%chan,%i) {
sline -a %chan $gettok($ifmatch,1,33)
inc %i
} }

/hs {
var %host = $1
if ( !%host ) var %host = $input(Enter the host to search for in all channels.,e,Input Host,*!*@*)
if ( *!*@* !iswm %host ) var %host = *!*@ $+ %host
echo $colour(info) -a *** Found 05 $+ $ial(%host,0) users with the host matching 05 $+ %host $+ 
var %i = 1
WHILE $ial(%host,%i) {
var %nick = $gettok($ifmatch,1,33), %address = $deltok($ifmatch,1,33)
var %j = 1, %chans = ""
WHILE $comchan(%nick,%j) {
var %chans = %chans $ifmatch
inc %j
}
echo $colour(info) -a ( $+ $base(%i,10,10,2) $+ ) 5 $+ %nick $+  ( $+ %address $+ ) on 05 $+ %chans $+ 
if ( %i >= 8 ) break
inc %i
} }

/wc { WHO $iif($1,#$1,#) }

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
And that's the not-so-very-very-simple way of doing things ;P

If you're on a network that facilitates HelpServ though (DALnet being an example) I suggest you change the /hs alias to something else, as it will activate it.

Regards,


Mentality/Chris
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
And here i was under the impression that mirc only send data to the server either when a command sent it or it couldn't find the command locally.

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
And that sir, is where you'd be right. Who likes the little test I tried?:

/alias /hs echo -a Nobodi is right, you idiot!
* Added '/hs' alias
Nobodi is right, you idiot!

*renders previous post null and void* blush

But then again, people that do want to use the /hs alias for HelpServ then can't use it...

Regards,


Mentality/Chris
Joined: Jan 2003
Posts: 18
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2003
Posts: 18
I managed to stuff around looking for RAW 352 in my script, found it and noticed it was echo'ing to the Active Window, rather than straight to the Server Window.

This script addon that was posted in the first reply works absolute wonders, I've modified it a little to accomidate my needs (Added in the *!*@ into the Hostmask Text Box by default).

andy

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Glad you got it sorted :-)

Regards,


Mentality/Chris
Joined: Feb 2004
Posts: 201
J
Jae Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2004
Posts: 201
Quote:

RE: Mentality;
But then again, people that do want to use the /hs alias for HelpServ then can't use it...

I always thought u could do /!hs or does that only work for internal mIRC commands?
*kicks /raw hs .. out the window*

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Nope, you can use /!hs, but given the general topic of the service it's likely to be the majority of the people that use it will be newbies, therefore, probably not knowing about the '!' that you can affix to '/' to override any aliases set.

Regards,


Mentality/Chris
Joined: Feb 2004
Posts: 201
J
Jae Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2004
Posts: 201
OK!
Well in that case it looks like so long as it doesnt go out in any proper script. we're all safe.
Although i wonder how many people have writted scripts where they end up with problems because or what someone decided to do on another network the scripter was unaware of.

Cheers.


Link Copied to Clipboard