[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Is it hard to code an IRC client? Why doesn't every /g/user
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 10
Thread images: 1
File: 1462978259200.png (55 KB, 1124x685) Image search: [Google]
1462978259200.png
55 KB, 1124x685
Is it hard to code an IRC client? Why doesn't every /g/user have his own IRC client?
>>
It's boring desu. very simple protocol with little interesting features. something like tox tho...
>>
>>54753746
Take this to the stupid questions thread
>>
>>54753765
>very simple protocol
Even more reasons for everyone on /g/ to create his very own special snowflake client to brag about on #4chan
>>
>>54753794
it's easier to put up some shitty generic themes or shave your legs and post it for attention tho
>>
public class HackBot {

public static void main(String[] args) throws Exception {

// The server to connect to and our details.
String server = "irc.freenode.net";
String nick = "simple_bot";
String login = "simple_bot";

// The channel which the bot will join.
String channel = "#irchacks";

// Connect directly to the IRC server.
Socket socket = new Socket(server, 6667);
BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(socket.getOutputStream( )));
BufferedReader reader = new BufferedReader(
new InputStreamReader(socket.getInputStream( )));

writer.write("NICK " + nick + "\r\n");
writer.write("USER " + login + " 8 * : Java IRC Hacks Bot\r\n");
writer.flush( );

// Read lines from the server until it tells us we have connected.
String line = null;
while ((line = reader.readLine( )) != null) {
if (line.indexOf("004") >= 0) {
// We are now logged in.
break;
}
else if (line.indexOf("433") >= 0) {
System.out.println("Nickname is already in use.");
return;
}
}

// Join the channel.
writer.write("JOIN " + channel + "\r\n");
writer.flush( );

// Keep reading lines from the server.
while ((line = reader.readLine( )) != null) {
if (line.toLowerCase( ).startsWith("PING ")) {
// We must respond to PINGs to avoid being disconnected.
writer.write("PONG " + line.substring(5) + "\r\n");
writer.write("PRIVMSG " + channel + " :I got pinged!\r\n");
writer.flush( );
}
else {
System.out.println(line);
}
}
}

}
>>
>Is it hard to code an IRC client?
No, it's quite easy. I've done it.

>Why doesn't every /g/user have his own IRC client?
Because /g/ is full of fucking retards like you that don't know shit about programming.
>>
>>54754045
>java
>>
>>54754883
this
/thread
>>
>>54753746
>Is it hard to code an IRC client?
It's impossible for dumb frogposters
Thread replies: 10
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.