Giter VIP home page Giter VIP logo

autumn's People

Contributors

atj avatar bterlson avatar comboy avatar raws avatar riscfuture 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

autumn's Issues

Problem with synchronization

I have three channels with people on its access list and I am trying to build a global hash with the nicks and their access level from all three channels. In addition, for each nickname i am doing a nickserv glist NICK which returns the grouped nicks for that nickname and i add those to the global staff list as well.

The problem is that sometimes this works and some times it does not because did_receive_notice is being triggered by the next notice request (since the bot is threaded) and the previous request might hasn't complete yet.

I need a way to make did_receive_notice of a specific leaf to be synchronized with all threads and make each thread wait until the previous one is finished and to also ensure that this won't get interrupted by something else. For example if while the list is returned and another notice comes to the bot it will mess with the process of the list parsing (since did_receive_notice will be triggered) so i need to have a way to ensure that this process won't get interrupted.

Is this possible through the autumn framework?

More generally speaking i think these kind of problems should be added in documentation. I find it very difficult to implement various things due to the fact that everything is threaded and I have no way to control the threading whenever I must e.g when i want to receive the access list for a channel and process that list or anything else that returns a lot of lines as result

establishing persistence issues with scorekeeper

I cloned a new copy, did a bundle install, and fire things up to see how the example scorekeeper worked, but I am struggling to get things functional.

I did a

DB=scorekeeper rake db:migrate 

and sqlite shows a valid schema when I hit the resulting database file to check things out.

I fire the app up, and it joins the channel, and I type this:

!points foo +1

and these logs are thrown:

Example (Stem): << :[email protected] PRIVMSG #t :!points foo +1
undefined method `include?' for nil:NilClass
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core/resource.rb:332:in `block in attributes='
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core/resource.rb:329:in `each'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core/resource.rb:329:in `attributes='
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core/resource.rb:748:in `initialize'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-validations-1.2.0/lib/dm-validations.rb:129:in `new'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-validations-1.2.0/lib/dm-validations.rb:129:in `create'
/Users/jong/f5/autumn/leaves/scorekeeper/controller.rb:44:in `parse_change'
/Users/jong/f5/autumn/leaves/scorekeeper/controller.rb:22:in `points_command'
/Users/jong/f5/autumn/libs/leaf.rb:636:in `command_exec'
/Users/jong/f5/autumn/libs/leaf.rb:622:in `command_parse'
/Users/jong/f5/autumn/libs/leaf.rb:220:in `block in irc_privmsg_event'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core.rb:263:in `block in repository'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114:in `scope'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core.rb:263:in `repository'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/dm-core-1.2.0/lib/dm-core/core_ext/kernel.rb:20:in `repository'
/Users/jong/f5/autumn/libs/leaf.rb:315:in `database'
/Users/jong/f5/autumn/libs/leaf.rb:218:in `irc_privmsg_event'
/usr/local/rvm/gems/ruby-1.9.3-head/gems/facets-2.9.2/lib/core/facets/kernel/respond.rb:29:in `respond'
/Users/jong/f5/autumn/libs/stem.rb:490:in `block (2 levels) in broadcast'
Example (Stem): >> PRIVMSG #t :Listener Scorekeeper::Controller raised an exception -- check the logs for details.

Almost as if the database isn't being finalized?

Any ideas what I'm doing wrong?

Stem.whois result...returned where?

I am doing a stem.whois("username") inside my leaf but I do not understand where exactly the result is returned. None of the leaf events are firing....

undefined_method when calling helper module method from controller

I can not explain this but i suddenly get undefined_method error when i call a method defined in a helper module. The only thing I changed to my code was to download latest autumn.

In order to make a test of this i downloaded latest code from git and made a helper inside leaves/insulter/helpers with the name general.rb and helper name GeneralHelper and defined one method

def test_me
a = 1
end

After that i added a call of that method inside leaves/insulter/controller.rb, i call it with self.test_me and i get the undefined_method error.

can't find the Hash#key method

Hey i don't know what library Hash#key is supposed to be in, but it's not in any of the current versions of the gems required by autumn!

Insulter doesn't take name

