robotmay has quit [Remote host closed the connection]
opus has joined #cinch
opus has quit [Quit:]
opus has joined #cinch
opus has quit [Ping timeout: 240 seconds]
opus has joined #cinch
opus has quit [Ping timeout: 246 seconds]
opus has joined #cinch
opus has quit [Ping timeout: 240 seconds]
opus has joined #cinch
opus has quit [Quit:]
opus has joined #cinch
opus has quit [Ping timeout: 252 seconds]
opus has joined #cinch
Divinite has joined #cinch
windowsrefund has joined #cinch
<windowsrefund>
hello
<windowsrefund>
how can I determine the bot's current channel?
* windowsrefund
feels like he asks this question every 4-6 months :)
<aytch>
windowsrefund:I think you could write a query that responds with the bot.channel configuration
opus has quit [Quit:]
<dominikh>
the bot is likely to be in more than one channel, so "current channel" doesn't make much sense. Bot#channels returns an array of all channels it currently is in
<windowsrefund>
dominikh: I'm trying to get a plugin to operate different depending on the channel
<dominikh>
on what channel. the bot is in all the channels it is in, always. a *message* might be in a specific channel
<windowsrefund>
hmmm
<windowsrefund>
this would be a timer driven thing so there'd be no incoming message
<dominikh>
then there's no "that one channel" either
<aytch>
could you match a join, like: on bot.join(channel) do |x|
<windowsrefund>
I figured it would be nice for my plugin options to take the form of channels => [ '#foo', '#bar' ] and then try to perform a check against that to make a decision
<windowsrefund>
something like if bot.channel.include?(config['channels'])
<dominikh>
then go ahead and do that?
<windowsrefund>
but bot.channel is not a real method, right?
<aytch>
I think you could work around that by looking at a message's channel, setting a variable, and then using that variable for that thread
<dominikh>
as I said before, there is Bot#channels, a list of all channels the bot is in
<windowsrefund>
but clearly, that's not going to be of any use
<dominikh>
and clearly you are still confused. if there is no external event (a message), how does the bot decide which of all the channels it is in you magically want?
<dominikh>
what is supposed to decide the channel?
<windowsrefund>
I don't know
<windowsrefund>
that's why I'm asking the Jedi
<dominikh>
... so, the bot is in channels A, B and C. I ask you "what single channel is the bot in?" , what's the answer
<dominikh>
there is none
<windowsrefund>
I think aytch was onto something
<dominikh>
... where/when do you create the timer?
<windowsrefund>
in the plugin
<windowsrefund>
outside of the initialize method
<windowsrefund>
oh, I'm starting to think about this a little differently...
<windowsrefund>
maybe no test is required
<windowsrefund>
maybe I can just send the message to the configured channel
* windowsrefund
tries that
<aytch>
dominikh: being new to programming, I just wanted to say thanks for creating such an easy to use IRC bot. It's been a fount of ideas that have challenged me to learn and grow. So...kudos to you!
<dominikh>
aytch: You're welcome :)
<Divinite>
dominikh: I've helped a friend of mine be able to "speak" again thanks to cinch!
<dominikh>
:o?
<dominikh>
Divinite: do tell
<Divinite>
dominikh: He had a nasty accident
<Divinite>
It pains him to speak
<Divinite>
So I made a TTS bot for him
<Divinite>
It's made his life much better
<dominikh>
wow, that's quite amazing actually. well, the bot, not the accident :/
<aytch>
That's awesome of you, Divinite
<Divinite>
Thanks :)
<Divinite>
I'm going to put the code on Github soon
<Divinite>
Along with the whole story
<dominikh>
nice :)
<aytch>
Having been a sysadmin for the last ~8 years, I'm so used to fixing broken stuff, and I was beginning to think that's all IT was. Learning to program has really been inspirational.
<aytch>
You can fix problems, and create solutions or dream up ideas. Programming is really inspirational.
<dominikh>
don't forget creating new problems for sysadmins ;>
<aytch>
Ha! Most of my developer problems are easy, since I can troubleshoot the system side really easily.
<aytch>
The code I write, though...whole different story.
<dominikh>
hehe
<aytch>
I think it took me a good 10-12 hours to write a cinch function for replying to a twitter status link with the actual status and username
<aytch>
I've been trying to turn it into a plugin
<dominikh>
any trouble with that?
<aytch>
Mostly just the fact I barely know what I'm doing
<dominikh>
take a look at the example plugins, especially one that uses listen instead of match
<aytch>
Oh...that would be probably be much more efficient
<aytch>
to be honest, I only figured out functions a few months ago, so the jump from "scripting" to "programming" is pretty huge
<aytch>
I'd compare it to
<aytch>
Being an army grunt vs. being a commanding officer
<dominikh>
technically, they're methods ;)
<aytch>
What's the difference between a method and a function?
<aytch>
nevermind, I can google that
<windowsrefund>
a method is oo
<dominikh>
a method has a receiver/is associated with an object/class
<windowsrefund>
what he said
<windowsrefund>
:)
<aytch>
Talking to real programmers makes my head asplode.
<dominikh>
heh
<aytch>
I blame learning a lot of my programming in Powershell
<dominikh>
my condolences
<aytch>
Powershell makes no differences between functions/methods, and indeed refers to them in the same way
<dominikh>
pretty sure powershell only has functions
<dominikh>
but then I never used it nor will I ever :)
<aytch>
I hate Powershell, but I have to use it for my work
<dominikh>
heh
<dominikh>
you won't get me near a Windows environment ;)
<aytch>
I'm probably an expert in the Windows stack, as far as systems administration goes, but good lord do I want to get out of it.
<dominikh>
and yeah, all that stuff listed under "Functions/Methods" are functions
<aytch>
*nix is so much cleaner and more sane
<dominikh>
are you running Cinch on a Windows system?
<aytch>
No, I'm just booted into Windows because I've been playing video games
<dominikh>
ah.
<aytch>
typically I run Mac and I run my bot from a Vagrant instance
<dominikh>
because I have honestly no idea if it still works properly on Windows. I don't test it, and honestly I don't support it on that platform
<aytch>
I could test my bot on here
<dominikh>
even though I think Azure is still running it on Windows, so it must be working
<aytch>
it doesn't do much, but I think it would work
<aytch>
Azure runs your bot?
<dominikh>
he runs a bot he wrote in cinch, yea
<aytch>
Oh, I was thinking of Microsoft Azure, the cloud platform
<dominikh>
haha
<dominikh>
sorry to disappoint :P
<dominikh>
nah, our Azure existed long before Microsoft Azure
<aytch>
No disappointment. MS Azure is terrible.
<dominikh>
hehe
<aytch>
They "support" CentOS, but you can't even spin up a working VM in that environment.
<dominikh>
and you really don't want CentOS, either ;)
<aytch>
Well...no. But it's MS. You take what you can get in regards to decent operating systems.
<aytch>
Although I have no idea why anyone would choose Azure in place of AWS, regardless.
<aytch>
My company is an MS partner, and they vomit MS-based propoganda all over the place, without having any knowledge of the competition. It's all rather terrible.
<dominikh>
I think that's a requirement of being an MS partner
<aytch>
Idiocy?
<aytch>
Oh, you mean the propoganda. Yes, it is.
<dominikh>
well, both I guess, but yeah, I was referring to the propaganda, and not knowing the competition
<aytch>
Most Windows admins are so clueless about the underlying systems it's terrifying.
<aytch>
I once worked with an admin whose solution to restart the VNC service was to reboot the server.
<Divinite>
LOL
<dominikh>
you know, it's nice to hear from an actual MS admin rant about it ;) Instead of people who aren't using it, anyway
<Divinite>
LOL
<dominikh>
and, wow
<Divinite>
LIL
<Divinite>
LOL
<Divinite>
LOL
<Divinite>
LOL
* Divinite
falls off chair
<dominikh>
it just went from nice to sad
<aytch>
Everyone in the company loved the guy, because he would bend over backwards to help them
<aytch>
and then I came along, and knew what I was doing...
<aytch>
and the users were blown away by the fact that what took the previous guy a day to fix took me 5 minutes
<dominikh>
he must've felt terrible
<aytch>
he was fired very shortly afterward
<dominikh>
ouch
<aytch>
a busy sysadmin is a bad sysadmin.
<aytch>
It's a fine line, but the better you are at your job, the less you do.
<dominikh>
well, and a sysadmin who wrote a script that does his entire work is replacable ;)
<aytch>
Nah...that sysadmin who wrote that script is irreplacable - s/he *knows* that environment
<aytch>
IT environments are like human bodies. There are a bunch of organs/systems that do lots of little things. If anything in that system gets thrown out of order, the whole thing breaks down.
<dominikh>
but management sees the script and thinks "great, we can just have someone else execute that" :)
<aytch>
I was supporting a cable TV channel a few years ago, and their Director of IT (Masters in CompSci, 12 years at Los Alamos Labs), couldn't get their weather reporting to work
<aytch>
Turns out the server that was running a perl script to crawl web data wasn't passing a text file
<aytch>
it wasn't running the script because the video card had failed
<aytch>
so it wouldn't even boot
<dominikh>
so, why didn't reporting pick up on the missing server?
<aytch>
there was no reporting.
<aytch>
He had a Masters in CompSci, and 12 years at Los Alamos Labs.
<aytch>
His entire skillset was reporting to other people that things were broken.
<dominikh>
:/
<aytch>
The guy was low-level helpdesk experience, but because he had the degree and the prestige, he was chosen as director.
<dominikh>
and that there is what's wrong with some parts of IT
<dominikh>
they think a degree matters, or means anything
<aytch>
Yeah. Back when I was on helpdesk stuff, I had an HR person say to me (and she would /only/ ask me for help, she ignored every other tech), "this is why we need to hire people with degrees"
<aytch>
I then politely informed her I was the only person on staff without a degree.
<dominikh>
haha
<dominikh>
<- doesn't have a degree yet
<aytch>
Technology moves faster than academia
<aytch>
Eventually people will figure that out, but in the meantime, we're stuck with people who feel their $40,000 investment must be worthwhile, or they wouldn't have paid for it, so degrees must be important.
<dominikh>
more importantly, a degree doesn't teach you anything that relates to the real world
<aytch>
so true
<aytch>
A degree (especially in CompSci) shows you a problem, shows you a way to solve it, and then asks you to solve it.
<dominikh>
from all the stuff I had to learn in uni so far, only 10% was worthwhile, and I could've picked it up myself. 50% was downright harmful, and the rest I'll forget and look up when I need it once a blue moon
<aytch>
That has nothing to do with the real world implementation of a project.
<dominikh>
yup
<dominikh>
and god beware you have to solve something they didn't teach you to solve
<dominikh>
that is, something you can't just apply one of 10 patterns to
<aytch>
See? Sysadmins and developers aren't so far alike.
<aytch>
We just have communication issues.
<dominikh>
most sysadmins I know are actually either developers as well, or actually work in devops
<aytch>
I want to work in devops so badly.
<aytch>
Working for a MS-partner MSP is highly conducive to sucking in IT servies, however.
<windowsrefund>
format c: /u
<windowsrefund>
that's the first step
<dominikh>
good night
<Azure>
wut
<Azure>
oh
<Azure>
I've been running my bots on a friend's friend's VPS that uses Gentoo for the past... year?
jhaals has joined #cinch
rikai_ has quit [Remote host closed the connection]