mIRC Homepage
Posted By: Eddy2k5 .whois script - 21/09/05 03:46 PM
how to make an script so when i type .whois c0ke
and it will show up in $chan

c0ke is c0ke@C0ke.com * c0ke
c0ke on #test
c0ke using irc.daxnet.no Burn some dust & eat my rubber
c0ke has been idle 7mins 20secs, signed on Tue Sep 13 11:36:25
c0ke End of /WHOIS list.
Posted By: MikeChat Re: .whois script - 21/09/05 05:13 PM
go to Options (alt+o) IRC and check mark "show in active" the box for "Whois"
Posted By: Bullseye Re: .whois script - 22/09/05 07:29 AM
That doesn't activate the whois with the text .whois <nick>.
No idea why he wants to let everyone see who he's doing a whois on.
I tryed a on text event but it doesn't seem to work.
Posted By: MikeChat Re: .whois script - 22/09/05 07:34 AM
1) He posted using a . to "silence" the command
2) decide which channel ($chan) it is going to be posted in
3) Is this to be msg $chan? echo? what?
4) You could be more helpful in showing how to do it
Posted By: Om3n Re: .whois script - 22/09/05 08:35 AM
I think he meant he wanted the command to be '.whois c0ke' ie on *:text:.whois *:#: {}
Posted By: Om3n Re: .whois script - 22/09/05 09:18 AM
This should work fine, note that some of the raws below are only sent to irc operators. Also, some ircd's may send results in a slightly different format, and may have some extended raws sent on whois.
Code:
on *:TEXT:.whois *:#: {
  if ($2) {
    set $+(%,whois.,$2) $chan
    msg $chan 'Processing whois'
    .whois $2 $2
  }
}
raw 311:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 307:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 615:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 616:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 319:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 312:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 313:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2- | halt
raw 317:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) $2 has been idle $duration($3,1) $+ , signed on $asctime($3,ddd mmm dd hh:nn:ss) | halt
raw 318:*: if ($+(%,whois.,$2)) msg $($+(%,whois.,$2),2) 'End of WHOIS' | unset $+(%whois.,$2) | halt
Posted By: Riamus2 Re: .whois script - 22/09/05 01:14 PM
And, in case he doesn't know... on text events only trigger when someone else does them. Use on input too, so it will trigger for both you and others (input for you, text for others).
© mIRC Discussion Forums