Commit Graph

24 Commits

Author SHA1 Message Date
Ray J. Greenwell 899c976ee7 Whoops: if the stopwords were empty, the pattern matched everything. 2012-12-12 14:17:54 -08:00
Ray J. Greenwell 3ba24a3dc5 Bugfix: cope with an empty stopwords list. 2012-12-12 13:32:49 -08:00
Ray J. Greenwell 776db7fe26 Avoid "if false return false".
But really, these methods should throw an Exception if the key is no good.
Not just return false, which nobody is probably checking.
2012-09-14 11:16:50 -07:00
Ray J. Greenwell 6cfc0890c6 Presumably this should call isAuthenticPeer().
Otherwise nothing calls it.
2012-09-14 11:15:57 -07:00
Ray J. Greenwell ac9083dda5 De-fuckup the /help command handler.
- Put "/help " (with a space after it) in the history so that it's useful.
- Don't return the usage as an error, or the chat entry field
  won't clear. What the fucking fuck? Seriously, there was a 3-fucking-line
  comment in here about doing the right thing and someone ignored it
  and made it do the wrong thing.

SK has been doing the wrong thing in response to chat errors, and now I worry
that games that used to do the right thing have changed to do things
incorrectly because the fucking help command has been fucked up for 2 years.
2012-09-07 11:37:38 -07:00
Ray J. Greenwell 1cafd937b1 Nix null as a nodename: have an explicit adHoc flag.
The hostname being null interfered with peer locks.
Instead let's just allow ourselves to be inited in
"adHoc" mode.

init()'s overloads are becoming overloaded...
populating a properties object might be better...
2012-08-22 19:18:59 -07:00
Ray J. Greenwell 4d8feb215b Nix cruft. 2012-08-13 15:45:27 -07:00
Ray J. Greenwell 7c4a98b3ec Whitespace. 2012-08-08 15:13:45 -07:00
Ray J. Greenwell 24a5800536 More checks for nodes without node objects.
When a NodeAction was queried for which nodes were applicable, it
filtered out nodes that didn't have a nodeObject.
However, when a NodeRequest is similarly queried, null nodeObjects
were not filtered out and I guess it was up to the NodeRequest to
say "no" to null nodeObjects. This is not part of the API specification
for NodeApplicant, and in Spiral Knights we have various requests/actions
that simply return true without regard to the contents of the nodeObject.

So that's fucking retarded. Do the null check just like it's done
for NodeActions. In addition, do an extra check if one of single-node
methods is called for an action or request, to make sure that one
pre-determined node has a nodeObject set up. If not, log a warning,
and return an error response in the NodeRequest case.
2012-08-08 15:04:05 -07:00
Ray J. Greenwell 78515ffcdb Compare node names safely.
And other further fixes to "ad-hoc" nodedness with only one node.
2012-08-08 14:41:51 -07:00
Ray J. Greenwell 829139b1e7 Don't save the NodeRecord if our nodeName is null.
This is to support running in ad-hoc, single-node noded mode.
However, it appears some code in here will choke on a null
node name.

This is for something in Spiral Knights, where we used to run
in non-noded or noded mode, and so we already cope with the
nodeName being null. Now we want to always run noded, so that
we can DRY and not check various local variables before checking
the (other) NodeObjects: now we can just check against all
the node objects.

So I may need to return here and make safe various equality
checks against the nodeName.
2012-08-01 18:44:49 -07:00
Ray J. Greenwell 0686b3f8ee Update comment with new method name. 2012-07-19 13:13:45 -07:00
Ray J. Greenwell 982cfc9a10 Manager caller method names are whitelisted. 2012-07-19 11:49:50 -07:00
Ray J. Greenwell 93517c8e42 Disable "manager calls" by default. **Breaking change**
This closes a giant security hole, but may break existing code.

PlaceObject.ManagerCaller is a poor-man's InvocationService, allowing
one to easily make a call to a method on the PlaceManager. The problem
is that this is turned on by default and any matching method is run.

This change disables it by default, but you may re-enable it by
overriding PlaceManager.handleManagerCalls() and returning true.

I also went ahead and made the ManagerCaller.invoke() method deprecated
so that you'll see a nice warning during compile time. You should
really consider just using a standard InvocationService to communicate with
the server. That way you effectively create a whitelist of client-callable
methods and there will be no surprises.
2012-07-18 17:32:18 -07:00
Ray J. Greenwell 12b9c7199b Make AuthException public.
The Authenticator may delegate to another class that
can't currently access this.
2012-06-20 16:40:30 -07:00
Mark Johnson 83e94c122d - Expose comicChars as a static function 2012-06-11 11:18:43 -07:00
David Hoover 571f4c5f25 Speeling 2012-05-22 15:12:31 -07:00
Ray J. Greenwell a10fc9111c Occam's razor. 2012-03-23 17:23:01 -07:00
Michael Bayne 879f919399 Made config object un/serialization pluggable.
This is much simpler than requiring customizers to extend and override a bunch
of classes just to poke their fingers into the un/serialization process.
2012-03-14 15:24:38 -07:00
Michael Bayne 1c1af8a8e7 Demonstrate parameterizing TestService on TestClientObject. 2012-02-29 17:21:55 -08:00
Dave Hoover e2f86a4f3c Nuke Resulting.ReusableInvocationException.
Premature optimization the fun side effect of rendering the
exception's attached stack trace completely useless.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6794 542714f4-19e9-0310-aa3c-eee0fc999fb1
2012-02-17 19:25:50 +00:00
Mark Johnson 1117025e40 - Added a method to retireve only running nodes from a specific region
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6788 542714f4-19e9-0310-aa3c-eee0fc999fb1
2012-02-16 02:19:04 +00:00
Michael Bayne 1c311431ad Finished the job of splitting Narya into submodules.
The ActionScript code is now under aslib and is built via Maven (and Ant). The
CPP code is under cpplib and is ignored by everything (other than service
generation), but now at least it's not crufting up the Java submodule with its
XCode project.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6783 542714f4-19e9-0310-aa3c-eee0fc999fb1
2012-02-14 19:11:33 +00:00
Michael Bayne a7e0893191 Factored Narya into two Maven modules: core and tools.
This will allow us to properly ship narya-tools.jar to Maven Central which is
necessary for Nenya and Vilya (and any other Narya-using project) to themselves
be built.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6776 542714f4-19e9-0310-aa3c-eee0fc999fb1
2012-02-03 21:25:13 +00:00