mIRC Home    About    Download    Register    News    Help

Print Thread
#236855 28/03/12 04:54 PM
A
arc123
arc123
A
want to ask for a whois on join that if anyone join a room a whois come out and if it possible to be enable/disabled for specify rooms

#236883 30/03/12 01:18 AM
Joined: Dec 2002
Posts: 1,536
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,536
on *:join:#channel1,#channel2,#channel3:/whois $nick

replace #channel1,#channel2,#channel3 with your real channel names

or, if you have it inside of another script:

Code:
on *:join:#: {
  if (($chan == #channel1) || ($chan == #channel2) || ($chan == #channel3)) { whois $nick }
}


or you could even do this (by filling in the variable with a channel's name separated by a comma):

Code:
on *:join:#: {
  if (#chan isin %whoischannel) { whois $nick }
}



Hope that helps


Those who fail history are doomed to repeat it
#236885 30/03/12 03:50 AM
A
arc123
arc123
A
like this the whois will come on any page im

and i want it appear where i made it enable like if im enable whois on #Histen

it come on #histen not if im on room #luokas i see the whois from #histen

#236890 30/03/12 04:35 PM
Joined: Dec 2002
Posts: 1,536
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,536
so you designate which channels it will fire on. In my first example, just add your channels you want it to work on in the event itself.


Those who fail history are doomed to repeat it
#236899 31/03/12 03:07 PM
C
CtrlAltDel
CtrlAltDel
C
Correct me if I'm wrong, please.
As I understand it, you want to:
whois someone joining #channel1 and have the results display (echo) in #channel1
and:
whois someone joining #channel2 and have the results display (echo) in #channel2.

If this is the case, Why not just make ALL the results go to an @window (@whois for example)? This (to me) would be a MUCH easier way to keep it out of your active window.

Code:
raw 311:*: {
  if $window(@Whois) {
    goto end
  }
  window -k(0)zn(0) @Whois
  :end
  echo @Whois 10Nickname: 12 $+ $2
  echo @Whois 10Full address: 12 $+ $2 $+ ! $+ $3 $+ @ $+ $4
  echo @Whois 10Real name: 12 $+ $6-
  halt
}
raw 319:*: { 
  echo @Whois 10Channels: 12 $+ $sorttok($3-,32,c) 
  halt 
}
raw 312:*: { 
  echo @Whois 10Server: 12 $+ $3 ( $+ $4- $+ ) 
  halt 
}
raw 307:*: { 
  echo @Whois 10 $+ $2 $3- 
  halt 
}
raw 301:*: { 
  if ($2 == $me) return
  echo @Whois 10 $2 is away: 12 $+ $3- 
  halt 
}
raw 313:*: { 
  echo  @Whois 10 Status: 12 $+ $5- 
  halt 
}
raw 310:*: { 
  echo  @Whois 10 $2 12 $+ $3- 
  halt 
}
raw 317:*: {
  echo  @Whois 10Idle time: 12 $+ $duration($3)
  if ( $4 isnum ) echo  @Whois 10 Signon time: 12 $+ $asctime($4)
  halt
}
raw 330:*: { 
  echo  @Whois 10 $2  $+ $4 $5 $6 $7 12 $+ $3 
  halt 
}
raw 318:*: { 
  echo @Whois 10End of Whois reply 
  echo @Whois 
  halt 
}


the above works well for me Paste in a new remote file (apologies for the colors)

Last edited by CtrlAltDel; 31/03/12 03:09 PM.
#236907 01/04/12 03:39 PM
A
arc123
arc123
A
awwww thats whois display im just talking about auto whois on join laugh

#236914 02/04/12 06:42 AM
T
Twitch
Twitch
T
Use the command below to set a variable to a comma separated list of channels you want to use for /whois on join.

Code:
;/set %whoisjoin #Channel1,#channel2,#channel3,etc...


after you have your channels set, you would use the following code to set the display channel and /whois the user on join...

Code:
on *:join:%whoisjoin: {
  if ((!%whojchan. [ $+ [ $nick ] ]) && ($nick != $me)) {
    set %whojchan. [ $+ [ $nick ] ] $chan
    whois $nick $nick
  }
}


And these raw reply codes are what allows it to display in the proper channel.

Code:
raw 311:*: {
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 $2-
    haltdef
  }
}
raw 319:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 Channels: $3-
    haltdef
  }
}
raw 312:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 Server: $3 / $4-
    haltdef
  }
}
raw 307:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 $2-
    haltdef
  }
}
raw 301:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 $2 is away $3-
    haltdef
  }
}
raw 313:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 Status: $3-
    haltdef
  }
}
raw 310:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 $2-
    haltdef
  } 
}
raw 317:*: {
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 Idle: $duration($3) / Signon: $asctime($4)
    haltdef
  }
}
;--318 End of /WHOIS
;--end of whois reply, here we need to unset the '%whojchan. [ $+ [ $2 ] ]' variable,
;---or it will not be able to be used the next time this user joins.
raw 318:*: { 
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 $3-
    unset %whojchan. [ $+ [ $2 ] ]
    haltdef
  }
}


Please Note:
1) If the user joins several of the channels you have in the list at the same time, it will only display for the first channel the user joined..

2) The raw reply codes above are only a few of the ones that could be returned from a /whois request. you will need to search online for them or you can use the /debug @Debug command to see what the server returns.

3) To add more raw replys to the list, you will need the relevant part of the raw reply code, which is as follows:

Code:
  if (%whojchan. [ $+ [ $2 ] ]) {
    echo $v1 <formatted raw reply here>
    haltdef
  }


$v1 returns the value of the 'if match', in this case it's the channel name that was stored in %whojchan. [ $+ [ $2 ] ].
In a whois reply '$2' is always the nick name of the user you did the /whois on.


I do hope all that makes sense enough to be useable, good luck and happy scripting. =)

- Tw|tch

#236959 04/04/12 07:01 PM
A
arc123
arc123
A
thats mean i will have to go for edit and replace channel and remove it and thats what i wasnt looking for


just wanted to enable/disable for certain rooms since i will enable it for few

#236970 06/04/12 12:34 AM
Joined: Dec 2002
Posts: 1,536
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,536
/help groups for more info. We've already pointed out a number of ways you could perform a whois when people join certain channels. I'm not up on the use of groups so i cant help[ you out there


Those who fail history are doomed to repeat it
A
arc123
arc123
A
ty


Link Copied to Clipboard