Spami has quit [Quit: This computer has gone to sleep]
xeviox|afk is now known as xeviox
kludge` has quit [Ping timeout: 264 seconds]
kludge` has joined #cinch
postmodern has quit [Quit: Leaving]
xeviox is now known as xeviox|afk
Spami has joined #cinch
motley has quit [Quit: leaving]
motley has joined #cinch
motley_ has joined #cinch
motley_ has quit [Client Quit]
motley has quit [Client Quit]
motley has joined #cinch
<lagweezle>
It's time for another noob question! ;)
<lagweezle>
Wait, no, nevermind. <.<;
<nickrw>
thinking about how to phrase the problem made it figure itself out? :)
<lagweezle>
In this case, not so much. I suppose it is still a legitimate concern, but I was using User.refresh before doing sensitive operations to try and ensure that the user really is that user, to be more assured the check against the list of 'admins' was a valid check.
<lagweezle>
I can't find where the refresh method is defined, though, which is slightly concerning.
<lagweezle>
The realization is that I should just #monitor (is that the right way to write that?) all users which are in the list of admins.
<dominikh>
I need to remove the highlight on "cinch".
geopet has joined #cinch
<nickrw>
haha
<lagweezle>
hehe dominikh
<lagweezle>
nickrw: AHHH! Thank you!
* lagweezle
hugs Ruby.
geopet has quit [Client Quit]
<lagweezle>
I'm just barely starting to feel 'comfortable' with Ruby. I've also realized that nearly every time I go to work with Python, I feel like I have to do awkward things to accomplish my goals. :/
<nickrw>
monitoring is probably a better idea, yeah
<nickrw>
WHOIS tends to get heavily rate-limited
<dominikh>
very.
<nickrw>
when I first wrote authname checking into a game bot I wrote I was refreshing every time a player said a particular command, it would lag horribly because the WHOIS commands were getting queued up waiting for a response
<dominikh>
fwiw, if you accept commands via PM, you need to do that in some cases. but yeah
<nickrw>
there are PM commands, but the lag problems were when people would happen to use commands in the game channel close together
<dominikh>
yeah, there's no need to refresh every time if the commands happen in a channel.
<nickrw>
I just threw all the auth away rather than use monitor, because tbh it wasn't adding anything useful
<dominikh>
heh
<lagweezle>
That is precisely why I'm wanting to move to monitoring. Waiting 10 minutes to be able to send my bot a command and have it work is very unpleasant.
<lagweezle>
dominikh: Why necessary for PM and not in-channel? O.o
Spami has quit [Quit: This computer has gone to sleep]
<dominikh>
let's start somewhere else
<dominikh>
what are you using #monitor for?
<lagweezle>
My idea is that I want assurance that admin type commands (shutdown, change nicks, etc.) only work for folks who are using a nick that is in the admin list. The expectation is that they own and are registered and authed for that nick.
<dominikh>
go on
<lagweezle>
Oh. That was ... pretty much it, I think.
<dominikh>
that doesn't tell me how you use #monitor to ensure that
<lagweezle>
I suppose I was hoping monitor would be close enough to refreshing just before checking the user is authed, and the user is in the list of admins.
<dominikh>
so... you use #monitor to trigger a refresh?
<lagweezle>
I am under the impression that monitor would automagically do that.
<dominikh>
why would it do that? all it does is update the user's online/offline status
<lagweezle>
I am definitely mistaken, then.
<dominikh>
"Starts monitoring a user’s online state by either using MONITOR or periodically running WHOIS"
<dominikh>
to be fair, in the WHOIS case it would update it, as a side effect
<dominikh>
but on networks that provide MONITOR, it will not
<dominikh>
and in either case there's a race condition. if a user quits, someone else takes his nick and uses a command, before the status change has been processed, or before the next periodic WHOIS has been run, it would be a race
<lagweezle>
I suspect the WHOIS mention is why I was thinking the wrong thing on this.
<dominikh>
oh, and: that's not a benchmark. a benchmark uses testing.B
<lagweezle>
Sounds like I need to think on this a bit longer if I want something a bit more robust.
<dominikh>
wrong window for the benchmark comment
<lagweezle>
Phew! I was VERY confused for a bit, there.
<dominikh>
wasn't even Ruby related :P
Spami has joined #cinch
rikai_ has quit [Ping timeout: 264 seconds]
rikai has joined #cinch
rikai has joined #cinch
UberDragon has quit [Quit: UberDragon]
UberDragon has joined #cinch
Spami has quit [Read error: Connection reset by peer]