Giter Site home page Giter Site logo

ruby-irc-yail's People

Contributors

nerdmaster avatar thomas-joiner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ruby-irc-yail's Issues

Fix optional event elements' errors

NoMethodError doesn't really make sense for optional elements, such as what was happening with event.from on prefix-free NOTICE messages. It's probably worth auditing the code to see where it makes sense to have a nil default rather than having exceptions get thrown. In 1.5.x this may be a much bigger problem as the events will be more directly exposed to the users.

Kick doesn't work

The kick doesn't work. I use the IRCBot class.

Here is my code :

def _in_msg(event)
  return if event.pm?
  return if event.nick != "marvin"

  if event.message =~ /^.+: chamber . of 6 => .*\*BANG\*.*$/
    nick = event.message.scan(/^[^:]+/)[1]
    @irc.kick(nick, event.channel)
  end
end

And the error :

/home/erdnaxeli/.rvm/gems/ruby-1.9.3-p374/gems/net-yail-1.6.0/lib/net/yail/legacy_events.rb:192:in legacy_process_event': undefined methodreason' for #<Net::YAIL::OutgoingEvent [kick]:0x00000003039528> (NoMethodError)
from /home/erdnaxeli/.rvm/gems/ruby-1.9.3-p374/gems/net-yail-1.6.0/lib/net/yail/dispatch.rb:19:in dispatch' from (eval):3:inkick'
from /home/erdnaxeli/codaz/Sheraf/lib/sheraf.rb:47:in `_in_msg'

Kick doesn't work

I try with two or three arguments (4 arguments raise an exception and kill the bot), but I only got this message :

I, [2013-02-25T23:39:14.243887 #22488] INFO -- : Unknown raw 461 from irc.iiens.net: KICK Not enough parameters

There is the code (remove the third argument for the two arguments version) :

@irc.kick(nick, event.channel, nick)

Secondly, if I change one of the nick argument to a string, I got a "no such nick/channel" message.

@irc.kick(nick, event.channel, 'test') => Unknown raw 401 from irc.iiens.net: test No such nick/channel
@irc.kick('test', event.channel, nick) => Unknown raw 401 from irc.iiens.net: test No such nick/channel

Is there a better way to set @me?

This needs to be looked into, as the current system is based almost entirely on the original source YAIL was written out of. It doesn't seem to always be working.

SSL Connection fails (Nil)

When I tried to connect to irc.hackint.eu:6697 with SSL it failed with the message:
net-yail-1.6.1/lib/net/yail/message_parser.rb:68:in initialize': undefined method split' for nil:NilClass (NoMethodError)

Track users (per channel)

This would add filters and some terrible magic. On joining a channel, request a user list. When anybody parts / quits / joins / etc (other messages?), update user list.

:silent doesn't work

I have all the log with or without :silent.

Futhermore, you say :silent is deprecated, but how can I set the log level without use :silent ?

output_api should use CRLF

According to the documentation, puts will end everything with a "record separator usually a LF".

However, according to RFC1459:

"IRC messages are always lines of characters terminated with a CR-LF (Carriage Return - Line Feed) pair, and these messages shall not exceed 512 characters in length, counting all characters including the trailing CR-LF."

As such the definition for raw should be something like:

def raw(line, report = true)
@socket.send "#{line}\r\n", 0
report "bot: #{line.inspect}" if report
end

(Note that one could also use @socket.write, I just used send).

I found this out because the server I was trying to connect to claimed that I was not sending it a password, despite the fact that I could see it was sending it. At first I thought it was some sort of timing issue, due to the fact that once I put the password send right after the socket creation it worked, but it turned out that I had just ended the command with CRLF because that's what I'm used to doing with text protocols. Thankfully I noticed what it was before I submitted a bug report for the server password not working properly.

I'm not sure if most servers will accept both LF and CRLF as a line ending. However, the particular server I was connecting to didn't. (The server is one of justin.tv's IRC servers for the record).

I've forked it and will perform a pull request.

What can i do for issueing `WHOIS' to server.

i use create_command and get below result.

`legacy_process_event': Unknown outgoing event: #<Net::YAIL::OutgoingEvent [whois]:0x00000000eb6680> (RuntimeError)

something wrong w/ my define?

@irc.create_command :whois,  "WHOIS :nick", :nick

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.