Commit graph

69 commits

Author SHA1 Message Date
Griatch
74eebfed6d Refactor code to remove alerts as per lgtm and #1176. 2017-01-29 19:02:00 +01:00
Griatch
3e21023ad8 Made the sessionhandler never accept None as a Session; this should make it clearer when a Session becomes invalid and avoid confusing the sessionhandler cache of other objects. Should resolve #1181. 2017-01-29 14:24:18 +01:00
Griatch
052e1845a2 Fix error in MonitorHandler recovering a saved Session across a reload. This probably affected the TickerHandler as well. Add a new hook to the server object that gets called once the portal has synced, and run the monitorhandler/tickerhandler restores there. Also some changes to the serialization of Sessions. Resolves #1164. 2017-01-15 19:55:51 +01:00
Griatch
a403cc9576 Change ingoing message path to reroute through serversession.data_in before calling the inputfuncs. This allows users to view all incoming data in one place if they want to do eventual pre-processing. Resolves #1163. 2017-01-14 12:28:07 +01:00
Griatch
00c64b10bb Make sure msg(text=None) means that text should not be used (None must be converted to a string to send). Resolves #1077. 2016-10-02 21:51:15 +02:00
Griatch
86f963fa71 Make sure a player associated with a connected Session is always tagged as is_connected. Resolves #1061. 2016-09-14 22:01:32 +02:00
Griatch
76a903119c Clean up log file output and fix some bugs. Swallows spammy and useless AMP connection errors. 2016-09-13 23:10:51 +02:00
Griatch
86c970eb62 Add sessionhandler.portal_disconnect_all to remove another needless call between server and portal on logout. This means logout from either side will clean up on the respective side and then inform the other side once, rather than triggering a return call. 2016-09-13 21:48:43 +02:00
Griatch
8eb500f8e0 Add sessionhandler.portal_disconnect which cuts down interaction over AMP by one when a player disconnects. 2016-09-13 20:42:38 +02:00
Griatch
f04c82fa17 Implemented shared sessions between webclient and website - logging into either will also log in the player to the other. This is addresses the first point of #613. 2016-06-01 01:22:20 +02:00
Griatch
eebd41f46d Getting an improved version of the shared session system vaguely in shape. 2016-06-01 01:22:20 +02:00
Griatch
a31441b3ce First working version of the shared web login. 2016-06-01 01:22:19 +02:00
Griatch
7c3d072915 Fixed so inlinefuncs are only parses on the outgoing message path. 2016-05-26 14:56:09 +02:00
Griatch
644cf9451f Removed deprecated non-nested {inlinefuncs, only accepting (). Changed the default name of the mygame/server/conf/inlinefunc.py to mygame/server/conf/inlinefuncs.py. Added deprecationwarning for the old name. 2016-05-22 20:49:45 +02:00
Griatch
8bf63885e2 Made some minor updates to the evmenu_login contrib, including adding a max number of password retries before disconnecting as well as fixing how client-exhoes are handled. Also made empty string return rather than 'b'. Also fixed an inconsistency in the Session.msg. 2016-05-22 20:49:44 +02:00
Griatch
043be6dba4 Validating GMCP/MSDP protocol commands, first debugging run and fixes to make a few of the default inputfuncs work. Added INPUTDEBUG to the options dict, to echo input function errors directly. 2016-05-22 20:45:41 +02:00
Griatch
4f02ec1cbe Implement the MSDP/GMCP wrappers for the backend inlinefuncs as per #924. It's not fully tested yet though. 2016-05-22 20:45:41 +02:00
Griatch
11ecdef7c8 Converted encoding setting to use protocol_flags rather than being stored on-session. Also renamed the 256 COLORS TTYPE setting to XTERM256 which is more accurate (and doesn't have a space) 2016-05-22 20:45:40 +02:00
Griatch
f3512971e3 Created setter inputfuncs for the basic GMCP handhakes. Also added
the possibility for the Server to sync a single Session with the
Portal.
2016-05-22 20:45:40 +02:00
Griatch
ddb87d6aea Made IRC work with new send mechanism, as per #924. 2016-05-22 20:45:39 +02:00
Griatch
83570848d6 Made all unittests pass again. 2016-05-22 20:45:38 +02:00
Griatch
83e24678f5 Fixed a bug which caused a failure when logging out 2016-05-22 20:45:38 +02:00
Griatch
006e367330 Made GMCP/MSDP work for tintin++. Mudlet seems to send the handshake differently. 2016-05-22 20:45:38 +02:00
Griatch
4ab049709d Changed inputhandler/oochandler to monitorhandler and made inputhandler_funcs into just inputfuncs.py 2016-05-22 20:45:06 +02:00
Griatch
1044006303 Moved inlinefunc-parsing to sessionhandler level. First text throughput for webclient alongside telnet. 2016-05-22 20:45:05 +02:00
Griatch
2890371900 Still messing with getting the webclient to talk properly to the server. 2016-05-22 20:45:05 +02:00
Griatch
c511263f63 Made basic telnet work again. 2016-05-22 20:45:05 +02:00
Griatch
96ace8c75f Starting to clean up and debug the server-side infrastructure 2016-05-22 20:45:05 +02:00
Griatch
e4d50ff74e Changes to the input-handling interface, to support function calls; also changing oob system to be inputhandler system, making it all work in the same way (no separation between text and oob anymore). 2016-05-22 20:45:05 +02:00
Griatch
2d826df2f4 Made a first version of the new OOB infrastructure, works with normal text-command sending. 2016-05-22 20:45:05 +02:00
Griatch
4817ec90b3 Changed the OOB message structure to include sending text data as well; still not working fully. 2016-05-22 20:45:05 +02:00
Griatch
8655f880f2 Fixed a malformed call to portal_disconnect that stopped auto-disconnection from working. Also removed sessiohandler.portal_disconnect since it has no function anymore, as well as changed two AMP command chars around for better debugging (they were matching the tab- and line breaks chars before). Resolves #900. 2016-01-19 20:52:26 +01:00
Griatch
5d6d13bb12 Added a validation-check when changing encodings using the default commands (unloggedin/general). Also put in a safety catch in the sessionhandler to reset faulty encodings that slips by for some reason. This can otherwise lead to errors for shutting down the server since the server fails trying to inform the faulty session about the shutdown. 2016-01-12 21:35:27 +01:00
Griatch
45f973fdb6 Made unittests work with changed Session apis. Resolves #808. 2015-11-15 20:36:18 +01:00
Griatch
efefe3e5ff First version of changed sessid->session change that starts properly. Not fully tested yet. 2015-11-14 21:43:58 +01:00
Griatch
d496606a3c Further development of the reworking of systems using Sessions rather than session id. 2015-11-14 20:32:58 +01:00
Griatch
709f5ff5b3 Reworked most of the system to use sessions directly instead of sessids by the introduction of on-object sessionhandlers. No debugging done yet. 2015-11-14 18:36:19 +01:00
Griatch
3c9a6749f9 Made sessionhandlers inherit directly from dicts. 2015-11-13 22:33:58 +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
Ahmed Charles
11b61fe335 Import python3 compatible object. 2015-11-02 00:19:04 +01:00
Ahmed Charles
bc340fbf0d Remove commented out print statements. 2015-10-19 23:31:19 +02:00
Griatch
1348fae5a0 Reworked the flow of the data property through AMP to fix inconsistencies and make some overall cleanup of the arguments used to send AMP messages. Resolves #815. 2015-10-11 18:49:38 +02:00
Griatch
1d17302d16 Refactoring to go with the fixed AMP structure and methods. 2015-09-21 16:50:05 +02:00
Griatch
018250e4e5 More refined time tracing. It seems the AMP connection is really the bottleneck. 2015-09-17 22:39:48 +02:00
Griatch
d02b781be1 Time tracing setup for tracing the flow of data through AMP. 2015-09-17 21:56:14 +02:00
Griatch
00b5309295 Updated more of server/ to google docstrings as per #709. 2015-06-23 10:42:51 +02:00
Griatch
a9569f274f Added setTcpNoDelay to AMP connection. On Linux this leads to x10 faster roundtime on sends, as per #746. 2015-06-01 23:30:37 +02:00
Griatch
1526924b93 Changed sessionhandler.all_connected_players() to return a list of Player objects rather than a list if uids (pointed out by Volund). Also changed sessionhandler.player_count() only return the count without any extra kwarg and doing so a little more efficiently. 2015-03-11 23:54:44 +01:00
Griatch
19867ddfcd Fixed some formatting to make untittests pass again. 2015-03-08 11:20:05 +01:00
Griatch
b2505fe14c Updated some locale files. 2015-03-08 00:01:12 +01:00