Successfully installed autum. Tried using the Insulter.

Works without providing a name, but once I add one, it outputs the help text.

rake app:<command> causes error

Hello,

I have changed :monitor in script/daemon to true and then i am doing the following which results in error:

root@localhost:/home/testbot# rake app:run
(in /home/testbot)
autumn: process with pid 5364 started.
Loading Autumn 3.0 (7-4-08)
/usr/local/rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:21:in default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound) from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler.rb:187:indefault_gemfile'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler.rb:157:in root' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler.rb:116:inload'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler.rb:107:in setup' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler.rb:112:inrequire'
from /home/testbot/libs/genesis.rb:62:in load_pre_config_files' from /home/testbot/libs/genesis.rb:20:ininitialize'
from /home/testbot/script/server:12:in new' from /home/testbot/script/server:12:in<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons/application.rb:203:in load' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons/application.rb:203:instart_load'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons/application.rb:296:in start' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons/controller.rb:73:inrun'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons.rb:143:in block in run' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons/cmdline.rb:112:incall'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons/cmdline.rb:112:in catch_exceptions' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/daemons-1.1.0/lib/daemons.rb:142:inrun'
from script/daemon:30:in `

'

Username starting with _ (underscore) raises exception on command

Hello

I just discovered a weird problem. If a username which starts with _ executes a !command then an exception is raised. More specifically:

i have implemented in my controller did_receive_channel_message and one command, test_command, and everytime the user with underscore in front types !test, the sender parameter in leaf.rb, line 614 is nil. The problem i think starts in stem.rb however, line 490, were args[1] is nil as well.

Debug log shows the following:

undefined method merge' for nil:NilClass testbot/libs/leaf.rb:621:incommand_parse'
testbot/libs/leaf.rb:220:in block in irc_privmsg_event' testbot/libs/leaf.rb:317:indatabase'
testbot/libs/leaf.rb:218:in irc_privmsg_event' /home/tester/.rvm/gems/ruby-1.9.2-p136/gems/facets-2.8.4/lib/core/facets/kernel/respond.rb:18:inrespond'
testbot/libs/stem.rb:490:in block (2 levels) in broadcast' undefined methodmerge' for nil:NilClass
testbot/libs/leaf.rb:621:in command_parse' testbot/libs/leaf.rb:220:inblock in irc_privmsg_event'
/home/tester/.rvm/gems/ruby-1.9.2-p136/gems/dm-core-1.0.2/lib/dm-core.rb:299:in block in repository' /home/tester/.rvm/gems/ruby-1.9.2-p136/gems/dm-core-1.0.2/lib/dm-core/repository.rb:114:inscope'
/home/tester/.rvm/gems/ruby-1.9.2-p136/gems/dm-core-1.0.2/lib/dm-core.rb:299:in repository' /home/tester/.rvm/gems/ruby-1.9.2-p136/gems/dm-core-1.0.2/lib/dm-core/core_ext/kernel.rb:8:inrepository'
testbot/libs/leaf.rb:315:in database' testbot/libs/leaf.rb:218:inirc_privmsg_event'
/home/tester/.rvm/gems/ruby-1.9.2-p136/gems/facets-2.8.4/lib/core/facets/kernel/respond.rb:18:in respond' testbot/libs/stem.rb:490:inblock (2 levels) in broadcast'

Autumn as rubygem

Hi,

I was wondering if it is possible to make autumn a gem so that we can import it on our projects in the same way we do for other frameworks (like rails does, for instance).

Thanks

Bot dying on netsplit

Autumn crashes on netsplits here. I'm using it with Daemons and it does not appear in the channels after the netsplit, but the process is still running. The Logs don't show any conspicuities.

Helper classes in lib folder are being loaded and included in controller

From documentation:

"Helper modules placed in your leaf’s helpers directory will automatically be loaded and included in your leaf controller and views. To create a helper module, place Ruby files to be loaded into the helpers directory. Make sure your helper modules’ names end with the word "Helper"."

The problem is that i created a MessageHelper class inside lib directory and i get the following error:

"wrong argument type Class (expected Module)"

If i change my class name to MessageWhatever it loads just fine. I would expect that classes with Helper suffix in library folder wouldn't automatically be appended to controller and views.

Is this is a bug or should i just use a different name? (Although the "Helper" suffix is the one I need)

My file looks like this:

module Testleaf
class TestHelper
end
end

channel_members/users acting strangely

I tried to implement some kind of peak function, which counts the highest amount of people in a channel.

At first I tried users(reply_to).length to get the actual amount of people, but it doesn't work properly if someone joins the channel, there aren't all the people in the array than there should be.
Similar problem with stem.channel_members[reply_to].keys.to_s. Reproducable:

  1. Foo joins (empty) #channel and gets op
  2. Bot joins #channel
  3. !peak # => FooBot
  4. Bar joins #channel
  5. !peak # => FooBot
  6. Foo gives Bar op
  7. !peak # => FooBarBot

Any ideas?

Consider adding Ruby version requirement to README

I figured it out by digging around through an open issue, but I wasn't sure whether this app relied on 1.8 or 1.9. The copyright date and README date to 2008, so I was figuring that 1.8 would be required. Would make it easier for new users :)

Leaf with sqlite

Has anyone tested this?

I created a leaf named test and i updated config/seasons/test/database.yml with:

test:
adapter: sqlite3
database: leaves/test/data/test.db

Database test.db does exist in the above location (it's an empty file) and then i run through terminal the following:

arekanderu@localhost:/home/dev/testbot$ DB=test rake db:migrate --trace
(in /home/dev/testbot)
** Invoke db:migrate (first_time)
** Invoke boot (first_time)
** Execute boot
** Execute db:migrate
Migrating the test database...

The test.db however stays 0 bytes and it seems that no tables were created in it.
sqlite3 is installed of course and all the necessary gems.

Any pointers please of what am i doing wrong?

set_channel_property

def foo_command(stem, sender, channel, msg)
set_channel_property '#mychannel', :secret
end

!foo # => Listener Global::Controller raised an exception responding to irc_privmsg_event: undefined method `channel_property' for #<Autumn::Daemon >

