Webagent007 Posted June 30, 2007 Report Share Posted June 30, 2007 Did you get that string out of the console window? Try to use debug.print and you can see in your console window when debugging (put a line breakpoint in front of your code for example) if it shows a linefeed before the data is going to the encode/decode parsing. Link to comment Share on other sites More sharing options...
Psych Posted June 30, 2007 Author Report Share Posted June 30, 2007 Did you get that string out of the console window? Try to use debug.print and you can see in your console window when debugging (put a line breakpoint in front of your code for example) if it shows a linefeed before the data is going to the encode/decode parsing. I've a few methods of seeing what I send, firstly I have a trace window under my 'screen' that I use to chat. The socket class I wrote has a datasent event that tells me what raw characters I sent to the server, I also wrote a simple program yesterday that gives me the character codes of any text in a textbox. Its a bit baffling. In my trace window, the text I send has a linefeed, as it should, and it outputs on a new line, but for some reason the server doesn't relay this back to the room. I am sending the 10 character. And yes, the first and last little boxes you saw would be chr(1). Link to comment Share on other sites More sharing options...
The Gate Keeper Posted June 30, 2007 Report Share Posted June 30, 2007 i know that in MSN chat, you had to use one of the following characters as line feeds (as it played with UTF-8 encoding, like you suggested above). Remember, these are already in the raw formats, so you shouldn't need to convert them (or you SHOULD NOT convert them). 
 ï€ ï€‹ You only need 1 of these 3, so try them and see what you get. Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted June 30, 2007 Report Share Posted June 30, 2007 And make sure the persons whispers are on lol. Link to comment Share on other sites More sharing options...
hixxy Posted June 30, 2007 Report Share Posted June 30, 2007 Okay, it doesnt seem to have anything to do with encoding. This is the string I am sending.... "PRIVMSG %#TESTROOM :S Tahoma;0 First Line" & Chr(10) & "Second Line" Are we assuming this should work? What I get on the screen is this... BotNick : S Tahoma;0 First Line Nothing else. That will not work because CRLFs are used to delimit commands in the IRC protocol, like most others. This means that to send multiple lines to a channel you will have to issue multiple PRIVMSG commands, like so: "PRIVMSG #channel :Line one" & Chr(13) & Chr(10) & "PRIVMSG #channel :Line two" & Chr(13) & Chr(10) Chr(10) by itself is just a line feed. You must also use a carriage return - Chr(13) Link to comment Share on other sites More sharing options...
Pyscho Posted June 30, 2007 Report Share Posted June 30, 2007 (edited) Wrong. What you need to do is this: "PRIVMSG %#TESTROOM :S Tahoma;0 First Line" & Chr(239) & "Second Line" He is not wanting to send a crlf, but rather to make the next line appear on a new line in an msn web chatroom. Edited June 30, 2007 by Pyscho Link to comment Share on other sites More sharing options...
The Gate Keeper Posted July 1, 2007 Report Share Posted July 1, 2007 hello...? have you even tried my suggestion? The problem with using line feed is that the server is expecting a new command. When you do line feed, it expects that you are doing a new command straight after. I'm reasonably sure this is why it's not working. Link to comment Share on other sites More sharing options...
Psych Posted July 1, 2007 Author Report Share Posted July 1, 2007 Hi again, I've tried the 239 thing, trouble is it encodes as a character and doesn't give a linefeed. BotNic : First Line ïSecond Line What gets me about all this is that I've seen chr(10) sent from another script, yet when I try it doesn't get through. I tried the groups of 3 characters too, no success. Maybe if I turn the encoding off it may work, I'll try that next. Link to comment Share on other sites More sharing options...
The Gate Keeper Posted July 1, 2007 Report Share Posted July 1, 2007 like i said, the characters i gave you should not be encoded, otherwise it will send the wrong thing. I am not too sure if your encoder compensates for line feeds and that. I know that when i was doing vb.net (as in mucking around with it) and even with mIRC and chat servers, line feeds would always imply a new. Regardless of if the previous statement is complete or not. Do you have a debug window? It should normally say something like <second line> unknown command or something. Link to comment Share on other sites More sharing options...
Psych Posted July 1, 2007 Author Report Share Posted July 1, 2007 like i said, the characters i gave you should not be encoded, otherwise it will send the wrong thing. I am not too sure if your encoder compensates for line feeds and that. I know that when i was doing vb.net (as in mucking around with it) and even with mIRC and chat servers, line feeds would always imply a new. Regardless of if the previous statement is complete or not. Do you have a debug window? It should normally say something like <second line> unknown command or something. Okay, I kinda get what yur saying, I only use the UTF8 encoding to get correct names in the chatters list anyway, I'll simply have to write another method in the socket send routine to send all the characters unformatted, and since the roomnames contain no special characters, I should be able to send the whole privmsg in ACSII (I think). Now, this does cause a problem, I originally wanted this for a Hall Of Fame, that being the case all names using special characters wont output correctly (I had this problem with VB6, I couldnt get names to display correctly, they were either displayed as boxes or as ? marks) and that would kinda defeat the object. I will try though, I'm curious to know what's causing it not to function as it should. If I find out why, I'll post the solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now