Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Error from bot on !anycommand #11

Closed
ThinIce opened this issue Jul 16, 2010 · 6 comments
Closed

Error from bot on !anycommand #11

ThinIce opened this issue Jul 16, 2010 · 6 comments

Comments

@ThinIce
Copy link

ThinIce commented Jul 16, 2010

Just downloaded the code, this project looks great however I'm running into problems using it with the basic testing leaves included...

Example (Stem): << :redacted.users.quakenet.org PRIVMSG #redacted :!insult
undefined method merge' for nil:NilClass /home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:621:incommand_parse'
/home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:220:in block in irc_privmsg_event' /home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:317:indatabase'
/home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:218:in irc_privmsg_event' /home/bouncer/.bundle/ruby/1.9.1/gems/facets-2.8.4/lib/core/facets/kernel/respond.rb:18:inrespond'
/home/bouncer/RISCfuture-autumn-68e850f/libs/stem.rb:481:in block (2 levels) in broadcast' Example (Stem): >> PRIVMSG #fatserv :Listener Insulter::Controller raised an exception responding to irc_privmsg_event: undefined methodmerge' for nil:NilClass
undefined method merge' for nil:NilClass /home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:621:incommand_parse'
/home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:220:in block in irc_privmsg_event' /home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:317:indatabase'
/home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:218:in irc_privmsg_event' /home/bouncer/.bundle/ruby/1.9.1/gems/facets-2.8.4/lib/core/facets/kernel/respond.rb:18:inrespond'
/home/bouncer/RISCfuture-autumn-68e850f/libs/stem.rb:481:in block (2 levels) in broadcast' Example (Stem): >> PRIVMSG #redacted :Listener Administrator::Controller raised an exception responding to irc_privmsg_event: undefined methodmerge' for nil:NilClass

I'm new to Ruby, so not sure where to start on debugging this one...

@RISCfuture
Copy link
Owner

Trying to reproduce. I got an auth'd nick on QuakeNet and did the exact same thing...


Example (Stem): << :RISCfuture!~RISCfutur@RISCfuture.users.quakenet.org PRIVMSG #stupidtest :!insult
Example (Stem): >> PRIVMSG #stupidtest :Type "!insult Ted" to crush Ted's spirit with a devastating insult.

Still looking into it...

@RISCfuture
Copy link
Owner

Although you show your user portion as :[host], whereas mine is of the form :[nick]![user]@[host] -- any idea why that is? Or is that obfuscated by your "redacted"?

@ThinIce
Copy link
Author

ThinIce commented Jul 16, 2010

Ah. Yeah just took that out as force of habit really, the actual string is in the same format as yours, but does contain [ ] characters in the nick portion and also a \ in addition to the [ ] in the user portion, i.e

[tag]nick!~nick@[tag\i]nick.users.quakenet.org

My apologies for having an awkward nick and QN auth :) especially on a friday night. Having played about a little it does look like the [ and ] characters are causing a problem, not sure about the \

@RISCfuture
Copy link
Owner

I suspect the issue is that the RFC specs for IRC state that a nick must begin with a letter, whereas yours begins with an open bracket. In your stems.yml file, try setting the nick_regex option for your stem to something that allows open brackets too.

See Autumn::Stem::NICK_REGEX for the default regex, and build off of that. Let me know how this works for you.

@ThinIce
Copy link
Author

ThinIce commented Jul 26, 2010

Thanks, huh all those gamers with RFC incompatible nicks :p My regexp isn't too hot however this seems to do the trick in my own case.

# The default regular expression for IRC nicknames. NICK_REGEX = "[a-zA-Z\[\]][a-zA-Z0-9\-_\[\]\{\}\\|`\^]+"

@RISCfuture
Copy link
Owner

Closing

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants