mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Hi! Im a noob with using sockets to connect to IRC.

I have decided to try connecting to my IRC network by opening a socket. I open the socket, connect and auth myself fine.

I decided to open a socket for each room I join. I join the room and can read all room events through the sockread, my only problem so far is that a mIRC channel window does not open.

What am I missing?

The code I am using is very basic. Simply opening the socket, auth on sockopen. Then I manually join the room right now.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
If you are connecting using a /socket, then why on earth would mIRC create a channel window?

Now, as for creating a socket for each room you join, I take it you're creating many *MANY* clones of yourself on your network (bad, and won't get any help with here).

You could create a channel-like @window with a side listbox, but you'd have to populate it and manage it yourself.

Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
"Now, as for creating a socket for each room you join, I take it you're creating many *MANY* clones of yourself on your network (bad, and won't get any help with here)."

No, just having a dedicated socket to each room joined.



"You could create a channel-like @window with a side listbox, but you'd have to populate it and manage it yourself."

Yeah, I thought about doing this but I know I don't have to and it would ridiculous to do this really.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Originally Posted By: DJ_Sol
No, just having a dedicated socket to each room joined.


Err, huh?

If you have a dedicated /socket for each channel you open, you'll have a different nick for each channel from the same host, which is called cloning.

And as far as I'm aware, the only way to get mIRC to create a channel window is to have mIRC connect to that socket via the /server commands (and connect dialogs).

You can create what's known as a 'proxy' or 'bounce' to do this, getting your mIRC to connect to a /socklisten you create, to which you shove information down, but.. it can get messy.

This was one of the old-school ways to do version changes 'n stuff when sockets were released.

Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Not a different nick. I auth for each socket. This is how people connect to this server. Course noone will show me. They all just want you to use their connection. But I don't really like theirs.

Yes, I;ve seen them do what y ou said.

"getting your mIRC to connect to a /socklisten you create, to which you shove information down"

I just don't understand the mechanics of it.

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: DJ_Sol
Not a different nick. I auth for each socket. This is how people connect to this server. Course noone will show me. They all just want you to use their connection. But I don't really like theirs.

Yes, I;ve seen them do what y ou said.

"getting your mIRC to connect to a /socklisten you create, to which you shove information down"

I just don't understand the mechanics of it.


Post your current script and we will work around it. I would use sockwrite command ip -j #channel to personally open a channel window but im not clear on what and how your trying to accomplish things so I will wait till you post your current script thanks.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
Many "MSN Chat" (obselete) and other Non IRC type networks do this

A great resource for looking at is Vincula on eXonyte's Realm http://exonytesrealm.com/msn.php

Basically, as well as using a socket for connecting to the server, you need to make a 'local' socket which will connect to mIRC, or rather, mIRC will connect to it

so you wanna make a sockopen to irc.server.here - I think you've done this
then, /socklisten on a local port
then /server 127.0.0.1 {local port}.
mIRC will attempt to connect to the local port, on successful socklisten, you should sockaccept followed by CLOSING the socket you are listening on.

After this, you will most likely want to send data between the server socket and the local socket, allowing mIRC to interact properly with the room.

So basically, the sockets are working as a "PROXY" between mIRC and the Server.

I may post an update to this later, or you can contact me on MSN (JD at OzChat dot org).

PS: Many people use this to 'change' the mIRC version reply as you can halt it before mIRC recieves the version check, or modifiy it after mIRC is sending it back

I do hope this helps, Please let me know if it did.


[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
Just realised this is what bekar was talking about.


[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Yes it was what Bekar was talking about but I needed some direction. Thank you JD, this has helped. I saw what you were talking about but needed better clarification. I appreciate your help with this!

I haven't started coding according to your directions but I can already tell this is going to help me out a lot. Thanks!!


Link Copied to Clipboard