dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
mpapis has quit [*.net *.split]
Liothen has quit [*.net *.split]
Paradox has quit [*.net *.split]
kith has quit [*.net *.split]
nickrw has quit [*.net *.split]
rikai has quit [*.net *.split]
cyrusdav- has quit [*.net *.split]
CM-Punk has quit [*.net *.split]
dominikh has quit [*.net *.split]
lagweezle has quit [*.net *.split]
catepillar has quit [*.net *.split]
iamayam has quit [*.net *.split]
Rickmast- has quit [*.net *.split]
Netfeed has quit [*.net *.split]
Azure has quit [*.net *.split]
xeviox|afk has quit [*.net *.split]
Gizmokid2005 has quit [*.net *.split]
ruok has quit [*.net *.split]
irsol has quit [*.net *.split]
quaxim has quit [*.net *.split]
Rylee has quit [*.net *.split]
badeball has quit [*.net *.split]
leftylink has quit [*.net *.split]
kimoto_________ has quit [*.net *.split]
Edelwin has quit [*.net *.split]
thews has quit [*.net *.split]
_Blizzy has quit [*.net *.split]
Rennex has quit [*.net *.split]
onewheelskyward has quit [*.net *.split]
skybotalpha has quit [*.net *.split]
postmodern has quit [*.net *.split]
Guest32925 has quit [*.net *.split]
Zackio has quit [*.net *.split]
Dwarf has quit [*.net *.split]
leftylink has joined #cinch
quaxim has joined #cinch
rikai has joined #cinch
Dwarf has joined #cinch
badeball has joined #cinch
xeviox|afk has joined #cinch
dominikh has joined #cinch
mpapis has joined #cinch
ruok has joined #cinch
Paradox has joined #cinch
Liothen has joined #cinch
FIQ has joined #cinch
cyrusdav- has joined #cinch
CM-Punk has joined #cinch
irsol has joined #cinch
nickrw has joined #cinch
lagweezle has joined #cinch
Zackio has joined #cinch
Azure has joined #cinch
Rennex has joined #cinch
catepillar has joined #cinch
skybotalpha has joined #cinch
Gizmokid2005 has joined #cinch
Rickmast- has joined #cinch
thews has joined #cinch
Edelwin has joined #cinch
iamayam has joined #cinch
postmodern has joined #cinch
onewheelskyward has joined #cinch
kith has joined #cinch
Rylee has joined #cinch
_Blizzy has joined #cinch
Rylee has quit [Changing host]
Rylee has joined #cinch
FIQ has quit [Changing host]
FIQ has joined #cinch
frdmn has joined #cinch
literal has joined #cinch
_Blizzy is now known as VBlizzard
VBlizzard is now known as _VBlizzard
_BlizzyBot has joined #cinch
_VBlizzard is now known as _Blizzy
_Blizzy is now known as _VBlizzard
_BlizzyBot has quit [Remote host closed the connection]
_VBlizzard is now known as _BlizzyBot
_BlizzyBot is now known as _Blizzy
<_Blizzy> hello, I have a question. I know I use on :message for messages in chat.
<_Blizzy> what about when the bot gets a message using /msg?
_Blizzy has quit [Ping timeout: 246 seconds]
djbkd has joined #cinch
kith has joined #cinch
kith has quit [Changing host]
postmodern has quit [Remote host closed the connection]
postmodern has joined #cinch
frdmn has quit [Quit: ssssSSSSssss]
frdmn has joined #cinch
djbkd has quit [Remote host closed the connection]
irsol has quit [Ping timeout: 255 seconds]
irsol has joined #cinch
FiXato has joined #cinch
postmodern has quit [Quit: Leaving]
<dominikh> 15:54:17 #cinch <_Blizzy> how would I listen for a pm.
<dominikh> 15:54:31* #cinch <dominikh> :private
<dominikh> I feel like we've gone through that question before :)
<dominikh> oh, he's gone. fair enough.
<Gizmokid2005> dominikh: we did. Just yesterday :)
<Gizmokid2005> I thought it was with him as well, but I didn't know for sure.
xeviox|afk is now known as xeviox
xeviox is now known as xeviox|afk
WhereIsMySpoon has joined #cinch
<WhereIsMySpoon> Hey, I'm getting a bit stuck developing using Cinch - I'm in an on block, and trying to register a new handler inside it, but when I try I get "undefined method on" - is it not allowed to register an 'on' listener inside another 'on' block?
<dominikh> you are allowed to do that.
<WhereIsMySpoon> dominikh: http://pastie.org/9377890 I have this atm
<WhereIsMySpoon> dominikh: the error is on line 70
<WhereIsMySpoon> "undefined method 'on' for #<Cinch::Callback:0x3d201f8>" nomethoderror
<dominikh> well, yes. the method is Bot#on – handlers don't get executed in the context of Bot, but of an anonymous callback
<dominikh> you'd need to change line 6 to bot = Cinch::Bot.new { and use bot.on in line 70
<WhereIsMySpoon> dominikh: that changed the rror message to "undefined method 'on' for nil:NilClass (nomethoderror)"
<WhereIsMySpoon> dominikh: im not really sure that this would work...the bot var is not initialised until after the start block
<WhereIsMySpoon> so I cant do bot.on inside the block where bot is being initialised
<dominikh> well, of course. line 72 should be }; bot.start
<WhereIsMySpoon> I dont see how that gets around the problem, im still referencing bot inside the block where i'm initialising it
<dominikh> so? by the point the handler gets executed, bot is set. it's a closure
<WhereIsMySpoon> hm...well it works, but im unsure as to why
<dominikh> it's no different from this: http://sprunge.us/iSAI
<dominikh> in the Cinch case, the *variable* bot already exists by the point you define the block. it's value is not set yet, but it will be set by the point the block executes
<dominikh> *its
<WhereIsMySpoon> interesting
<WhereIsMySpoon> dominikh: so why does that differ from doing bot = Cinch::Bot.new { ...}.start ?
<dominikh> because in that case, you assign the value of Bot#start to the bot variable
<WhereIsMySpoon> oh...lol
<dominikh> and for one, Bot#start blocks, so bot will never be set until the bot quits
<WhereIsMySpoon> yes
<WhereIsMySpoon> herpaderp
<dominikh> (and of course it does not return the bot…)
<WhereIsMySpoon> yes indeed
* WhereIsMySpoon feels stupids
<WhereIsMySpoon> :p
WhereIsMySpoon has left #cinch [#cinch]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
Rylee_ has joined #cinch
Rylee has quit [*.net *.split]
ruok has quit [*.net *.split]
djbkd has quit [Quit: My people need me...]
djbkd has joined #cinch
ruok has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 240 seconds]
postmodern has joined #cinch
djbkd has joined #cinch
postmodern has quit [Quit: Leaving]
postmodern has joined #cinch