Discord + mIRCStats = StatsBot

I have migrated from IRC to various Discords these days and started to wonder if I still have any use for the mIRCStats license I bought years ago. Turns out, I do. I found a nifty little Discord bot on GitHub called StatBot, by MJHeijster. It saves Discord logs to a format that can be parsed by mIRCStats. You can do individual channels, or whole server if you want to. Or you can keep the bot at a rank that doesn’t have access to all channels, if you want to keep some discussions private.

I run the bot on a Windows Server 2012 R2, just so it isn’t tied up to my own uptime. Obviously you can just run it on a normal Windows PC as well. I have set scheduled tasks to run mIRCStats every hour and then move the necessary files over with pscp to my Ubuntu server. The results can be found on https://darkball.net/stats/zybez.html. It works fantastically!

Koti-Kajaani RSS-syöte

Paikallislehtemme Koti-Kajaani tarjoaa ilmaisen digilehden luettavaksi kaksi kertaa viikossa, mutta heillä ei ole valmista RSS-syötettä saatavilla, joten tein sitten itse oman versioni. Skriptit hakevat curlilla json-tiedot, josta sitten haetaan kaikki tarvittavat tiedot tietokantaan, ja PHP-skripti luo itse RSS-syötteen.

Syöte löytyy täältä: Koti-Kajaani RSS

Change Audio Output with Powershell in Windows 10

I have always wanted to change audio outputs in Windows 10 with a single key from my keyboard. I have a Steelseries Apex raw keyboard, which has a ton of macro keys, but there wasn’t a simple way to do it before. Not until I saw cdhunt’s WindowsAudioDevice-Powershell-Cmdlet. With this, I can simply create a one-line Powershell file for my Realtek Digital Output:

Set-AudioDevice -Index 3

Same goes for my Samsung TV and Acer monitor, which has inbuilt speakers. After this, I thought I was good to go, once I had set the script to one of my keyboard’s macro keys, but unfortunately Steelseries Engine 3 doesn’t support .ps1 files as executable macros. So, I had to turn to PS2EXE-GUI to turn my .ps1 files to .exe files. After this, I just had to point the macro key actions to right files and I was done.

Hopefully this helps someone else, who wants to do the same.

Fingerpori RSS-feed

Olen käyttänyt Kimmo Suomisen tekemää Fingerpori rss-feediä jo useamman vuoden ajan, mutta tämän vuoden puolella kyseinen feedi on mennyt rikki muutamaan otteeseen. Tästä johtuen päätin tehdä oman feedini HS:n Fingerporeille.

Feed löytyy osoitteesta https://darkball.net/fingerpori/.

HS:n sivun parsintaan olen käyttänyt siimeonin hs-sarjis bash-skriptiä, joka ei tosin toiminut HS:n muutoksista johtuen niin minun täytyi korjata se itse. Kyseinen skripti antaa minulle linkin uusimpaan Fingerporiin, jonka tallennan tietokantaan ja rss-syöte hakee sitten tietokannasta kaikki Fingerpori-linkit syötteeseen. Skriptissä on myös tarkistus sille, löytyykö Fingerporin osoite jo tietokannasta, jolloin sinne ei tallenneta mitään.

Logitech Driving Force GT (DFGT) Shenanigans

Some time ago I decided that I want to get myself a wheel and pedals set for some driving and rally games on PC. I looked around and decided that DFGT would be fitting wheel and pedals set for me since it wasn’t that expensive and many people said it is good for beginners. Since the wheel is not manufactured anymore, I had to look around for used wheels on the internet. I found one for 60 euros on Finnish site tori.fi

The problems started after I tested the wheel on my computer. Initial calibration was good, but as soon as I started playing with it, the wheel started ”drifting” (it lost calibration) and became misaligned. I started googling and found out that this is very common fault with Logitech wheels (DFGT, G25 and G27) and it is caused by broken optical encoder disk.

There is an easy way to fix this, which I tried first but it didn’t work on my DFGT. At this point I contacted the person who sold me the wheel and informed him about the fault in the DFGT. There is a brass version of the encoder disk. It costs about 35 euros, shipping included. I demanded a refund of 35 euros from the seller since the fault had to be present before he sold the wheel to me. He denied this, but eventually refunded 20 euros because he sold me a broken item.

I ordered the brass version of the wheel, which came in 8 days from Thailand to Finland. Very fast shipping in my opinion. Turns out, I had ordered a wrong version of the encoder disk, since there are 30 and 60 slot versions. I looked at my broken encoder and thought ”well, this must be the 60 slot version” and ordered that. Turns out it wasn’t. I contacted Glenn who sells these brass encoders and kindly asked him if I could do an exchange since I ordered a wrong version. He agreed and I paid 8 dollars re-shipping fee after I had returned the wrong version.

It took 6 days for the correct encoder to arrive. It took me several tries to get the wheel working with the correct encoder, since I had bumped the optical encoder sender and receiver components. I had to bend those and get them in proper angles, but eventually I got it right and wheel started working and it no longer drifts while gaming.