|
Joined: Aug 2003
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Aug 2003
Posts: 18 |
Hello Guys!
Does miRC support anything like $online($nick/$address) which will return a TRUE or FALSE value? I had gone through the mIRC help file [latest], but couldn't find any answer for my query. If somebody could provide me guidence...
Thanks
if it is a door, it will open!
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
If you add a nickname to your notify list then you can use $notify(nickname).ison to see if they are online, but besides that there is no way to immediately know if someone is online (without being on a channel with them).
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
not unless you wanna go through the trouble of doing a whois, and then responding to raw 319 (user is online) or 401 (user is not online)
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
dont most server support /ison i mean why go thru doing a whois when it is far more resource intensive than a simple /ison which returns :
<- :irc.server.net 303 YourNick :ThierNick when user is on
and <- :irc.server.net 303 YourNick :
when the user is not online. all pretty simple there and less resource hungry. For Someone who has made alot of open claims about users eating resources id have thought ud have suggested this one yourself?
D3m0nnet.com
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
That's not my point. starbucks said there was no other way to know besides using $notify. I merely stated that there is an alternative. I never said nothing about which of the two is the better.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Actually I said there was no way to immediately know, specifically to cover myself when someone mentioned /who* commands . Sure it'll find if someone's online but depending on lag it could take several seconds to get a reply. The poster didn't say what he wanted it for but often a delay of a few seconds is impractical when performing any given task in computing.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Sep 2003
Posts: 70
Babel fish
|
Babel fish
Joined: Sep 2003
Posts: 70 |
I have a $ison identifier that will work for nicknames (I'm not aware of any method for checking addresses). As starbucks said, there is no way to immediately know. This snippet will delay the script until it gets a reply from the server (or the request times out). http://script.false.be/wiki/wiki.phtml?title=Snippets:ison
|
|
|
|
Joined: Aug 2003
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Aug 2003
Posts: 18 |
I had gone through your coding...Actually I need to keep a track of users who are logged with our channel BOT, and to refresh the logged user table (a text file/ini file) as soon as one of the users leaves the particular iRC network [provided once after the authentication, user leaves the channel and keeps himself/herself busy in whisper boxes]. Say something like- I will perform a $isonline($address) and if I am getting a $null, immediately the user will be removed from the table! It seems, we have to wait till Khalid adds a $isonline module into mIRC :O)
if it is a door, it will open!
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
I don't think such a identifier would be possible. mIRC does not receive messages everytime a user connects or disconnects (thank god for that), so there is no way for mIRC to know if anyone online is matching a specified address.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: Aug 2003
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Aug 2003
Posts: 18 |
What I thought of adding is rather simple. Something like
/timer 0 1 validate alias validate { if $isonline($address) { Ok! } else { writeini blah blah blah } }
Last edited by Amar; 30/10/03 09:09 AM.
if it is a door, it will open!
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
But there is no way for mIRC to implement a $isonline() identifier because servers don't supply that information. The only exception being servers which support WATCH lists in which case you can have that information about a limited number of users (the exact number is usually provided as a token in raw 005 if WATCH is available - something like WATCH=128). If WATCH is available mIRC will automatically use that to implement the built-in notify list. If you have more users on your notify list than the maximum number of people that the server supports for WATCH then the rest are implemented with ISON which isn't really effective for what you want.
Basically, the only effective ways to do what you want is to require that users remain in at least one channel with the bot or require that they contact the bot via a DCC chat session.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
|