Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


Generic Journal Entry

Posted by The Mighty Buzzard on Wednesday May 07 2014, @01:38PM (#361)
8 Comments
/dev/random

This is a generic journal entry posted entirely so that you can tell me I'm awesome, call me a dick, or impart useful information since SN lacks a messaging feature and I'm not giving out my email address.

IRCiv progress

Posted by crutchy on Tuesday May 06 2014, @01:08PM (#357)
0 Comments
Code

updated unit movement, added settler, got active unit cycling working

made up a simple logo to (eventually) go on the IRCiv website
for now its here: http://wiki.soylentnews.org/wiki/IRCiv

pushed to github: https://github.com/crutchy-/test
note: irciv.php is in scripts directory and contains most of the game functionality

coming up next... building/setting up the IRCiv website (to eventually host player map images)

IRCiv progress

Posted by crutchy on Monday May 05 2014, @01:52PM (#355)
0 Comments
Code

put movement of active unit into a function

created <init> and <quit> reserved aliases in exec (irc.php), which i'll eventually use for loading/saving game data (in addition to timed saves).

used cmd.php (attached to * alias which runs on every received line of data) to fire commands on a 330 numeric event (whois/logged in as) to make startup a bit easier - automatically sets player alias lock to "civ" (in game channel only) and outputs a status command, so that when a player joins a game channel, they can start moving their active unit pretty much straight away (after a 2 or so second delay in processing login script).

IRCiv wiki page created: http://wiki.soylentnews.org/wiki/IRCiv

latest source pushed to github: https://github.com/crutchy-/test

next up... adding a settler unit and getting the active unit cycle function working

IRCiv progress

Posted by crutchy on Sunday May 04 2014, @09:57PM (#352)
0 Comments
Code

IRCiv is a little game (and game engine of sorts) for building stuff like in "Civilization"-branded games.

Currently it piggybacks as a couple of scripts for the exec bot. Refer to the wiki for more info on exec: http://wiki.soylentnews.org/wiki/IRC:exec

Implemented some basic unit movement last night. Can use "up" or "u" action on the active unit (along with equivalents in the 3 other directions).

The game is being gradually developed/tested most nights (Australian time) in the #civ channel of Soylent IRC. Feel free to join, but be aware that you may get pinged by the bot a fair bit (you're always free to duck in and out whenever you like of course).

Other stuff that has been implemented already:
- auto-login on join/logout on part
- logins based on nickserv account name (using whois), so means that players must be registered with nickserve
- supports nick changes
- map generator has been developed (random landmasses based on a couple of parameters)
- map image dump
- map text file dump
- player settings and flags system
- player active unit status output to either game channel or private message (based on "public_status" flag)

Currently development is mainly in PHP, but using the exec bot system, game features/modules can be developed in any language.
Each command runs as a separate script in its own process instance, but can easily communicate with IRC and access persistent game data.
The project is open-source (GPL2) and can be found here: https://github.com/crutchy-/test
Feel free to fork or pilfer, but please share your changes/derivatives.
Anyone interested in contributing to the current project, look for crutchy in #soylent or #civ on IRC.

Setting Up An SN Minecraft Server ...

Posted by NCommander on Thursday April 17 2014, @09:06PM (#308)
12 Comments
Code

So ... I've recently gotten back into minecraft, and figured that perhaps there are other MC players here at SN, so I wanted to know if there was enough interest to setup a MC server in general. I'd probably use CraftBukkit, and I'm open to running mods if others are interesting. Leave a message below if you'd be interested.

Mods I'd like to run:
  * Traincraft
  * Railcraft
  * Mystcraft (useful for getting new ores without having to reset maps; age creation would be restricted to admins though; mystcraft is a server hog).

Leave your thoughts below.

About Today's Site Explosion

Posted by NCommander on Thursday April 17 2014, @04:07AM (#304)
7 Comments
Soylent

Since we've got a fair number of complaints about us running too many site news articles, I'm going to condemn this to my journal, then link it next time we *do* post something about the site. For a large portion of today (4/16), SoylentNews users had issues with commenting, and moderation was completely hosed. This was due to a backend change; we shifted the site behind a loadbalancer in preparation of bringing up a new frontend and give us considerably more redundancy and latitude with working with the backend.

This change had been setup on dev for the last week with us testing it to see what (if anything) broken, and it was discussed and signed off by all of the staff. Last night, I flipped the nodebalancer to connect to production instead of dev, then changed the DNS A record for the site to point at the loadbalancer.

I stayed up for several hours at this point to ensure nothing odd was going on, and satisfied that the world would keep spinning, I went to bed. What I found though was I broke the formkeys system. Slash knows about the X-Forwarded-By header, a mechanism for when a site is behind a proxy on how to relay client IP information (this mechanism was already used by both varnish and nginx), however, for security reasons, we strip out the XFF header from inbound connections unless its on a specific whitelist. On both dev and production, we had whitelisted the nodebalancer to pass this header in properly.

Or so we thought. Linode's documentation doesn't mention, but the IP address listed in the admin interface is *not* the IP used to connect to the site; instead it uses a special internal IP address which isn't listed or documented anywhere. Our security precautions stripped out the X-Forwarded-By header, and made it appear that all inbound users were coming from the same IP. This wasn't noticed on dev as slash ignores the formkeys system for admins, and the few of us beating on it with non-admin accounts weren't able to do enough abuse to trigger the formkey limiters.

Our peak hours are generally evenings EDT, which means the low traffic at night wasn't enough to trip it either (or at least no one on IRC poked me about it, nor were there any bugs on it on our github page. However, once traffic started picking up, users began to clobber each other, commenting broke, and the site went to straight to hell. When I got up, debugging efforts were underway, but it took considerable time to understand the cause of the breakage; simply reverting LBing wasn't an easy fix since we'd still have to wait for DNS to propagate and we needed the load balancer anyway. After a eureka moment, we were able to locate the correct internal IPs, and whitelist them, which got the site partially functional again. (we have informed Linode about this, and they said our comments are on its way to the appropriate teams; hopefully no other site will ever have this same problem).

The last remaining item was SSL; we had originally opted out of terminating SSL on the loadbalancer, prefering to do it on the nginx instance, so Port 443 was set to TCP loadbalancing. This had the same effect as there is no way for us to see the inbound IP (I had assumed it would do something like NAT to make connections appear like they were coming from the same place). The fix was utlimately installing the SSL certificate on the load balancer, then modifying varnish to look for the X-Forwarded-Proto header to know if a connection was SSL or not. I'm not hugely happy about this as it means wiretapping would be possible between the load balancer and the node, but until we have a better system for handling SSL, there isn't a lot we can do about it.

As always, leave comments below, and I'll leave my two cents.

Why The Proxy Detection Code Pissed Me Off

Posted by NCommander on Thursday April 10 2014, @12:54AM (#277)
11 Comments
Soylent

Now that I've had some time to clear my head, I want to expand on my original feelings. I'm pissed off about this, and my temper flared through on the original post. I'm leaving it as is because I'm not going to edit it to make myself look better, and because it sums up my feelings pretty succinctly. How would you feel if something you worked on under the promise of building the best site for a community was regularly and routinely causing corporate firewalls and IDS systems to go off like crazy?

You'd be pissed. Had we known about this behaviour in advance, it would have been disabled at golive or in a point release, and a minor note would have gone up about it. Instead, I found out because we were tripping a user's firewall causing the site to get autoblocked. I realize some people feel this is acceptable behaviour, but a website should *never* trigger IDS or appear malicious in any way. Given the current state of NSA/GCHQ wiretapping and such, it means that anything tripping these types of systems is going to be looked at suspiciously to say the least. I'm not inherently against such a feature (IRC networks check for proxying for instance), but its clearly detailed in the MOTD of basically every network that does it.

There wasn't a single thing in the FAQ that suggested it, and a Google search against the other site didn't pop something up that dedicated what was being done; just a small note that some proxies were being blocked. Had the stock FAQ file, or documentation, or anything detailed this behaviour, while I might still have thought it wrong, at least I wouldn't have gotten upset about it. I knew that there was proxy scanning code in slashcode, but all the vars in the database were set to off; as I discovered, they're ignored leading me to write a master off switch in the underlying scanning function.

Perhaps in total, this isn't a big deal, but it felt like a slap in the face. I know I have a temper, and I've been working to keep it under wraps (something easier said than done, but nothing worthwhile is ever easy). CmdrTaco himself commented on this on hackernews and I've written a reply to him about it. Slashdot did what they felt was necessary to stop spam on their site, and by 2008, slashcode only really existed for slashdot itself; other slash sites run on their own branches of older code. Right or wrong, such behaviour should be clearly documented, as its not something you expect, and can (and has) caused issues to users and concerns due to lack of communication. Transparency isn't easy, but I have found its the only way to have a truly healthy community. Perhaps you disagree. I'll respond to any comments or criticisms left below.

rainbow irc

Posted by crutchy on Friday April 04 2014, @07:26AM (#251)
0 Comments
Code

https://github.com/crutchy-/test/blob/master/karma_published.php

bacon+
(only single +/- to differentiate from bender)

~karma bacon

~rainbow pretty text

etc

todo: quotes

crunch has been re-tasked

Posted by crutchy on Saturday March 29 2014, @02:14PM (#239)
0 Comments
Code

no more searching

reset color:

~color -1

bold white:

~color 00

change color per mirc values: http://www.mirc.com/colors.html

~color 01

thru

~color 15

requote last in weird and wonderful ways (or show about):

~

bot doesn't quote itself (shows about)
atm only verbs ending in "ing" and a small set of nouns recognised, but this will grow

if you're interested in contributing (even just to the arrays) have a squiz at:
https://github.com/crutchy-/test/blob/master/bacon.php

anyone new to git, have a squiz at http://wiki.soylentnews.org/wiki/User:Crutchy#Git.2FGitHub
you can also edit directly on github (ideally only for simple changes such as additions to arrays).

todo: add collective noun substitution
todo: add ability to append arrays from within irc

thanks heaps mrbluze... ideas man and english extraordinaire

Site Backend Changes

Posted by NCommander on Friday March 28 2014, @09:15AM (#237)
4 Comments
Soylent

We're testing a new configuration between the site and the database. There may be unexpected issues with the site while we're testing. Keep calm and carry on.