dominikh1 changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.6
ayonix has quit [Read error: Connection reset by peer]
ayonix_ has joined #cinch
rickmasta has joined #cinch
rickmasta has quit [Quit: Leaving...]
space has quit [Ping timeout: 240 seconds]
space has joined #cinch
rickmasta has joined #cinch
rickmasta has quit [Quit: Leaving...]
space has quit [Ping timeout: 276 seconds]
rickmasta has joined #cinch
v0n has joined #cinch
rickmasta has quit [Quit: Leaving...]
rickmasta has joined #cinch
jonahR has quit [Quit: jonahR]
v0n has quit [Read error: Operation timed out]
rickmasta has quit [Quit: Leaving...]
kludge` has quit [Ping timeout: 264 seconds]
kludge` has joined #cinch
ayonix_ is now known as ayonix
rickmasta has joined #cinch
rickmasta has quit [Quit: Leaving...]
space has joined #cinch
space has quit [Read error: Connection reset by peer]
space has joined #cinch
postmodern has quit [Quit: Leaving]
space has quit [Read error: Connection reset by peer]
v0n has joined #cinch
adprice has joined #cinch
adprice has left #cinch ["WeeChat 0.4.1"]
space has joined #cinch
kx has quit [Ping timeout: 256 seconds]
kx has joined #cinch
space_ has joined #cinch
space has quit [Ping timeout: 246 seconds]
v0n has quit [Read error: Connection reset by peer]
v0n has joined #cinch
space_ is now known as Space
<Dwarf> Afternoon, I have the following match: match /^s\/([^\/]*)\/([^\/]*)\/(.?)/
<Dwarf> That would listen to s/old/new/optionalcharacter
<Dwarf> Strangely it's not triggered
<Dwarf> That's correct
<Dwarf> Yet cinch doesn't want it
<waxjar> there's an implicit prefix, you have to turn it off :)
<Dwarf> I forgot to mention, I'm using it in combination with "listen_to :channel"
<Dwarf> So I have a listen def, and an execute def
<Dwarf> Hmmm
<Dwarf> How odd
<Dwarf> I understand now, thanks!
<Donovan> isn't match effectively the same as listen_to :channel?
<Dwarf> Afaik listen_to :channel sends it's hooked goodies to the listen() def, and the match send it to the execute() def
<Donovan> oh, yeah I suppose listen sends everything to the listen def.
adprice has joined #cinch
<adprice> can i tell cinch to send its output to a log file instead of to stdout?
<dominikh> the easiest way would be to use your shell's support for output redirection :)
<adprice> ugh, i'd rather not
<dominikh> because?
<dominikh> bot.loggers.clear; bot.loggers << Cinch::Logger::FormattedLogger.new(File.open("...", "a")) would be a different route.
<Donovan> shell redirection is hard.
<Donovan> =)
<adprice> it's easier to manage a log file with ruby's built-in Logger class becuase you get filesize maximums and stuff
<adprice> i don't find it hard, just feels janky
<dominikh> well then you're out of luck because we don't use Ruby's built-in Logger
* Donovan was kidding
<adprice> hmmmm
<adprice> all good Donovan :)
<adprice> dominikh, do all Cinchs' loggers need to be of type Cinch::Logger::FormattedLogger ?
<adprice> or Cinch::Logger, rather
<Donovan> you could write a wrapper around cinch to use Ruby's logger.
<dominikh> no. FormattedLogger is a specific logger. it's implementing an interface
Space has quit [Remote host closed the connection]
<adprice> ah, that's a possibility
<adprice> awesome!
<dominikh> so yeah, implement that with a ruby logger and you're good
<adprice> $$$
<adprice> dominikh++
<adprice> aw man
<adprice> i tried
<adprice> thanks yall! :)
<dominikh> cheers
adprice has left #cinch ["WeeChat 0.4.1"]
otaciliofl has joined #cinch
<Dwarf> How do I get a value from the bot config?
<Dwarf> Nvm I suppose @bot.config[:plugins][:prefix] would work
<dominikh> or @bot.config.plugins.prefix, yes
otaciliofl has left #cinch [#cinch]
<Dwarf> Anyone got an idea on how I would fix the following problem:
<Dwarf> My regex is ((nick)[,|:]? )?s/(from)/(to)/(arg)?
<Dwarf> Function would be def execute(m, nick, from, to, arg)
<Dwarf> But, nick is optional
<Dwarf> Would it be easier to just have two functions?
<Dwarf> I suppose that's the lazy man's fix
<Dwarf> Which I am
<Dwarf> But, I'm open to suggestions if anybody has a better idea
<ayonix> where exactly is the problem?
<ayonix> shouldn't nick just be nil if there was no match?
<Dwarf> Wouldn't it just have from, to and arg then, so it'd think the from part would be the nick
<ayonix> ah.. sorry, I don't know how it handles that case :)
<Dwarf> Yea two functions would be the easiest I guess
<ayonix> indeed
<dominikh> if an optional group wasn't matched its value will be nil
<dominikh> Dwarf: ^
<Dwarf> Hmm
<Dwarf> This I did not know
<Dwarf> Thanks
Space has joined #cinch
<Dwarf> Long life nick ||= m.user.nick.to_s
<dominikh> either m.user.to_s or m.user.nick :)
<Dwarf> Ah
<Dwarf> So much confusion aha
v0n has quit [Quit: WeeChat 0.4.2-dev]
postmodern has joined #cinch