dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
FIQ has quit [Excess Flood]
Guest31153 has joined #cinch
Guest31153 has quit [Excess Flood]
Guest32581 has joined #cinch
djbkd has joined #cinch
Guest32581 has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
Guest29232 has joined #cinch
Guest29232 has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ is now known as FIQ
FIQ is now known as Guest21933
Guest21933 has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ has quit [Excess Flood]
FredrIQ has joined #cinch
FredrIQ is now known as FIQ
FIQ is now known as Guest46877
djbkd has quit [Remote host closed the connection]
Guest46877 has quit [Changing host]
Guest46877 has joined #cinch
Guest46877 is now known as FIQ
postmodern has quit [Quit: Leaving]
thews has quit [Read error: No route to host]
thews has joined #cinch
_whitelogger has quit [K-Lined]
_whitelogger has joined #cinch
sarkyniin has joined #cinch
<
sarkyniin>
how do I get the bot's nickname?
<
sarkyniin>
The Bot class says I can use the "nick" method
<
sarkyniin>
but using "bot.nick" says the method doesn't exist
<
dominikh>
show code.
<
dominikh>
(and the exact exception)
apt-get_ has joined #cinch
<
apt-get_>
is there any easy way to get the bot's nick
sarkyniin has quit [Ping timeout: 245 seconds]
<
dominikh>
#cinch <dominikh> show code.
<
dominikh>
#cinch <dominikh> (and the exact exception)
<
apt-get_>
on :action, "pet #{bot.nick}" do |m|
<
apt-get_>
bot.action_reply("purr")
<
apt-get_>
bot.rb:35:in `block in <main>': undefined method `nick' for nil:NilClass (NoMethodError)
<
dominikh>
that cannot work. that first string gets evaluated before the bot even connected to the network, let alone has a nick.
<
dominikh>
(or, due to how you set up your code, even is initialized yet)
<
apt-get_>
how do I make it work, then
<
apt-get_>
my bot.start is at the end of the file
<
dominikh>
1) stop using "on" handlers and use the plugin API instead 2) look at the lambda example in examples/plugins/ and use that for the pattern.
apt-get_ has quit [Quit: Quitte]
postmodern has joined #cinch