dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
kith has quit [Ping timeout: 260 seconds]
thews has quit [Read error: Connection reset by peer]
thews has joined #cinch
kith has joined #cinch
AlexRussia has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
thews has quit [*.net *.split]
ayonix has quit [*.net *.split]
j4jackj has quit [*.net *.split]
Zackio has quit [*.net *.split]
j4jackj has joined #cinch
ayonix has joined #cinch
thews has joined #cinch
j4jackj is now known as Guest30590
Zackio has joined #cinch
sarkyniin has joined #cinch
AlexRussia has joined #cinch
AlexRussia has quit [Remote host closed the connection]
AlexRussia has joined #cinch
hushnowquietnow has joined #cinch
<hushnowquietnow> Hi everyone, I have a plugin design problem that I hope you find interesting
<hushnowquietnow> I'm trying to figure out a way to implement a blacklist for particular users, to prevent them from having access to certain commands on my cinch bot
<hushnowquietnow> I have functionality split across more than a dozen plugins, though, and it doesn't make sense to maintain separate blacklists per plugin
<hushnowquietnow> Is there a way I can maintain a single list that's accessible by all of my plugins?
djbkd has joined #cinch
<dominikh> you could use `shared` for that (as in, the config option and the helper of same name)
<hushnowquietnow> I figured there was something already in place that could do that
<dominikh> I've always quite fancied my ACL code from https://github.com/dominikh/Mathetes/blob/cinch_rewrite/bot.rb (lines 3-15, 44-110, 131-155, and a simple "enable_acl" in any plugin that wants ACLs enabled. I don't remember if it supports global ACLs that aren't specific to plugins, but that'd be trivial to add, anyway
<hushnowquietnow> I think some of this is going over my head
<dominikh> there's nothing too advanced in there, really. using pre filters to drop messages, and a basic class to implement ACLs (also using `shared`)
<dominikh> anyway, "use `shared`" is still my answer to your initial question of how to have a single list available to all plugins
postmodern has joined #cinch
<hushnowquietnow> Yeah, that'll definitely be sufficient for my needs
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
<hushnowquietnow> Does this `reset` method you have defined here also reload plugin files, to pick up edits?
<dominikh> define "here"
<dominikh> the one in that file on line 113? no, it doesn't.
<hushnowquietnow> Yes, that's the one I meant, sorry
<hushnowquietnow> I'm actually using that very gist in my bot now. It's made fixing bugs a much less noisy process for the people in my channel
<hushnowquietnow> Thank you for making it.
<dominikh> heh, you're welcome. although nowadays, for bots written in languages that can't reload code as easily, I just run the bot behind a bouncer
<hushnowquietnow> I probably should've done that myself, but I haven't done much reading into them (and I wasn't even aware they were a thing when I first started with Cinch)
sarkyniin has quit [Quit: Quitte]
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 240 seconds]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 272 seconds]
djbkd has joined #cinch
irsol has quit [Ping timeout: 272 seconds]
irsol has joined #cinch
Guest30590 is now known as j4jackj
irsol has quit [Ping timeout: 260 seconds]
irsol has joined #cinch
irsol has quit [Ping timeout: 246 seconds]
irsol has joined #cinch
irsol has quit [Ping timeout: 245 seconds]
waxjar has quit [Ping timeout: 260 seconds]
waxjar has joined #cinch
irsol has joined #cinch
irsol has quit [Ping timeout: 244 seconds]
irsol has joined #cinch