riscfuture / autumn Goto Github PK
View Code? Open in Web Editor NEWEasy, fresh, feature-rich IRC bots in Ruby
Easy, fresh, feature-rich IRC bots in Ruby
I have implemented on my leaf the someone_did_join_channel event and I have noticed the following:
I really do not understand at what point the users get updated with their proper channel levels. This is very confusing
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?
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
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.
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:in
load_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:in
new'
/usr/local/lib64/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core.rb:266:in setup' ./libs/genesis.rb:169:in
load_databases'
./libs/genesis.rb:168:in each' ./libs/genesis.rb:168:in
load_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:in
call'
/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:in
each'
/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:in
invoke_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:in
invoke_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:in
each'
/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:in
invoke_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:in
invoke_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:in
invoke_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:in
each'
/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:in
standard_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:in
run'
/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:in
run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:8:in `load'
/usr/bin/rake:8
$
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
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:in
each'
/home/jim/Desktop/ircbot/libs/stem.rb:577:in build_irc_message' /home/jim/Desktop/ircbot/libs/stem.rb:565:in
method_missing'
/home/jim/Desktop/ircbot/libs/ctcp.rb:211:in method_missing' /home/jim/Desktop/ircbot/leaves/administrator/controller.rb:51:in
quit_command'
/home/jim/Desktop/ircbot/libs/leaf.rb:636:in command_exec' /home/jim/Desktop/ircbot/libs/leaf.rb:622:in
command_parse'
/home/jim/Desktop/ircbot/libs/leaf.rb:220:in block in irc_privmsg_event' /home/jim/Desktop/ircbot/libs/leaf.rb:317:in
database'
/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:in
respond'
/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.
According to the documentation each_leaf
yields an object of Autumn::Leaf. When I tried it out, I instead got an array with the name and the leaf itself.
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.
like rails, I've lost about 5 minutes to install all gens to do a db:migrate
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...
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!
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:in
command_parse'
testbot/libs/leaf.rb:220:in block in irc_privmsg_event' testbot/libs/leaf.rb:317:in
database'
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:in
respond'
testbot/libs/stem.rb:490:in block (2 levels) in broadcast' undefined method
merge' for nil:NilClass
testbot/libs/leaf.rb:621:in command_parse' testbot/libs/leaf.rb:220:in
block 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:in
scope'
/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:in
repository'
testbot/libs/leaf.rb:315:in database' 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:in respond' testbot/libs/stem.rb:490:in
block (2 levels) in broadcast'
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.
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....
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
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.
I should have raised this as an issue but before I realised this I went ahead and edited the wiki page. Apologies if I got it wrong.
https://github.com/RISCfuture/autumn/wiki/Tutorial:-Your-first-bot
The change I made was to add a hint to add "gem 'facets'" to the Gemfile for the Fortune leaf. There may be a better way of doing this.
In future I'll raise an issue rather than edit the wiki myself.
Hello
I was trying to read some articles in the wiki but they appear missing:
http://github.com/RISCfuture/autumn/wikis/tutorial-colorizing-irc-messages
https://github.com/RISCfuture/autumn/wiki/tutorial-securing-your-bot
https://github.com/RISCfuture/autumn/wiki/tutorial-storing-persistent-data
The incoming message sometimes has coloring etc. Is there a utility method to make the string plain or should i use the ruby String class to do it?
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.
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?
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 :)
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'
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?
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:in
default_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:in
load'
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:in
require'
from /home/testbot/libs/genesis.rb:62:in load_pre_config_files' from /home/testbot/libs/genesis.rb:20:in
initialize'
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:in
start_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:in
run'
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:in
call'
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:in
run'
from script/daemon:30:in `
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:in
preconfigure'
./libs/foliater.rb:217:in start_stems' ./libs/foliater.rb:217:in
each'
./libs/foliater.rb:217:in start_stems' ./libs/foliater.rb:39:in
load'
./libs/genesis.rb:173:in invoke_foliater' ./libs/genesis.rb:45:in
boot!'
script/server:12
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:in
command_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:in
database'
/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:in
respond'
/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 method
merge' for nil:NilClass
undefined method merge' for nil:NilClass /home/bouncer/RISCfuture-autumn-68e850f/libs/leaf.rb:621:in
command_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:in
database'
/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:in
respond'
/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 method
merge' for nil:NilClass
I'm new to Ruby, so not sure where to start on debugging this one...
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?
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
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?
Successfully installed autum. Tried using the Insulter.
Works without providing a name, but once I add one, it outputs the help text.
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.
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 class
Module'
/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
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
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?
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:
Any ideas?
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
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
Are they supposed to fire up with irc_[event]_event or does it work with commands only? Is there a workaround for this?
http://github.com/atj/autumn/commit/649eac37e648b63e55706980b10dd9db5005dcec
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.