|
|
Thedude
|
Thedude
|
When the user connects to the internet, a signal is triggered.
|
|
|
|
Joined: Dec 2002
Posts: 817
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 817 |
|
|
|
|
Thedude
|
Thedude
|
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..
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
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?
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
Thjat would be my guess... I'm assuming like on 1:INTERNET: { }
|
|
|
|
SaX0n
|
SaX0n
|
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.
|
|
|
|
codemastr
|
codemastr
|
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.
|
|
|
|
Thedude
|
Thedude
|
Yeah, kinda.. When you connect to the internet a on *:internet:{ } thing is triggered, just like the dude said..
|
|
|
|
Joined: Dec 2002
Posts: 1,518
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,518 |
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?
|
|
|
|
Thedude
|
Thedude
|
Well, the signal is triggered when you connect to the internet, if mIRC is open.
|
|
|
|
Joined: Dec 2002
Posts: 1,518
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,518 |
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
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
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...
|
|
|
|
ppslim
|
ppslim
|
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.
|
|
|
|
codemastr
|
codemastr
|
Isn't that what I said... 6 replies ago, although everyone ignored that?
|
|
|
|
Joined: Dec 2002
Posts: 117
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 117 |
You could even check $sockerr to determine why you couldn't connect, that way you wouldn't even be dependant on google being up.
|
|
|
|
|
|