dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
lagweezl1 has joined #cinch
lagweezl1 has quit [Changing host]
lagweezl1 is now known as lagweezle
Azure has joined #cinch
postmodern has quit [Ping timeout: 264 seconds]
sarkyniin has quit [Quit: Quitte]
Azure has quit [Quit: Blue Sky Fish]
postmodern has joined #cinch
Azure has joined #cinch
<leftylink> let's say I have a plugin that matches "foo" and "bar", and now I would like to match anything that is not "foo" or "bar". should I... 1) match /(?!foo|bar)/ 2) rewrite everything to match any message and in the handler say "if foo do this, else if bar, do this, else do that" 3) some way to say "hey once you've found one match, you don't need to do any other matches, thanks!"? I don't know of a way to do 3) though
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
21WAA1FDC has joined #cinch
21WAA1FDC has quit [Quit: My people need me...]
jackdempsey has joined #cinch
postmodern has quit [Quit: Leaving]
thews has quit [Ping timeout: 245 seconds]
thews has joined #cinch
v0n has quit [Read error: Connection reset by peer]
<dominikh> leftylink: matches can be part of a group. In a group, only the first matching matcher will be executed. groups have plugin scope
<leftylink> ooh this is exciting
jackdempsey has quit [Ping timeout: 250 seconds]
jackdempsey has joined #cinch
RedDwarf has joined #cinch
Zackio has quit [Ping timeout: 264 seconds]
Azure has quit [Remote host closed the connection]
Azure has joined #cinch
jackdempsey has quit [Ping timeout: 255 seconds]
sarkyniin has joined #cinch
<sarkyniin> hey
<sarkyniin> match /^(!|@)asbot$/i, method: :asbot_commands
<sarkyniin> match /^(!|@)asbot (.+)$/i, method: :asbot_commandhelp
<sarkyniin> nothing wrong with this match, right?
<sarkyniin> cinch isn't doing anything when I'm typing "!asbot" in my channel
<sarkyniin> not even opening a new thread or anything
<dominikh> have you changed/disabled the default prefix for matchers?
<sarkyniin> yeah
<sarkyniin> wait, the matches need to be at the top of the plugin, right?
<sarkyniin> I had an initialize before, haha
<sarkyniin> wait nope
<sarkyniin> that's not the problem
<dominikh> show the whole file then
RedDwarf is now known as Zackio
<sarkyniin> warning: messy code incoming
<dominikh> where are you changing the default prefix?
<dominikh> in the bot config?
<sarkyniin> in my configure block
<sarkyniin> in the main bot file
<sarkyniin> c.plugins.prefix = ""
<dominikh> you'll want //, not ""
<sarkyniin> it worked before so eh
<sarkyniin> changed it anyway
<dominikh> "" will translate to /^/
<sarkyniin> oh
<dominikh> yes, poor design, but we're stuck with that for Cinch 2 :)
<sarkyniin> hm, issue is still there
<sarkyniin> :/
<dominikh> you'll want to show me the log then, that of startup and that of when you try to invoke the command
<dominikh> I'll be back in ~10 minutes
<sarkyniin> oh, okay
<sarkyniin> anyway, at the very bottom of the file
<sarkyniin> you can see me entering the command, but nothing happening
<dominikh> are you sure you did not forget to add the plugin to c.plugins.plugins? looking at the "registering executor" lines, there's none mentioning the word asbot
<dominikh> (nor the word help, the name of the plugin)
<sarkyniin> well
<sarkyniin> require_relative './plugins/help-plugin'
<sarkyniin> is in my file
<sarkyniin> and this
<sarkyniin> c.plugins.plugins = [SpeedPlugin, ASBMovePlugin, ASBStatsPlugin, ASBilityPlugin, ASBItemPlugin, ASBNaturePlugin, ASBTypePlugin, RollPlugin, BlamePlugin, NoPlugin, QuotesPlugin, ProfilePlugin, ComboPlugin, HelpPlugin]
<dominikh> your initialize method needs to call super
<dominikh> in the plugin.
<sarkyniin> oh
<dominikh> anyway, back in 10
<sarkyniin> thanks
<sarkyniin> yeah, that fixed it
<catepillar> i made that mistake
<catepillar> more than once
v0n has joined #cinch
jackdempsey has joined #cinch
<Dwarf> is there a way to ignore people so that it does not trigger events?
<dominikh> not without writing that logic yourself
<Dwarf> A shame
<Dwarf> Currently I have "return unless Ignore.first(host: m.user.host).nil?" but that obviously still triggers it. Not sure if that's a performance hit or not
<dominikh> I really doubt that performance hit matters. there's far more inefficient things in Cinch ;)
<Dwarf> Great
<Dwarf> I saw my bot got invited to a trivia channel and currently it listens to all messages, that's why I was wondering
<dominikh> how many messages per second are you receiving in that channel?
<Dwarf> One or two maybe
<Dwarf> It's not that severe
<dominikh> that's not exactly many ;)
<dominikh> so yeah, don't worry about it
<Dwarf> Hmm, I should add channel blacklisting to my bot tho
postmodern has joined #cinch
postmodern has quit [Quit: Leaving]
<onewheelskyward> Or disable auto-join on public invite. :)
<Dwarf> Well that defeats the whole purpose of ever coding that feature
<onewheelskyward> It's a preference for sure.
sarkyniin has quit [Quit: Quitte]
sarkyniin has joined #cinch
jackdempsey has quit [Ping timeout: 240 seconds]
sarkyniin has quit [Ping timeout: 272 seconds]
sarkyniin has joined #cinch
sarkyniin has quit [Ping timeout: 246 seconds]
jackdempsey has joined #cinch
Azure has quit [Quit: Blue Sky Fish]
sarkyniin has joined #cinch
Azure has joined #cinch
jackdempsey has quit [Ping timeout: 240 seconds]