to bytram:
i've bashed together a scripty that will hopefully work as a starting point for automating some stuff on dev
exec command "~slash-test" (restricted to use by your nickserv account, and bot admins) may be run from either #dev or #test channels. at the moment it won't work cos i've already submitted the test comment (dev will return a duplication error), but its ready for preparation of test comment files similar to this one: https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/slash_tests/test01
note: the parent element should contain the filename of the parent test file if applicable (leave blank or omit for root level). ie: for child of test01, put <parent>test01<parent>
source code files here:
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/slash_test.php
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/sn_lib.php
It's been a busy week between class, and doing my Let's Play series; I've found doing Let's Plays a good way to unwind after a stressful day, and I've also done a bit more livestreaming. To avoid spamming the journal list, I'll likely just do weekly updates until I have communities implemented properly in rehash.
Dwarf Fortress
For those who missed it, I've started a livestreaming series where I play one of my favorite games of all time, Dwarf Fortress. I'm keeping a recap thread going alive on the official DF forums at Bay12. For those who are fans of the game are recommended to check it out. My schedule is somewhat fluid from week to week, and is complicated by a trip to New York City Sunday-Tuesday, but I will try and stream at least once week, or two; I'll usually announce streaming times 24-48 hours in advance, and on Twitter.
I'll name dwarves after those who commit story snipits, or those in the Livestream chat. My next broadcast date is tentatively late Wednesday, but that's subject to change.
NetHack
I have uploaded episodes 2, 3 and 4 (scheduled to go live at midnight tonight), with hope of having regular updates on Monday, Wednesdays, and Fridays. I have footage through episode 7 recorded, but episode 5 requires considerable editing as I do Sokoban in that, and I edited out most of the boring parts (which will be uploaded as a "special" video) with, or soon after 5.
Episode 2
- On this episode of Let's Play NetHack, we wander our way through the Gnomish Mine's, groaping our way through the dark in hopes of finding Minetown.
Episode 3
- As our first character meet an unfortunate end, a shocking revelation is revealed that sending our poor host into a mental breakdown.
Episode 4 (goes public at midnight)
- We learn that Barbarians can fight well in the dark as multiple events conspire to drive us crazy.
If you enjoy my videos, please, leave comments, and subscribe to my channel. Furthermore, I'll offer shoutouts and credits to anyone who'd be up for creating titlecards for my series, and perhaps offer them an exclusive chance to choose a game to me livestream or do a LPs. Given requests, I'm also going to record a special video at some point that goes more into detail on how to play NetHack specifically.
currently developing a sort of api for the exec irc bot.
bit of background: exec is run as a single php script process in a terminal, which connects to the soylent irc server, but when commands are triggered from the irc channels, the bot spawns child processes to service the commands. command aliases are mapped to shell commands using templates to substitute data from irc (such as nick, channel, message, etc). child processes are usually passed data using command line arguments, and communication to/from child processes and the bot process is facilitated through child process stdin and stdout pipes.
eg: typing "~rainbow ciri is a butthole" triggers the shell command: php scripts/rainbow.php 'ciri is a butthole'
the bot creates a named pipe and dumps a bunch of data to it in response to events, such as when a child process is started, when a message is received from a child process stdout pipe, when a message is received from the irc server, etc.
the named pipe can be read by something simple like cat, but i've written another php script to read it. this reader script also has a tcp socket server which allows yet another program to access the data stream (remotely even), such as telnet.
this is fine for just reading data, but i wanted to be able to command the bot remotely using this api. this is achieved by starting the reader script as a child process of the bot, which then offers the reader script the same methods taken advantage of normal scripts through stdin and stdout. a couple of specific stdout handlers were added to the bot script for acquiring specific data, but the reader also has direct access to irc and other functionality using existing stdout handlers (/IRC and /INTERNAL being the main handlers, used to output a raw message to the irc socket and perform an internal command respectively).
with two-way communication established between a tcp socket in the reader script and the main bot process, with event data streaming, i wanted to make a pretty gui application that i could see what is going on, since the bot terminal can be a bit crazy (each irc message can result in output filling half the terminal or more, due to internal events and data messages).
my tool of choice is delphi 7 pro, so i've made a little app called 'execstat' that connects to the reader socket server and reads the data streaming from it and enables commands to be sent. its pretty basic at this stage, but hope to develop it into something that i can use to easily see which scripts are running, which buckets are being get/set, which channels the bot is in, which commands are being triggered by who and where, etc. also important will be the ability to trigger kill commands for scripts, since currently to kill a script i have to go to a private channel, get a list of running processes (using the ~ps alias) and enter the pid in a ~kill alias command. not hard, but would be nice if i could just click a button in a gui. lazy++
the socket in the delphi app reads in its own thread, and uses a synchronized event handler to give data to the main application thread.
my current work revolves around rolling my own unserializer classes to parse the php serialized arrays, which is necessary to be able to get anything useful from the data streaming into the socket.
this whole setup is probably way overcomplicated and rediculous, but i enjoy working on it. moar_complexity++
So, I've been feeling the urge on doing another livestream this weekend, and was debating what game to stream. I've had an urge to play Dwarf Fortress as of late, which also allows for good interaction with those in the community due to nickname and assigning roles; and perhaps keep playing the same fort over a series of streams. The tentative time of this livestream would be 12-6PM EST, on my Twitch channel. I'd be up for fielding questions from the community, talking about gaming and tech in general, basically the insanity of April Fools, only a more reasonable block of time.
I think I got all the kinks out of my recording setup, so I should be more reasonably be able to edit and post the stream (for those who missed the previous post, my recording of the 24 hour livestream was corrupted due to stupidity and user error). I'd be interested in suggests of what biome to play in, as well as names for the initial dwarves (6 remaining, excluding the one I claim for myself).
In other news, I've continued my Let's Play of NetHack, with Part 2 posting on Wednesday. Part 3 was supposed to go live on Friday, but got released a day early by mistake.
As promised, I've started a Let's Play series going into the details of NetHack as I once again quest for the Amulet of Yender through the Mines of Menace. For those who've never ascended, or just wish to understand the game better, I'm going into detail on much of the mechanics behind the game such as wand identification, price IDing, curse testing, and so forth. Hopefully with my guidance, you too can one day ascend into a demi-god. I'll try and update the series Monday, Wednesdays and Fridays, but I may miss a day if life gets too hectic.
All my content, unless otherwise noted, is licensed under the Creative Commons ShareLike-Attribution license, and encoding in a WebM container with the VP8 and Ogg Vorbis codecs. I'll be uploading the raw WebM files once I have a suitable host to do so.
Introduction to NetHack
- In which the interface, goals of the game, and dungeon layout are explained.
Let's Play Nethack #1
- In which we start off as a Dwarvish Valkerie, get our first artifact, and run into trouble.
per previous journal i set up a simple channel relay feed to enable status messages for ncommander's nethack stream, but since there has been a little bit of talk about other games (including dungeon crawl stone soup) i turned the feed code into something more generic so that other feeds could be added easily. now there's feeds for the rodney bot from #nethack (freenode) to #nethack (soylent), as well as feeds for a couple of bots from ##crawl (freenode) to #crawl (soylent). the code to dispatch messages containing keywords has also been made generic, so that if ncommander plays again his deaths can be easily dispatched to #soylent for our amusement :p
code for this feature can be found here: https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/activity.php#L86-L115
another feature that was briefly mentioned in my last journal has been developed further to enable limited two way communication between someone in a soylent irc channel and someone in a freenode irc channel.
to send a message to a channel on the freenode irc network (that an exec minion resides in with forwarding enabled) an authorized user on the soylent irc network in a channel with exec can type "#freenode_channel > message" and the message will be relayed. if you're in the freenode landing channel on the soylent irc network (#freenode) you'll be able to see any replies pop up in there, but it can easily get hidden amongst all the traffic from other channels, so to enable a 10 minute automated relay to a different soylent irc channel, type "#freenode_channel > freenode_nick, message" and for the next 10 minutes anything that freenode_nick says in #freenode_channel will be relayed to the originating soylent channel. only messages prefixed with "#freenode_channel >" will be relayed from soylent to freenode so soylentils can still talk without anyone on freenode hearing, but using the prefix on the soylent end (not required on freenode end) enables two-way communication. the relay lasts for 10 minutes, but can be easily renewed as many times as you want by typing another message (on soylent) in the form "#freenode_channel > freenode_nick, message". if you want to see a list of currently active relays, type ".relays" and it will list freenode_nick, freenode_channel, soylent channel and time remaining (in minutes). use of this feature is limited to a list of nickserv accounts.
code for this feature can be found here: https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/activity.php#L133-L213
re-enabled the ~submit alias so that instead of just pasting a link to irc, you can also (with smallest amount of additional effort) share it with SN users not on irc. syntax is really simple: ~submit %url%
just submits the description or og:description meta tag content along with the link, so makes for a pretty lame submission but its better than nothing at all (editors can always reject it if it sucks too much)
during NCommander's NetHack thing i tweaked the freenode relay script to output messages by the Rodney irc bot in the freenode #nethack channel to our #soylent channel when NCommander died in the game. also made it so that anything Rodney said was output to our local #nethack channel so that NetHack fans can see what's going on without connecting to freenode directly.
developed some macro functionality to enable authorized irc users to shorten otherwise long exec commands into shorter equivalents. came in handy for simplifying control of the freenode relay bot.
also made a compound macro (using exec's internal_macro lib function) to make it easy to talk through the relay bot from the SN irc channels to freenode channels.
we get a bit of spam occasionally in the wiki, and chromas is diligently blanking it out (despite not having authority to delete articles) as a means of spam control. a script has been developed to make it a little easier for him (and a couple of others in a list of authorized nickserv accounts). a spam page in the wiki can now be cleared with ".spamctl %page title%"
http://sylnt.us/exec
http://sylnt.us/execsrc
broke out ircd work into a separate github repo. currently working on ability to connect multiple times to a network with the same nick. idea is that if there are a few servers on the network you could connect to each of them, and then if one disconnects you can still use the other (redundant) connections. authentication of subsequent connections to the same nick is done using a connection id appended to the username field (username sent out doesn't include the connection id though).
the server is at a point where i can connect to it with hexchat a couple of times (server spits out a connection id on first connect, and i just paste that to the end of the username in second connection). i can then join a channel from either connection, which automatically joins for the other connection (weird to watch). then i can chat and the chat appears on both connections. its pretty funky to play with.
if the project goes anywhere (unlikely) it might be ideal to have a client that handles the redundant connections for you automatically rather than having to establish separate connections manually and have each one take up room in the server list. netsplits could be a thing of the past.
prolly will try to make it ts6 and rfc compatible, but still early stages.
So, given the success of the livestream, I'm discussing with the staff doing future livestreams to sit back, discuss things with the community and such. We're thinking about once a month, and perhaps doing a multiplayer game that everyone can join in on (I'm thiking either Civilization or Europa Univeralis IV).
However, given my own experiences doing it, I'm going to try my hand at doing a Let's Play. Given its where we started, I thought it would be most appropriate to start with a series based on NetHack, and am working on recording an introduction video which will go over the basis of the game, and help prevent the series from being too repeative (I'll only upload runs which have a decent chance of ascending; generally ones that make it to Mine's End and finish Sokoban, maybe a bit further).
I'll post the intro video and my first episode hopefully this week. I'll probably upload them to YouTube and provide raw files. I'm encoding my raw videos in VP8+Ogg Vorbis in a WebM container, and will be licensing my content under Creative Commons Attribution-ShareAlike 4.0 International. Once I figure out a place to upload large WebM files, I'll also provide the edited source files for anyone who is YouTube allergic. I'll probably enable monetization on my account and let YouTube place ads in my video, to hopefully get a little money out of it. Beside NetHack, I may feature other games on Linux and open source gaming in general.
NOTE: This is a personal project and not related to SN directly. Unless something is on the main page, assume this is non-SN related, and I'm just writing about it here (since this is the closest thing I have to a blog)
Finally got the first set of code committed to rehash to allow use of IPv6 properly (dev.sn.org has had a AAAA record for ages, but IPv6 address handling has been hosed since day 1, that's why we don't publish one for production). Just need to add some UI tags so admins can see if a ipid/subid is IPv4 or IPv6, and we're more or less set here.