Before I get into my question, no; I don't want to use LaceWing or the DarkSocket extension (sorry, DarkWire). I'm not trying to switch extensions and start my project all over again because somebody has a preference for some other extension. I've asked the same question on ClickConverse and over at tDC to no avail. The only answer I get is "why are you using IRC?" or "Don't use Moosock, use DarkSocket".
I've searched google, tDC, CT's forums, and asked around on ClickConverse. Every time I think I've found an example or tutorial, it turns out to be a 404 error or a broken link. I understand that there isn't much interest in supporting IRC connectivity in MMF2 apps which would explain why the tutorials just don't exist anymore, but I'd really rather not depend on someone else's LaceWing server and IRC connectivity just seems to be far more dependable.
Anyway, I'm not having any issue understanding how MooSock works. I get the methodology. I just don't know what commands I need to send through to the IRC server to create a persistent connection. I keep getting booted on Ident server and PING requests. The PING requests seem pretty straight-forward, but it's rare I get a PING request before the Ident server request and in either regard, I simply get disconnected afterward.
This is what I've got:
::/ Winident.exe is the stand-alone Ident server.
Start of Frame:
MooSock -> Select socket at index 0;
Special Conditions -> Execute external program "apppath$+"bin\ident\winident.exe"
Connect Button Clicked:
MooSock -> Connect to "irc.dal.net" on port 6667;
::/ Sends server messages to the Rich Text Object so I can see how the server is replying.
MooSock On Received:
MooSock -> Accept;
Rich Text Object -> Set text to GetText$( "Rich Edit Object", 0, GetNChars( "Rich Edit Object" ))+RecvLine$( "MooSock" )+NewLine$;
::/ Sends Nick + NickName. Sends USER + NickName + localIP + ClientName + :Real Name.
MooSock On Connect:
MooSock -> Send Text Line "NICK " +Edittext$("Username_Editbox");
MooSock -> Send Text Line "USER "+Edittext$( "Username_Editbox" )+" "+GetLocalIP$( "MooSock" )+" MMFclient"+" :Grim Client";
::/ Displays when my app is disconnected from the IRC server.
MooSock on Disconnect:
Rich Text Object -> GetText$( "Rich Edit Object", 0, GetNChars( "Rich Edit Object" ))+"Disconnected!"+NewLine$;
::/ Replies to PING requests by removing the first four characters and sending the request as PONG + remainder of original PING request.
Compare two General Values: Left$(RecvLine$( "MooSock" ), 4)="PING":
MooSock -> Send Text Line "PONG"+Right$(RecvLine$( "MooSock" ), Len(RecvLine$( "MooSock" ))-4);
Rich Text Object -> GetText$( "Rich Edit Object", 0, GetNChars( "Rich Edit Object" ))+"PONG"+Right$(RecvLine$( "MooSock" ), Len(RecvLine$( "MooSock" ))-4)+NewLine$;
Disconnect Button Clicked:
MooSock -> Disconnect.
Can anybody tell me what I'm doing wrong? I may have the configuration on the Ident server messed up, or I could just be going about this in the entirely wrong fashion. I don't know because I don't get any feedback outside of "Disconnected!". If anybody can help or at least point me to an example or tutorial, I would be really appreciative.