mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 9
D
dabb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2003
Posts: 9
I'm trying to connect to a server which is apparently not configured to send a MOTD. The "on 1:CONNECT:" event is not firing because of this. Once connected, if I manually type /motd, the MOTD is displayed and THEN the "on 1:CONNECT" event fires. Is this normal? The "perform on connect" function also does not work on this server either unless I manually force a MOTD to be displayed.

Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
If there is no MOTD the server must reply with "MOTD File is missing" (raw 422). If it's not, the on:CONNECT and perform will not work.
The server is just badly configured / coded.

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
what Im curious about is how can an ON CONNECT event be tied to the MOTD? MOTD happens after you connect and even if it wasnt displayed, shouldnt matter unles Im missing somehting stupid cause I just woke up


Those who fail history are doomed to repeat it
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Added note:

Check that you have the MOTD set to display when you connect:

ALT+O > IRC > Options

Uncheck the box "Skip MOTD on connect" if it's checked.

Happy scriptin' smile

Regards,


Mentality/Chris
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
When mIRC gets "End of MOTD" after connecting, it assumes that connection is finalised and commands can be send to the server. Server ignores commands sent before the MOTD (some IRCds will show "You have not registered" or "Register first" message). You can check for yourself using on LOGON event.

edit:

/help on connect

The on CONNECT event triggers when mIRC connects to an IRC Server right after the MOTD is displayed.

So, if there's no "End of MOTD" or "MOTD missing", mIRC will not trigger on CONNECT.

Last edited by MonoSex; 02/04/04 04:21 PM.
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
so mirc basically waits for 1) actual motd 2) presence of a failed motd (via the raw statemnt) before deciding it's connected?? Maybe Im just not understanding. However, based off of your explanation, I think I understand why their on connect wasnt working


Those who fail history are doomed to repeat it
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
Quote:
so mirc basically waits for 1) actual motd 2) presence of a failed motd (via the raw statemnt) before deciding it's connected??


1) actual end of motd smile
2) presence of a failed motd (via the raw statemnt)

I found this out when i coded IRCd in mIRC Script (just for fun grin).

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
but in their case, it only works when they do it manually and not automatic. talk about stumped


Those who fail history are doomed to repeat it
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
I think mIRC triggers on CONNECT when it recives "End of MOTD" for the first time. So if MOTD was not sent upon connecting and user issues the /motd command manually, mIRC treats it (the EOM reply it gets) as a first MOTD.

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
would sound about right but weird none the less.


Those who fail history are doomed to repeat it
Joined: Oct 2003
Posts: 101
Vogon poet
Offline
Vogon poet
Joined: Oct 2003
Posts: 101
Maybe I am missing something, but why use "END OF MOTD" for on connect? Why not RAW 001 or similar? I understand if actual events triggered on 001 that they would happen before mirc's MOTD-on-connect, so I guess mirc would have to send MOTD followed by the immediate processing of the ON CONNECT events when it got the 001.

I am sure there is some reason why he chose that particular event to trigger on connect, but can anyone enlighten me?

Joined: Apr 2003
Posts: 9
D
dabb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2003
Posts: 9
Thanks for all the info. I figured their IRC server is probably a little misconfigured. My "Skip MOTD on connect" is unchecked, so their server must not be sending the code for "no MOTD". But it is interesting as others have pointed out that mIRC does not consider itself connected until something happens (good or bad) with the MOTD. I was trying to do an auto-join of a channel, but it doesn't work (without some serious tweaking anyway) because of the MOTD issues on this particular server.

Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
Well IMO the End of MOTD is fine, as it states an end of connecting process. Every server is supposed to send either MOTD, or MOTD missing info so it should not be a problem.
I suppose there could be an on ^CONNECT event that would trigger before the MOTD, but it wouldn't change anything really, as the user input is processed after the MOTD has been sent. Example:

raw 1:*:whois $me

The whois shows after the end of MOTD.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Firstly I'll point out that mIRC never sends an MOTD request on connect, it's sent automatically by the server as specified in RFC 1459 (the original IRC specification). Raws 001 - 005 aren't defined in RFC 1459, their first mention AFAIK is RFC 2812 which, although mostly followed by modern IRC servers, is not necessarily required to be followed in order to be considered an IRC server. As a couple of people have already said, IRC servers don't process the information until after the MOTD anyway, and since by RFC 1459 servers must send either an MOTD or an 'MOTD missing' message, it makes sense that mIRC should use the most universally recognizable message that can be sent in order to determine the connection is ready.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Oct 2003
Posts: 101
Vogon poet
Offline
Vogon poet
Joined: Oct 2003
Posts: 101
That's the explaination I was looking for, thanks.

Joined: May 2004
Posts: 1
J
Mostly harmless
Offline
Mostly harmless
J
Joined: May 2004
Posts: 1
Hi. so is there anyway of fixing this? I mean, I connect to a server which frequentlly closes connection on me... beats me why though..
anyways, I would love to have mirc rejoin the channels for me... "perform on connect" nor "rejoin" works on this server..
there is no "end of /motd"
even if I type "/motd" nothing happens..
so is their any other way to trigger this? Thanks!

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Not on mIRC's side. You should contact the network's staff and tell them to fix their servers.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard