mIRC Homepage
Posted By: Thedude on internet - 05/04/03 07:04 PM
When the user connects to the internet, a signal is triggered.
Posted By: Poppy Re: on internet - 05/04/03 07:07 PM
Huh?
Posted By: Thedude Re: on internet - 05/04/03 07:10 PM
Quote:
Huh?

When the user (The person using mIRC) connects to the internet (dials up and then connects), mIRC triggers a signal. I don't know if there's any DLLs allready that do this, but I haven't seen any yet..
Posted By: ParaBrat Re: on internet - 05/04/03 10:25 PM
um.. are you maybe asking that when you connect to the internet, that there be a way for mIRC to detect that and automatically open and connect to a server?
Posted By: KingTomato Re: on internet - 05/04/03 11:23 PM
Thjat would be my guess... I'm assuming like on 1:INTERNET: { }
Posted By: SaX0n Re: on internet - 06/04/03 01:02 AM
There are some ways to do it, but not many reliable ones. ICQ does it with it's 'netdetect' agent, however, that only works for Dial-up. Another way to do it might be for mIRC to periodically check for the presence of an IP address. There are problems with that too, However there are probably other methods. It might help if mIRC had an option to place itself in the system tray on windows startup, to compliment this feature. Although i doubt that would be added because of recent viruses.
Posted By: codemastr Re: on internet - 06/04/03 06:05 AM
checking for an IP address wouldn't work if you are on a LAN. The most reliable way? Try and connect to some host:port you KNOW is up and running. If it connects, you're on the internet, if not, then you aren't. That could be scripted. You'd just make a socket that connects to say... google.com (which I personally have never seen down). If the connect fails, then you're not on the internet, if it succeeds, then you are.
Posted By: Thedude Re: on internet - 06/04/03 06:52 PM
Yeah, kinda.. When you connect to the internet a on *:internet:{ } thing is triggered, just like the dude said..
Posted By: _D3m0n_ Re: on internet - 06/04/03 08:53 PM
i dont see that possible unless u go into ur registry and make (force) mirc to startup when your pc does ..... in that case then ud only need on start ...... if the program isnt running how is it supposed to detect anything?
Posted By: Thedude Re: on internet - 07/04/03 08:37 AM
Well, the signal is triggered when you connect to the internet, if mIRC is open.
Posted By: _D3m0n_ Re: on internet - 07/04/03 12:04 PM
ok let me slow it down for u your wanting ur pc to auto open mirc and connect to a server when u have an internet connection ......... now if the mirc is already OPEN then why would u need it to open mirc an connect? then u just have the issue of trying to connect only when online ........ just make an onstart event to start checking to see if u can resolve an ip ..... if its able to resolve then u should be connected to the internet in that case then make it connect to whatever server u want to
Posted By: KingTomato Re: on internet - 07/04/03 04:54 PM
Quote:

Well, the signal is triggered when you connect to the internet, if mIRC is open.


d3m0n:

I think your misreading.. He wants mirc while opened to trigger the on internet event, and not to open when internet is established...
Posted By: ppslim Re: on internet - 07/04/03 06:59 PM
There is a quick hack for this.

Using sockets, you can detect if a connection suceeds. You can then use the SIGNAL event, as a workaround to a netdetect event.
Posted By: codemastr Re: on internet - 07/04/03 08:14 PM
Isn't that what I said... 6 replies ago, although everyone ignored that?
Posted By: Rich Re: on internet - 09/04/03 10:13 AM
You could even check $sockerr to determine why you couldn't connect, that way you wouldn't even be dependant on google being up.
© mIRC Discussion Forums