Ahmed Charles
39e40bfba1
Don't show tracebacks to players.
...
In this case, the tracebacks are in the log.
2015-11-09 12:30:55 +01:00
Ahmed Charles
487fcdf873
Use list* from future.utils.
...
dict.keys() -> list(dict)
dict.values() -> listvalues(dict)
dict.tems() -> listitems(dict)
2015-11-09 10:23:00 +00:00
Dan Feeney
ccd1451a02
wrote tests for the convert_urls function of TextToHTMLparser
...
improved regex to better handle edge cases, particularly a period following the URL
2015-11-09 10:21:39 +01:00
Dan Feeney
db218f7293
fixed regexp used in text2html's convert_urls function and moved it to the block of other parsed regex in the module
2015-11-09 10:21:39 +01:00
Ahmed Charles
b9bdeb3e9c
Replace filter with if/comprehension.
2015-11-09 10:11:34 +01:00
Ahmed Charles
be7035416c
Cleanup int include.
2015-11-09 10:11:34 +01:00
Ahmed Charles
1968f15895
Remove commented out code.
2015-11-09 10:11:34 +01:00
Ahmed Charles
de0e42240c
Have every class inherit from object.
2015-11-09 10:11:34 +01:00
Kelketek
a8127b0f41
Merge pull request #874 from ahmedcharles/range
...
Use python3 range.
2015-11-02 07:47:02 -06:00
Ahmed Charles
bcd8674ef3
Use python3 range.
...
Including potential memory reduction due to not created unnecessary lists.
2015-11-02 11:47:07 +00:00
Ahmed Charles
ee0db7a50d
Use python3 input.
2015-11-02 00:19:04 +01:00
Ahmed Charles
f38efab999
Import python3 compatible cmp.
2015-11-02 00:19:04 +01:00
Ahmed Charles
c9404bfb51
Don't use long, since it doesn't exist in python3.
2015-11-02 00:19:04 +01:00
Ahmed Charles
11b61fe335
Import python3 compatible object.
2015-11-02 00:19:04 +01:00
Ahmed Charles
4f07da29c2
Move normal login code into it's own function.
2015-11-02 00:19:04 +01:00
Ahmed Charles
cbe1eefcf0
Move to python3 style division.
...
All of these are currently integer division in python2.
2015-11-01 20:47:18 +00:00
Ahmed Charles
c8fbd2860d
Use logger rather than print for these messages.
2015-11-01 21:39:48 +01:00
Ahmed Charles
3357712103
Use logger rather than a custom implementation.
2015-11-01 20:27:49 +00:00
Ahmed Charles
28a754033e
Remove unnecessary print functions.
2015-11-01 21:21:32 +01:00
Ahmed Charles
d1244b41db
Use msg rather than print, here.
2015-11-01 21:21:32 +01:00
Ahmed Charles
99f0fec7cf
Use comprehension rather than map.
2015-11-01 21:16:41 +01:00
Ahmed Charles
7645338218
Fix indentation.
2015-11-01 21:16:41 +01:00
Ahmed Charles
c220d5eeeb
at_post_puppet should be called after cache_lock_bypass.
...
at_post_puppet does a look, which results in a perms check, which is wrong
for the superuser because the lock bypass is not up to date.
2015-11-01 21:16:41 +01:00
Griatch
f0c27d80b9
Added a missing migration to repo.
2015-11-01 18:21:21 +01:00
Griatch
a64f7b5630
Some cleanup in the launcher output.
2015-11-01 18:20:08 +01:00
Griatch
836c9913d5
Run migrations! Added Tagging to default Msg object.
2015-11-01 18:00:31 +01:00
Griatch
6db109c333
For some reason Msg's LockHandler was not assigned. Resolves #855 .
2015-11-01 17:51:00 +01:00
Griatch
e67c2bb7d7
Made sure to run clear_all_sessions() at cold start, just to catch the edge case where the server was killed without a chance to do its normal cleanup (which could then leave lingering sessids behind). Resolves #856 .
2015-11-01 17:39:39 +01:00
Griatch
c58f858339
Reworked that look() methods on Players and Objects into at_look. They were also changed to accept pre-searched target objects rather than the command string. They also return a processed look string rather than sending it directly. The reason for this is that methods on the typeclass should not be handling command parsing - this should be the exclusive job of Command.parse in order to make command parsing completely contained withing one system. Likewise, it makes for more flexibility to not call self.msg() inside at_look but to let the outside caller do this explicitly - it might want to modify and append to the string before sending it off (something not used anywhere yet but which may be interesting). In order to correctly keep parsing entirely in the command body for the player, I made a custom parent for CmdOOCLook and CmdOOC, which does the parsing of the 'playable' characters already at the parse() step, storing the result in the .playable property on the (player-) command. This technique could probably be applied to other player commands looking up the _playable_characters Attribute, in order to centralize it.
2015-11-01 17:13:00 +01:00
Ahmed Charles
c51ccd5bc7
Typo in objects.py.
2015-11-01 15:24:40 +01:00
Ahmed Charles
ecd68ccb7d
Fix typo in comment.
2015-11-01 15:11:39 +01:00
Ahmed Charles
9d3ce1e8f0
Call at_server_shutdown, at reset/shutdown for scripts.
2015-11-01 15:11:39 +01:00
Ahmed Charles
726e505311
Add look() on DefaultPlayer.
2015-11-01 15:11:39 +01:00
Ahmed Charles
15e0e479d1
Fix bug in examine.
...
Examine sorts the original stack used by the object that it examines,
which is bad.
2015-11-01 15:11:39 +01:00
Ahmed Charles
caddb8b79b
Add look() on DefaultObject.
2015-11-01 15:11:39 +01:00
Ahmed Charles
53227cda3e
Add for_contents() which runs a function on an object's contents.
2015-11-01 15:11:12 +01:00
Ahmed Charles
8a66fc40a9
Use with_metaclass from future.utils for python3 compat.
2015-11-01 15:11:12 +01:00
Ahmed Charles
79437c0e48
Move guest login to a separate function.
2015-11-01 15:11:12 +01:00
Ahmed Charles
c6b6edf7f7
Don't execute_cmd("quit"), just disconnect.
2015-11-01 15:11:12 +01:00
Ahmed Charles
cd23c6c056
Indent docs properly.
2015-11-01 15:11:12 +01:00
Ahmed Charles
ab8ea3d75d
Remove unused import.
2015-11-01 15:11:12 +01:00
Griatch
23bfa1f84e
Clarified some inlinefunc docs.
2015-10-20 23:49:48 +02:00
Ahmed Charles
3188f89e47
Cleanup some logger functions which were missed in the merge conflict.
2015-10-19 22:51:49 +00:00
Griatch
c7e1a6a086
Resolved merge conflicts against master.
2015-10-20 00:07:39 +02:00
Ahmed Charles
f3498f480a
If the option has a blank key and desc, do not show it.
...
Without this, it's impossible to have empty input go back to the current
node, without having an entry show up in the list. Trying to use
_default results in needed an additional node.
2015-10-19 23:32:13 +02:00
Ahmed Charles
9ecda0cd89
Change default formatting behaviors to functions.
...
Also add new functions to make it easy to get minimal changes.
2015-10-19 23:32:13 +02:00
Ahmed Charles
9b17fa450d
Remove unnecessary assignment.
2015-10-19 23:32:13 +02:00
Griatch
50371b6abd
Merged conflicts.
2015-10-19 23:32:00 +02:00
Ahmed Charles
48f1d0b26f
Remove commented out logger calls.
2015-10-19 23:31:19 +02:00
Ahmed Charles
acdf2573b0
Printing traces to the user is usually bad.
...
This could, in theory, expose more information about how the server
works than would be advised, benefiting potential attackers.
2015-10-19 23:31:19 +02:00