mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2004
Posts: 148
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
I have decided to have a little fun with VB, so I have created a small IRC Client which can only connect to networks (but it still can't send messages, join channels etc).

I'm wondering what triggers the On Connect event... I assume that it is a raw command sent to mIRC.
Here is a short stream of data transfer between me and the server (Using mIRC):


NICK Bromer
:irc.server.com NOTICE AUTH :*** Looking up your hostname...

:irc.server.com NOTICE AUTH :*** Found your hostname (cached)

USER Bromer "hotmail.com" "irc.server.com" :Bromer
:irc.server.com 001 Bromer :Welcome to the Network IRC Network ******************************

:irc.server.com 002 Bromer :Your host is irc.server.com, running version Unreal3.2.5

:irc.server.com 003 Bromer :This server was created ...........................

:irc.server.com 004 Bromer irc.server.com Unreal3.2.5 iowghraAsORTVSxNCWqBzvdHtGp lvhopsmntikrRcaqOALQbSeIKVfMCuzNTGj

:irc.server.com 005 Bromer CMDS=KNOCK,MAP,DCCALLOW,USERIP NAMESX SAFELIST HCN MAXCHANNELS=15 CHANLIMIT=#:15 MAXLIST=b:60,e:60,I:60 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 AWAYLEN=307 MAXTARGETS=20 :are supported by this server

:irc.server.com 005 Bromer WALLCHOPS WATCH=128 SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kfL,lj,psmntirRcOAQKVCuzNSMTG NETWORK=Network CASEMAPPING=ascii EXTBAN=~,cqnr ELIST=MNUCT STATUSMSG=~&@%+ EXCEPTS :are supported by this server

:irc.server.com 005 Bromer INVEX :are supported by this server

:irc.server.com251 Bromer :There are 19 users and 332 invisible on 2 servers

:irc.server.com 252 Bromer 12 blushperator(s) online

:irc.server.com 254 Bromer 29 :channels formed

:irc.server.com 255 Bromer :I have 331 clients and 1 servers

:irc.server.com 265 Bromer :Current Local Users: 331 Max: 376

:irc.server.com 266 Bromer :Current Global Users: 351 Max: 396

:irc.server.com 422 Bromer :MOTD File is missing

:Bromer MODE Bromer :+iwx

PROTOCTL NAMESX
QUIT :
ERROR :Closing Link:***********************************



So is it a raw command, and which one?? (Don't warry, I'm not trying to compete with mIRC, I'm doing it just for fun smirk )

Joined: Nov 2004
Posts: 148
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
Well if I had to guess then it would probablt be
Raw 376 Bromer :End of /MOTD command.
or
Raw 422 Bromer :MOTD File is missing

Am I right? laugh

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
well, if you display the MOTD lines (even if it's not there), in the ON CONNECT remote, just use a simple echo command of something like "You're now connected" along with the debug to see where it comes in. I would guess that the piece of information directly BEFORE it would determine the online/offline status. My guess has always been that it was at the end of the MOTD


Those who fail history are doomed to repeat it
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I think you are considered 'connected' when you receive RAW 001, though you may want to wait a very short time until you receive RAWS 001-005. Supposedly some IRCds don't return 005, so you'd have to start a few millisecond timer from the time you see 001, so that 002-005 have time to potentially appear.

-genius_at_work


Link Copied to Clipboard