Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


exec irc bot developments

Posted by crutchy on Friday April 03 2015, @09:20AM (#1128)
0 Comments
Code

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.

https://github.com/crutchy-/ircd

Doing a Let's Play Series of NetHack and Future Livestreams

Posted by NCommander on Friday April 03 2015, @07:11AM (#1127)
3 Comments
/dev/random

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)

IPv6 is fun (More rehash(ed) work)

Posted by NCommander on Sunday March 29 2015, @05:33AM (#1113)
0 Comments
Code

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.

SoylentNews IRC comments feed dispatch filters

Posted by crutchy on Saturday March 21 2015, @11:23PM (#1098)
0 Comments
Code

Our IRC (http://irc.sylnt.us/) has a #comments channel that you can join to see an hourly feed of all new comments that appear in reply to SoylentNews stories.

This has been around for a while, but over the weekend a new feature was added to allow more personalized comment feeds.

Filtered feeds can be dispatched either as a PM to your nick or to a channel of your choosing. To dispatch to a channel you just need to make sure the exec bot resides in that channel (you can command it to join by visiting #soylent and typing "~join #mychannel").

There are two types of filters; cid and pattern

The cid filter is useful if you would like a feed of all responses in a specific comment thread. You simply add a filter that points to the parent comment cid and the bot will feed all child comments that appear.

Using a pattern filter enables you to feed comments that meet certain criteria. There are a number of fields you can match, and any new comment that matches the criteria in a filter will be output to the target nick/channel.

You can add multiple filters to track multiple cid's and/or comments that match multiple patterns.

The following commands can be performed in any channel where the exec bot resides:

~comments filter-add %id% %target% %cid%
~comments filter-add %id% %target% %field% %pattern%
~comments filter-delete %id%
~comments filter-list

%id% = unique name to identify filter (cannot contain spaces)
%target% = channel or nick to send filtered comments to
%cid% = SoylentNews comment id to track ("cid" parameter in uri)
%field% = any of user, uid, score, score_num, subject, title, comment_body (title refers to the story title)
%pattern% = regexp pattern for use with preg_match (surrounding #'s are added by the script)

examples:
- if you wanted a feed for all replies to this comment: http://soylentnews.org/comments.pl?sid=6634&cid=160651
you would use this command:

~comments filter-add my_test_filter #mychannel 160651

- if you wanted a feed with any comments that contain "systemd" you could use this command:

~comments filter-add systemd_filter_1 #mychannel comment_body systemd

and if you also wanted comments with "systemd" in the subject, add another filter:

~comments filter-add systemd_filter_2 #mychannel subject systemd

--
source (unlicensed): https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/comment_feed.php

Bug fixing, one hack at a time (Rehash porting progress)

Posted by NCommander on Friday March 20 2015, @02:56PM (#1096)
3 Comments
Code

Squished an annoying bug in rehash that prevented formkeys working due to changes in how mod_perl works, I dunno worse, the abuse of the MP1 API, or the hack I had to code to emulate the old behavior; here's the comment I left about it:

                # UNBELIEVE HACKINESS AHEAD
                #
                # Ok, under MP1, it was possible to use param as a "semi-persistant" scratchpad
                # that is, to save a new element in the hashref, and get it back by future calls
                #
                # This worked because the older APR methods allowed you to store into the HASREF.
                # even though this behavior was wrong, and bad according to MP documentation. MP2
                # now removed the STORE method from the APR tables so any attempt to write to them
                # goes BANG.
                #
                # Since we can't do that now, we're going to have to fake it. On our first call to
                # getCurrentForm, we'll copy the param tables to a hashref, then shove it into the
                # apache2 pnotes, and then retrieve it on demand.
                #
                # This is a fucking hack, but I can't think of a better way than to refactor a TON of
                # perl, and perl is not a language that makes it easy to refactor ...

Rehash 15.04 progress ...

Posted by NCommander on Monday March 16 2015, @11:29AM (#1082)
0 Comments
Code

Currently deep in working on getting the first rehash (MP2 slashcode) release put together. lithium got rebuilt and is now on the MP2 release. Since this upgrade is disruptive anyone, we decided to go full-in and put in a migration to MySQL cluster as well; which will require some code changes for Search, but otherwise was mostly a drop in upgrade.

What's coming in the next /code update ...

Posted by NCommander on Saturday February 21 2015, @09:36PM (#1032)
2 Comments
Soylent

I'm just going to leave this here ...

Server: Apache/2.2.29 (Unix) DAV/2 mod_apreq2-20090110/2.8.0 mod_perl/2.0.8 Perl/v5.20.1
X-Powered-By: slashcode 15.01
X-Fry: I'm never gonna get used to the thirty-first century. Caffeinated bacon?

and just say I'm a certifiable madman.

mini-slashcode-wannabe project

Posted by crutchy on Monday February 16 2015, @09:37PM (#1020)
0 Comments
Code

been mucking around with a little website thing intended to be sort of similar to SoylentNews/Pipedot/etc

it's written in php and is intended to be very simple

site (not yet fully functional) is here: http://news.my.to/

sample story with a bunch of nested test comments here: http://news.my.to/story/1

code for site is here: https://github.com/crutchy-/exec-irc-bot/tree/master/website/news.my.to

so far it has basic rewrite rules, templating for html, uses pdo, no classes (procedural only)

code is unlicensed (https://github.com/crutchy-/exec-irc-bot/blob/master/unlicense.txt)

pastebin

Posted by crutchy on Sunday January 25 2015, @12:37PM (#972)
0 Comments
Code

had a go at making a simple pastebin. nothing fancy (no context highlighting, line numbers, etc)

http://paste.my.to/

similarish workings to the url shortener

url shortener

Posted by crutchy on Sunday January 25 2015, @03:08AM (#970)
2 Comments
Code

had a go at making a url shortener. very basic but seems to work

http://o.my.to/

you can also use it from soylent irc with the command "~shorten %url%" (must be identified with nickserv)