ChanServ changed the topic of #cinch to: The IRC Framework | http://groups.google.com/group/cinch-ruby/ | Latest version: Cinch 2.0.4 – Change log at http://bit.ly/14Q4s6Z – Migration guide at http://bit.ly/GO4qkW | This channel is being publicly logged at http://irclog.whitequark.org/cinch/
oddmunds has quit [Ping timeout: 240 seconds]
flexd has quit [Ping timeout: 256 seconds]
oddmunds has joined #cinch
audy has joined #cinch
<audy> I want to write a bot that sends me a message when a file is changed without me having to give a command. Is there a way to do this with cinch?
<dominikh> sure.
<dominikh> your_bot.User("your_nick").send("your message") from whereever you are detecting the file change, for example
<audy> dominikh and run this in a separate thread?
<dominikh> yea
<audy> dominikh okay thanks
flexd has joined #cinch
audy has left #cinch ["something went wrong"]
v0n has quit [Ping timeout: 252 seconds]
V8Energy has quit [Ping timeout: 256 seconds]
jhaals has joined #cinch
jhaals has quit []
V8Energy has joined #cinch
jhaals has joined #cinch
kith has quit [Read error: Connection reset by peer]
kith has joined #cinch
jhaals has quit [Ping timeout: 244 seconds]
jhaals has joined #cinch
yield_ has quit [Quit: leaving]
postmodern has quit [Read error: Operation timed out]
txdv has quit [Read error: Operation timed out]
nickrw has quit [Quit: leaving]
nickrw has joined #cinch
V8Energy has quit [Ping timeout: 276 seconds]
catepillar has joined #cinch
v0n has joined #cinch
_whitelogger has joined #cinch
v0n has quit [Ping timeout: 255 seconds]
bean__ has joined #cinch
v0n has joined #cinch
rsantos has joined #cinch
rsantos is now known as romulobr
<romulobr> hi guys, I'm new to cinch, and want to add help functionality to a bot. can you point me to some docs that would help? Maybe some example?
<waxjar> you can set a plugin name with set :plugin_name and set a help message with set :help, 'help string here', it'll automatically display when you call !help <plugin_name>
<romulobr> thanks a lot!
<romulobr> is there a way to show a default message, to be displayed when someone call just !help ?
<dominikh> add a match for the help command
<waxjar> no that i know of. i just did a simple on '!help' match that links to a web page
<waxjar> *not
<romulobr> ok waxjar thanks again, you were very helpful.
<waxjar> yw :)
<romulobr> another quick question, I just got banned from a server while testing my bot (too many disconnects), do you know a good place to test it without getting into trouble?
<dominikh> freenode is relatively lax about reconnects. other options are setting up your own server or putting the bot behind a bouncer/proxy
<romulobr> ok, thank you again.
<romulobr> waxjar: do I need to set anything else to enable this help feature?
<waxjar> it does it all automatically as far as i know
<dominikh> it's automatic.
<romulobr> ok, thanks again guys… it's not working here for some reason, I'll try to figure it out.
<dominikh> show some code :)
<romulobr> here, thanks again: http://pastebin.com/dgVLrGpC
<romulobr> this plugin is working correctly, but the help text is not being shown
<dominikh> how are you trying to invoke the help?
<romulobr> I'm calling !help ssl
<romulobr> on the channel
<dominikh> actually, the help command inherits the plugin's prefix
<dominikh> so in this case it'd be a very awkward !ssl help ssl
<romulobr> Thank you again! You are very helpful! It worked like a charm.
<romulobr> I'm building an help index plugin and thinking if there's a way to get the list of available plugin_names, do you guys know hot to get that list? I can see a class called PluginList on the docs but the doc page is empty.
<dominikh> god rubydoc.info is starting to really piss me off
<dominikh> try http://rubydoc.info/github/cinchrb/cinch/Cinch/PluginList instead. all you need to know, however, is that it's an array
<dominikh> so something like bot.plugins.each {} would iterate over all loaded plugins
<romulobr> thanks again!
jhaals has quit []
Azure has quit [Ping timeout: 245 seconds]
Azure has joined #cinch
[Rickmasta] has joined #cinch
rickmasta has quit [Read error: Connection reset by peer]
V8Energy has joined #cinch
txdv has joined #cinch
[Rickmasta] has quit [Quit: Leaving...]
rickmasta has joined #cinch
<romulobr> is there a way to change the !help command to reply as a private message instead of on the main channel?
<dominikh> nope. you'll have to write your own matchers for that and not use the built-in help
sacc91 has quit [Quit: sacc91]
sacc91 has joined #cinch
<waxjar> how can you turn that one off though?
<dominikh> don't set the help string
<romulobr> no problem, thanks again, I really appreciate your help. We just monkey-patched it for the moment.
romulobr has left #cinch [#cinch]
<maetthew> Is it possible to match for my bots nick in a match?
<maetthew> I mean in a dynamic way
<dominikh> prefixes, and matches, can have lambdas instead of strings/regexps
<dominikh> the lambda is passed the message object that is being matched against
<dominikh> the message object references the bot and you can get the nick via that
<maetthew> dominikh: thanks :)
postmodern has joined #cinch
V8Energy has quit []
sacc91 has quit [Read error: Connection reset by peer]
sacc91 has joined #cinch
bean__ has quit [Quit: Computer has gone to sleep.]
<maetthew> dominikh: is there a reason i can't use variables as prefixes?
<dominikh> only you doing it wrong I suppose
<maetthew> so i _can_ use them?
<dominikh> variables? sure. any variable that is known in the class scope at the time the code is evaluated
<maetthew> i can :P it is me doing it wrong
v0n has quit [Ping timeout: 240 seconds]
bean__ has joined #cinch
bean__ has quit [Max SendQ exceeded]
bean__ has joined #cinch