Any ideas?

Stem.privilege returns wrong privilege level

I have implemented on my leaf the someone_did_join_channel event and I have noticed the following:

  1. Channel Founder (+q) or Channel Admin (+a) joins the channel and gets the user mode from chanserv.
  2. someone_did_join_channel() is called and the first method i am calling inside the event is stem.privilege(channel, nick) which i would expect to return :channel_owner or :admin symbol but instead i am getting :unvoiced

I really do not understand at what point the users get updated with their proper channel levels. This is very confusing

Restricting Leaf to specific channel(s) via stems.yml

Hello,

I was wondering if this is already implemented or not. For example i have a bot with multiple leafs and i want to make the leaf listeners to be executed for specific channels only.

Currently i am checking it in code if the channel matches the one i am interested the leaf to respond but i thought if a more elegant way is available.

It would be nice to specify in stems.yml (or in another configuration file) which channel(s) the leaf should respond to.

Error from bot on !anycommand

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...

Helpers folder

Hello

It seems that everything in helpers folder must be a module (which is included in controller and views) but what if i want to use the folder to add a helper class for my lib classes? It seems that it causes "wrong argument type Class (expected Module)" error if i do so.

Should i just create a different folder for them or is there a simpler way to autoload them with the current leaf structure?

Cheers

Difficulties with setting leaf gem requirements

Can't quite work out whether this is me being thick (quite possible).

I'm trying to use the gem steam-condenser in a leaf. The gem is correctly installed on the system and works in a simple test program outside of the Autumn directory with an appropriate require statement for the aspect I'm trying to use

require 'steam/community/steam_group'

I've populated the leaf's individual Gemfile as follows

group :steam do

Insert your leaf's gem requirements here

gem 'steam-condenser'
end

If I change into the leaf directory and issue bundle install the following is output

bundle install
Using steam-condenser (0.11.1) from system gems
Your bundle is complete! Use bundle show [gemname] to see where a bundled gem is installed.

