Articles
|
|
jead99
Feb 26 2005, 02:28 PM
Any1 got any sourcecode or suggestions on how to connect to a irc server and join a channel using C# ?
jead99
Feb 26 2005, 04:38 PM
Well, i solved it myself. It was easier than i expected (duh!) If any1 else should be interested here's some small snippets: CODE 1) Connect to irc server: TcpClient irc = new TcpClient(Server, Port);
2) Join a channel: NetworkStream stream = irc.GetStream (); StreamWriter writer = new StreamWriter (stream); writer.WriteLine ("JOIN " + Channel);
Where Server, Port and Channel are variables you must declare to suit your needs.
linuxwolf
Feb 26 2005, 07:24 PM
See what a little searching can do for you? And don't you feel better doing it yourself?  . If you'd like to get into writing irc with c# further, ask me. Or you could go and find the c# irc module  . Or whatever it's called.
jead99
Feb 26 2005, 09:00 PM
Indeed it feels better to solve the problem by myself  That C# irc module you mentioned is that part of the .net base classes ?
chris105
Feb 26 2005, 11:34 PM
Its a little more complex than that Im afraid Jead but yeah thats the basic bit.
You have to respond to pings from the server and send your username etc etc. The best way is to get a copy of the RFC (http://www.irchelp.org/irchelp/rfc/). The RFC is like a command list if you will. Its best to write a basic implementation and build on top of it. Possibly writing an IRC class (never done this myself).
Good luck, I built one in VB before, any problems post here and one of us will get back to you.
AgentOrange
Feb 27 2005, 01:24 AM
I have such code wrtten in ANSI C, C++ and asm. (differnt kinds of bots, such a backdoors)
Screw C#, horrible idea...
Reenactment: Hey guys, Java (filtered) rules, lets totally rip off java then make it so it not only just runs under windows, but they have to install the shitty .net framework!
Grow some balls and lean how to properly allocate memory.
peace
vnet576
Feb 27 2005, 03:14 AM
Agentorange, the last part wasn't necessary at all. C .net is what it is, and honestly whether we like it or not, its not going anywhere. In fact within a few years most windows programs will be migrating to that language. So learn to deal with it.
Oh and btw, last time that I checked, java also requires a "shitty framework" in order to run.
As for manually allocating memory, why would you want to make things harder? If you're a programmer, I don't understand why you would want to do things manually when they can be automated for you. Isn't that why you program in the first place? To make things easier and more automated?
Of course not...lets reinvent the wheel every time we write a program.
Also, all of this is objective since I personally dislike C .net, but not for the false reasons that you provided.
t0bban
Feb 27 2005, 04:36 AM
Great response mate. Regarding the irc bit, I've built 2 IRC projects using C# and they totally rule ;P One is a bot, working excellent... The other is a chat client.. Anyhow, for some sourcecode I'd have to dig into my server to find something, lemme see.. I'll get back if I find something. QUOTE(vnet576 @ Feb 27 2005, 03:14 AM) Agentorange, the last part wasn't necessary at all. C .net is what it is, and honestly whether we like it or not, its not going anywhere. In fact within a few years most windows programs will be migrating to that language. So learn to deal with it. Oh and btw, last time that I checked, java also requires a "shitty framework" in order to run. As for manually allocating memory, why would you want to make things harder? If you're a programmer, I don't understand why you would want to do things manually when they can be automated for you. Isn't that why you program in the first place? To make things easier and more automated? Of course not...lets reinvent the wheel every time we write a program. Also, all of this is objective since I personally dislike C .net, but not for the false reasons that you provided.
jead99
Feb 27 2005, 07:30 AM
QUOTE(AgentOrange @ Feb 27 2005, 01:24 AM) I have such code wrtten in ANSI C, C++ and asm. (differnt kinds of bots, such a backdoors) Screw C#, horrible idea... Reenactment: Hey guys, Java (filtered) rules, lets totally rip off java then make it so it not only just runs under windows, but they have to install the shitty .net framework! Grow some balls and lean how to properly allocate memory. peace Well, the only reason why i choose C# is because i wanna learn the language. It doesn't require a high iq to see where windows programming is heading.
t0bban
Feb 27 2005, 12:23 PM
And a good choise it is, imo. Learn C#, and develop the future. More and more is going over to the .NET framework, and soon the entire Microsoft market will be depending on it, making us .NET developers an important part of the future developement of systems to come
linuxwolf
Feb 27 2005, 12:35 PM
QUOTE(t0bban @ Feb 27 2005, 12:23 PM) And a good choise it is, imo. Learn C#, and develop the future. More and more is going over to the .NET framework, and soon the entire Microsoft market will be depending on it, making us .NET developers an important part of the future developement of systems to come  Oh how true that is. That's the exact reason that i moved over to c# and .NET. Oh, and this module isn't part of the frame work. And i found the api i was looking for (while rooting around code project without a clue): Smartirc4net - the C# irc library. QUOTE Introduction I wrote SmartIrc4net for having a high-level IRC API for .NET/C#. I started long time ago with IRC programming for PHP, I wrote Net_SmartIRC. Net_SmartIRC is a PEAR class. Later, I was disappointed that the OO features of PHP are so limited. I was starting to port the project to C++, after a few weeks I stopped, so many things are missing and have to be written (even simple things like string manipulation). Then I found C#. And I ported SmartIRC in about 1-2 weeks! After that the API got better and better, it's just great what it is now... so here we are SmartIrc4net.
Object Design This library has a 3 layered API, allows developers to pick the layer/features he needs. You could use any layer for writing IRC applications, the question is how much IRC abstraction and features you need. You have the choice!
Url: http://www.codeproject.com/csharp/smartirc...Irc4net-020.zip (if you have a www.codeproject.com account, and http://www.codeproject.com/csharp/smartirc4net.asp then signup if you don't! It'll be worth your while.) Ben
jead99
Feb 27 2005, 03:00 PM
@linuxwolf: thanks for the links, i'll take a look and contact if i run into some problems  @t0bban: are you a certified c# developer ?
linuxwolf
Feb 27 2005, 05:19 PM
and t0bban, if you are, how much does it cost in £ or $ to take the course and test? Or test alone?
chris105
Feb 27 2005, 05:41 PM
Yeah I would also like to know that, and is it difficult? Is there a age limit etc ?
jead99
Feb 27 2005, 08:09 PM
As i recall the certification is called MSCD and consists of several tests.
linuxwolf
Feb 27 2005, 09:41 PM
Thanks.
IcedOut3E
Mar 15 2005, 01:50 AM
QUOTE Smartirc4net - the C# irc library. Introduction I wrote SmartIrc4net for having a high-level IRC API for .NET/C#. I started long time ago with IRC programming for PHP, I wrote Net_SmartIRC. Net_SmartIRC is a PEAR class. Later, I was disappointed that the OO features of PHP are so limited. I was starting to port the project to C++, after a few weeks I stopped, so many things are missing and have to be written (even simple things like string manipulation). Then I found C#. And I ported SmartIRC in about 1-2 weeks! After that the API got better and better, it's just great what it is now... so here we are SmartIrc4net. Object Design This library has a 3 layered API, allows developers to pick the layer/features he needs. You could use any layer for writing IRC applications, the question is how much IRC abstraction and features you need. You have the choice! Url: http://www.codeproject.com/csharp/smartirc...Irc4net-020.zip (if you have a www.codeproject.com account, and http://www.codeproject.com/csharp/smartirc4net.asp then signup if you don't! It'll be worth your while.) Ben Thanks a ton for that man, should be very useful. I just got an internship doing C# and ASP.NET so I'll be learning both here pretty soon. Although I'm not an entire huge fan of microsoft, I feel that what everyone has said is probably pretty much true. Sometimes, whether you like it or not, you gotta adapt to whats hot or what might be hot. My .2 cents. Peace.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
|