Closed sbstp closed 9 years ago
I'm curious. Under what context are you using Connection directly?
As a client to connect to a remote irc server.
let c = Connection::connect("irc.freenode.net", 6667).unwrap();
c.send(USER("...", "8", "..."));
What specifically do you gain from it versus just using IrcServer?
I want to write a bot, can the IrcServer connect to say freenode and listen to events?
Yes, IrcServer is an abstraction over Connection. There's a number of examples in the examples folder. There's also a simple shell in the README. These changes look good, and I like them. I was just curious as to what you were using Connection for directly.
Alright thanks. It could also be possible to implement ToMessage for &str and be able to send raw command strings to be parsed.
A bug was stopping CLAHub from properly notifying me about contributor license agreements. Can you please sign this, @SBSTP? https://www.clahub.com/agreements/aatxe/irc
Hey. Although I'm not very fond of CLAs I signed it. One thing that's really nice about free software is that you never have to "agree to terms of service". I know that this is different and that you're protecting your project, but I think that it's less than an ideal way of dealing with the issue. I don't like agreeing to terms on the Internet.
Strictly speaking, it's not really a CLA. It's just a public domain declaration. It doesn't just protect this project, it protects everyone who uses it. Unfortunately, public domain laws are somewhat weird, and it's difficult for collaborative projects to exist in the public domain. This is the best solution I have to do it. Though, I suppose a statement in the PR would be equally sufficient.
Ok, fair enough. I understand the the bot is a nice commodity to have.
Hello! I wanted to simplify the API of the
send
method to be simpler. I didn't like having to useto_message
after creating a command, so now the library does it. I was inspired by ToSocketAddr which allows you to convert a bunch of things into aSocketAddr
. Essentially,send
now takes aToMessage
trait, and anything can implement that and be converted to aMessage
. The old API isn't broken as long asToMessage
is imported (althoughtto_message
is used twice).Also sorry about the diff, my editor removed trailing white space here and there.