I'm a bit confused as to how to proceed from here, do I need to require something in the leafs controller? Neither the require statement above or require 'steam-condenser' work.

Sorry if this is a deeply thick question / I've missed the instructions somewhere. Am new to Ruby, so unclear If I've actually done setting up the gem for use in Autumn correctly.

!Quit command error

Hi

Still feeling my way, apologies if this is fixed / in the process of being fixed / is something again specific to me :p I note there is a comment regarding the !quit command in known issues, but this isn't a full crash so not sure if that's relevant...

on the !quit command I'm getting the following

Example (Stem): >> PRIVMSG #mychannel :Listener Administrator::Controller raised an exception responding to irc_privmsg_event: message is required

I've changed leaves/administrator/controller.rb so that it has stem.quit(msg) rather than just stem.quit and this seems to work, however

  1. Is this my fault somehow? (i.e some option I've not set) ;)
  2. If not, is there currently a way of placing a default quit message in the bot's config I'm missing?

Bot tries to join a registered users channel before identifiying

I have configured in my stem the bot to join a channel which is a "registered users only" channel and instead of identifying first with the password provided in the stem file, it first tries to join (and gets an expected 'Only registered users can join this channel' error) and then successfully identifies. 'rejoin' parameter is set to true in stem as well, didn't really help.

Authentication::Op.authenticate

Hello,

Is there a reason that the authenticate method in line 80 of authentication.rb takes 'leaf' as a last parameter? Or it's just forgotten there?

Bot bootstrapping

Hello,

I was wondering if there is a way to bootstrap the bot. For example i would like to initialize a class and make the bot sajoin some channels after it connects to the ircd server.

At the moment i have implemented a "bootstrap" leaf and i am only overriding did_start_up method and make my initializations there.

Is there a more elegant way to do this?

wrong constant name op

Hi, exactly what I was looking for. A rails-based irc bot framework. :D

Just cloned autumn today and installed all the data mapper gems (using latest 0.9.x versions) required. ruby is at 1.8.6 and rails is at 2.3.3. Configured the season folder and ran db:migrate successfully. Not sure what's wrong below. Any hints?

metaxa autumn $ script/server
Loading Autumn 3.0 (7-4-08)
wrong constant name op
./libs/leaf.rb:200:in const_get' ./libs/leaf.rb:200:inpreconfigure'
./libs/foliater.rb:217:in start_stems' ./libs/foliater.rb:217:ineach'
./libs/foliater.rb:217:in start_stems' ./libs/foliater.rb:39:inload'
./libs/genesis.rb:173:in invoke_foliater' ./libs/genesis.rb:45:inboot!'
script/server:12

script/generate has wrong requires

in autumn 3.1.11 the script/generate created has one require at the top:

require 'libs/script'

it needed this to work:

require 'rubygems'
require 'autumn/script'

!quit results in an Error

Hello,

When trying to perform: !quit from a fresh Autumn install I receive:
Example (Stem): << :Datawalke!~[email protected] PRIVMSG #ircish :!quit
message is required
/home/jim/Desktop/ircbot/libs/stem.rb:578:in block in build_irc_message' /home/jim/Desktop/ircbot/libs/stem.rb:577:ineach'
/home/jim/Desktop/ircbot/libs/stem.rb:577:in build_irc_message' /home/jim/Desktop/ircbot/libs/stem.rb:565:inmethod_missing'
/home/jim/Desktop/ircbot/libs/ctcp.rb:211:in method_missing' /home/jim/Desktop/ircbot/leaves/administrator/controller.rb:51:inquit_command'
/home/jim/Desktop/ircbot/libs/leaf.rb:636:in command_exec' /home/jim/Desktop/ircbot/libs/leaf.rb:622:incommand_parse'
/home/jim/Desktop/ircbot/libs/leaf.rb:220:in block in irc_privmsg_event' /home/jim/Desktop/ircbot/libs/leaf.rb:317:indatabase'
/home/jim/Desktop/ircbot/libs/leaf.rb:218:in irc_privmsg_event' /home/jim/.rvm/gems/ruby-1.9.2-p0/gems/facets-2.8.4/lib/core/facets/kernel/respond.rb:18:inrespond'
/home/jim/Desktop/ircbot/libs/stem.rb:484:in `block (2 levels) in broadcast'
Example (Stem): >> PRIVMSG :Listener Administrator::Controller raised an exception responding to irc_privmsg_event: message is required

Could you lend any insight as to what is going on? I am currently using rvm with Ruby 1.9.2

Thank you.

"no such file to load -- dm-sqlite-adapter" on first migrate

I get the following error when I try to migrate the scorekeeper database.

What's wrong?

$ DB=scorekeeper rake db:migrate --trace
(in /home/chris/Aptana Studio 3 Workspace/autobot2)
** Invoke db:migrate (first_time)
** Invoke boot (first_time)
** Execute boot
rake aborted!
no such file to load -- dm-sqlite-adapter
/usr/local/lib64/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:163:in require' /usr/local/lib64/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:163:inload_adapter'
/usr/local/lib64/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:133:in adapter_class' /usr/local/lib64/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:13:innew'
/usr/local/lib64/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core.rb:266:in setup' ./libs/genesis.rb:169:inload_databases'
./libs/genesis.rb:168:in each' ./libs/genesis.rb:168:inload_databases'
./libs/genesis.rb:35:in boot!' /home/chris/Aptana Studio 3 Workspace/autobot2/Rakefile:20 /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in synchronize' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in invoke_prerequisites' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ineach'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in invoke_prerequisites' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:ininvoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in synchronize' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:8:in `load'
/usr/bin/rake:8
$

Sending /MODE and /KICK commands and working with Services

Hello,

I have been going through the code and i am trying to find out how to send a /COMMAND to the server.

For example i wanna send /KICK user #channel MESSAGE but I am not sure how. Same goes for /MODE

Also, whats the best way to interact with services? For example i would like to run a /chanserv access #channel list command. Would it be with privmsg or is there a better way?

channel_members becomes nil?

Hi, i’m coming up with a bit of a strange bug, and it seems to be directly related to autumn, but i’m pretty bad at debugging these sorts of things, so i might be mistaken.
Steps to reproduce: 1. require ‘facets/random’ 2. stem.channel_members[reply_to].pick_key #get a random nick from the current channel 3. repeat step 2 several times
Result: stem.channel_members[reply_to] becomes nil ! and therefore step to will give a no such method error for nil.pick_key
Expected result: it does not become nil, but continues to function

unable to run current version of datamapper with current version of autumn

It seems that they are incompatible.

Current version of Autumn gem is 3.1.11, current version of datamapper is 0.10.2.

I have also tried installing older versions of datamapper (back to 0.9.11)

The problem has something to do with the setup method that is aliased in datamapper_hacks

$ rake db:migrate --trace
(in /Users/dav/code/bot)
** Invoke db:migrate (first_time)
** Invoke boot (first_time)
** Execute boot
rake aborted!
undefined method setup' for classModule'
/opt/DarwinPorts/lib/ruby/gems/1.8/gems/autumn-3.1.11/lib/autumn/datamapper_hacks.rb:20:in `alias_method'
/opt/DarwinPorts/lib/ruby/gems/1.8/gems/autumn-3.1.11/lib/autumn/datamapper_hacks.rb:20

stem.sajoin and stem.sapart caused undefined method error

I gave ircop access to the bot (opers ups successfully) and i implemented a command inside my controller:

def test_command(stem, sender, reply_to, msg)
stem.sajoin(sender[:nick], '#channel')
end

The above will cause undefined method 'sajoin' and the same goes for sapart.

Double output with stem.message() ?

Finding Autumn really handy and enjoying learning Ruby but can't quite get to the bottom of this one. As an example I have a very basic command

def dietest_command(stem, sender, reply_to, msg)
stem.message('test', reply_to)
end

However when executed this returns two lines rather than one

Example (Stem): >> PRIVMSG #ourchannel :test
Example (Stem): >> PRIVMSG #ourchannel :test

This also happens if I modify the function to

def dietest_command(stem, sender, reply_to, msg)
stem.message('test')
end

Hopefully I'm just missing something obvious, any pointers greatly appreciated...

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.