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/
v0n has quit [Ping timeout: 255 seconds]
julian-delphiki has quit [Ping timeout: 255 seconds]
julian-delphiki has joined #cinch
davidboy has quit [*.net *.split]
Rennex has quit [*.net *.split]
davidboy has joined #cinch
Rennex has joined #cinch
julian-delphiki has quit [Quit: Computer has gone to sleep.]
Lemtzas has quit [Quit: No Ping reply in 180 seconds.]
Lemtzas has joined #cinch
waxjar has quit [Ping timeout: 245 seconds]
waxjar has joined #cinch
waxjar has quit [Ping timeout: 245 seconds]
waxjar has joined #cinch
Lemtzas has quit [Quit: No Ping reply in 180 seconds.]
Lemtzas has joined #cinch
caitlinface is now known as CaitlintheBlue
CaitlintheBlue is now known as caitlinface
v0n has joined #cinch
v0n has quit [Read error: Operation timed out]
postmodern has quit [Quit: Leaving]
jhaals has joined #cinch
jhaals has quit [Ping timeout: 245 seconds]
jhaals has joined #cinch
jhaals has quit [Ping timeout: 252 seconds]
jhaals has joined #cinch
jhaals has quit []
jhaals has joined #cinch
v0n has joined #cinch
v0n has quit [Ping timeout: 260 seconds]
v0n has joined #cinch
julian-delphiki has joined #cinch
qb has quit [Read error: Connection reset by peer]
qb has joined #cinch
jhaals has quit []
jhaals has joined #cinch
jhaals has quit [Client Quit]
jhaals has joined #cinch
<maetthew> Azure: Sorry this was several days ago but I'm curious about this :)
<maetthew> Azure [07:41:07] did create a helper/redis-based system for managing "admins" and "trusted users", which would require a require and some conditional code to use.
jhaals has quit []
solidoodlesuppor has joined #cinch
<solidoodlesuppor> Hey guys
<solidoodlesuppor> Trying to get a logger going in cinch. Any advice?
<maetthew> solidoodlesuppor: I'm ruby noob but and I'm not sure what you mean about "logger". But I used the built in "Logger" that logs some stuff to a file
<solidoodlesuppor> I can't seem to find an example of its use
<Cinchy> [URL] Class: Logger (Ruby 1.9.3)
<maetthew> lots of stuff here
<solidoodlesuppor> hmm but what comes out is the same stuff in the console right?
<solidoodlesuppor> I wouldn't mind stripping it down to just IRC messages
<maetthew> Well no.
<maetthew> I guess you could probably use Logger to do that but if you do something like
<maetthew> hold on
<maetthew> solidoodlesuppor: :
<maetthew> oops
<Cinchy> [gist] Logger example (at gist.github.com, maetthew on 2013-03-08 18:02)
<maetthew> Nothing from the Cinch console gets outputted there for me anyway (mind you this is not example is not bundled with Cinch, but it's the same result I get anyway)
<solidoodlesuppor> Yeah, but I'm trying to log all the crud from the actual channel
<maetthew> How are you reading it?
<maetthew> Are you matching specific stuff?
<solidoodlesuppor> Nope.
<solidoodlesuppor> Just want it write down everything that happened
<maetthew> I guess you could do a match that matches anything. And put that in the log
<maetthew> You basically want an IRC log, with just all the messages sent to a channel?
<solidoodlesuppor> Yup
<maetthew> Should be able to do "match /(.+), method: :logeverything"
<maetthew> then a method called logeverything :P
<solidoodlesuppor> But what am I matching? The output doesn't come any one place.
<maetthew> well you're matching anything? :p
<maetthew> solidoodlesuppor: are you good with ruby? should i assume you're better/worse than me? :P
<solidoodlesuppor> I'm most likely about the same
<solidoodlesuppor> but what am I matching the regex to? Stdout?
<solidoodlesuppor> A variable?
<maetthew> well to a parameter in the method
<maetthew> hold on
<Cinchy> [gist] cinch.rb (at gist.github.com, maetthew on 2013-03-08 18:11)
<maetthew> something like this
<maetthew> each regex group within a match is parsed to a parameter in the method.
<solidoodlesuppor> I haven't seen something like line 1 before
<solidoodlesuppor> This calls match on anything in the output of the program?
<maetthew> no it matches messages
<maetthew> any messages sent in a channel and/or query
<maetthew> sorry i misunderstood your question above
<maetthew> you're matching against any messages sent to a channel/query
<maetthew> (oh and realized i forgot the Message object in the method definition in that gist
<maetthew> )
<solidoodlesuppor> How would that look?
<maetthew> i updated that gist. basically how it is now
<maetthew> (Here is an example message)
<maetthew> so something like this would be put in "mylog.txt"
<maetthew> I, [2013-03-08T19:02:05.910325 #5188] INFO -- : <maetthew> (Here is an example message)
<solidoodlesuppor> hmm
<solidoodlesuppor> I'm feel kind of dumb. I'd never seen a regex done this way before.
<maetthew> it would be easier if you showed some of your code where you want it implemented :)
<solidoodlesuppor> I don't see "match" listed as a keyword for ruby
<maetthew> i'm not sure but i think it's within Cinch
<maetthew> i think it's this one
<maetthew> (altough that doesn't give much information) :P
<solidoodlesuppor> undefined method match
<maetthew> when? what are you doing? :P
<maetthew> you might need to do it in a Cinch plugin. idk. that's how i did it anyway :P
<maetthew> again, i'm still learning lots so i'm not always sure _why_ something is working
<maetthew> just that it _is_
<maetthew> ;:P
<solidoodlesuppor> should the match be inside the bots block?
<maetthew> i have no clue what you mean :D
<maetthew> show me some code instead .)
<maetthew> :)
<solidoodlesuppor> http://pastebin.com/rCHTHKcr
<solidoodlesuppor> maetthew: This is it
<maetthew> ah. if i'm correct, match is something like
<maetthew> on :message
<maetthew> so you could use on :message instead of match
<maetthew> _IF_ i'm right :)
<maetthew> I'm doing it within a Cinch plugin
<solidoodlesuppor> OK but I would need the documentation for that
<maetthew> i'm gonna show you an example :P
<Cinchy> [gist] mycinchplugin.rb (at gist.github.com, maetthew on 2013-03-08 18:31)
<maetthew> (i haven't tried this but it should work)
<maetthew> gah forgot message object again :p
<maetthew> *updated*
<maetthew> save that snippet as "mycinchplugin.rb", then require it from your main file
<maetthew> also.. forgot :P
<maetthew> you need to c.plugin.plugins = [MyCinchPlugin]
<maetthew> to load the plugin
<solidoodlesuppor> OK but how does my bot talk to the plugin? Doesn't an instance of it have to be initiated?
<maetthew> hmm, talk to the plugin? รด_O
<maetthew> solidoodlesuppor: I gotta head out for a moment. Will be back in an hour or so. Ask away and I'll answer to the best of my abilities when I get back :)
<solidoodlesuppor> undefined method plugins
<solidoodlesuppor> And that plugin wont load either
caitlinface is now known as player2
player2 is now known as caitlinface
<solidoodlesuppor> maetthew: If your back, I made some progress, but it's still giving me weird errors. Complaining about an "info" method
<maetthew> solidoodlesuppor: sorry took little longer than expected
<maetthew> paste the whole error please
<maetthew> hmm
<maetthew> dafuq
<solidoodlesuppor> if you point me toward the documentation for that match command, I could properly figure it out. That seems to be the issue - it is expecting something that it is not getting
<solidoodlesuppor> couldn't find where it is defined in the library
<maetthew> well the thing is, rubydoc is crap
<maetthew> so you probably wouldn't find much there
<solidoodlesuppor> Yeah, that's been my problem from the start of this
<maetthew> ask dominikh what he thinks about rubydoc :P
<maetthew> anyway, i THINK match is something in Cinch
<maetthew> here is all matches for "match"
<solidoodlesuppor> OK
<solidoodlesuppor> but my bot... What should I do? Any idea?
<maetthew> solidoodlesuppor, show me the complete code please
<maetthew> i'll see if I can reproduce it
<maetthew> 2 min
<maetthew> gonna check now
<solidoodlesuppor> thanks
<maetthew> hmm you did just copy paste? i didn't test anything before i wrote it :P
julian-delphiki has quit [Quit: Computer has gone to sleep.]
<maetthew> also solidoodlesuppor, have you any other programming experience?
postmodern has joined #cinch
<solidoodlesuppor> maetthew: Oh yeah
<solidoodlesuppor> I'm just trying to avoid reading this entire library
<solidoodlesuppor> I haven't found any good documentation on it
julian-delphiki has joined #cinch
julian-delphiki has quit [Max SendQ exceeded]
julian-delphiki has joined #cinch
<maetthew> nah there isn't really. one thing i searched for "require 'cinch'" on github :P
<maetthew> and i think cinch-plugin
<maetthew> or something
<maetthew> and looked for repos
<solidoodlesuppor> In this case I really do think it is because I don't fully understand the behavior of "match"
<maetthew> well neither do I actually
<maetthew> i just know how it works
<maetthew> not why :P
<solidoodlesuppor> Were you able to replicate the behavior I had?
<maetthew> sorry doing two things at the same time :P
<maetthew> well yes I can replicate. but not resolve :P
<solidoodlesuppor> hmm any idea what I should do?
<solidoodlesuppor> I mean, typically in this situation I would ask the dev what I am doing wrong. Already asked the guys in #ruby with no results
<maetthew> yeah i saw it he went to sleep
<maetthew> hold on i'm gonna rewrite everything just for fun :P
<maetthew> will take a little while
<maetthew> i cannot understand this
<solidoodlesuppor> ?
<maetthew> oh ofc
<maetthew> solidoodlesuppor, #cinch-test
v0n has quit [Read error: Operation timed out]
jhaals has joined #cinch
jhaals has quit []
jhaals has joined #cinch
jhaals has quit [Client Quit]
solidoodlesuppor has quit [Remote host closed the connection]
julian-delphiki has quit [Quit: Computer has gone to sleep.]
kith_ has joined #cinch
kith has quit [Read error: Operation timed out]
sacc91 has quit [Quit: sacc91]