mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2010
Posts: 2
Z
zerofox Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Oct 2010
Posts: 2
When somebody says "hi", I want to /whois everybody in the channel who is voiced.

I know how to respond to text with ON:TEXT:#channel:{action

...but that's it.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
So what happens when a couple of people say hi at the same time?
Most likely you will flood yourself off the server.

Why exactly do you want to do this? This feels like you're approaching a problem from a wrong angle.

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
what you want can be done easily enough, but yeah, it seems like a back-around-the-way type of doing something. What is the bigger picture? I mean sure, you could do:

Code:
on *:text:hi:#channel-name {
  var %voiced = $nick(#,0,v)
  while (%voiced > 0) { whois $nick(#,%voiced,v) | dec %voiced 1 }
}


as a basic example and untested. You WILL want to use a timer so you DONT flood yourself (as pointed out above).


Those who fail history are doomed to repeat it
Joined: Oct 2010
Posts: 2
Z
zerofox Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Oct 2010
Posts: 2
I play a lot of trivia games on IRC where only 6-8 people are voiced at a time. Even so, they have a tendency to go idle a lot -_-. I wanted a script to /whois voiced people to check their idle times whenever the trivia bot is started by someone. Thanks guys.


EDIT: It seems the simple "whois" doesn't show idle time on this server, and I need to /whois whois <nick>

I tried just adding a second whois in the script, but that doesn't work :P

Last edited by zerofox; 22/10/10 06:56 PM.
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Originally Posted By: zerofox

EDIT: It seems the simple "whois" doesn't show idle time on this server, and I need to /whois whois <nick>

I tried just adding a second whois in the script, but that doesn't work :P

/whois <nick> <nick>
Code:
on *:text:hi:#channel-name: {
  var %voiced = $nick(#,0,v)
  while (%voiced > 0) { whois $nick(#,%voiced,v) $nick(#,%voiced,v) | dec %voiced 1 }
}

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
$nick(#,$nick).idle

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
limit it to just those that are voiced, you can use $nick($chan,$nick,v).idle to return the idle time for $nick in $chan if they are voiced. This saves you from having to /whois all the time, thus eliminating this script from flooding you off of the server.

Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
Originally Posted By: RusselB
limit it to just those that are voiced, you can use $nick($chan,$nick,v).idle to return the idle time for $nick in $chan if they are voiced. This saves you from having to /whois all the time, thus eliminating this script from flooding you off of the server.


.idle returns a very different value than what appears if you do an extended /whois. Most servers let you send multiple nicks at once though using a standard /whois. I.E. /whois <nick1> [nick2] [nick3] etc.


Beware of MeStinkBAD! He knows more than he actually does!
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I know that the .idle extension can return a different value from /whois <nick> <nick>, however, as the original request stated that the people are voiced in the channel, it makes more sense to me to check the channel idle time, rather than the network idle time.

As to using multiple nicks in the /whois, I've only seen this with <nick1> <nick1>, which was mentioned earlier to get the network idle time for those nicks not connected to the same server as you.

If you have a working example of using /whois <nick1> <nick2> <nick3> where all 3 nicks are different, I would love to see it in operation, thus I request from you a network address where this is in operation.


Link Copied to Clipboard