Commit graph

82 commits

Author SHA1 Message Date
Griatch
63bf978b39 Fix error in MULTISESSION_MODE=0 that would not correctly disconnect duplicate sessions but just unpuppet them 2018-01-21 12:29:22 +01:00
Griatch
e3de3fb1dc Make DELAY_CMD_LOGINSTART configurable in settings 2018-01-06 20:13:36 +01:00
Griatch
82e12f15ff Don't send delayed CMD_LOGINSTART if session already logged in (to handle autologins) 2018-01-03 22:37:52 +01:00
Griatch
74e8c74f80 Work towards resolving unittests with deferreds 2018-01-02 21:21:57 +01:00
Griatch
a342353fd6 Add a slight delay to telnet handshake to give mudlet a chance to catch up 2018-01-01 20:58:48 +01:00
Griatch
c8b1dfcd20 Allow options to partially update portal session, correctly relay late handshakes. 2017-12-31 23:16:16 +01:00
Griatch
8a2e362b7c Make IDLE_TIMEOUT avoidable with account-lock.
Resolves #701. Check the Account-lock 'no_idle_disconnect before kicking an idle
session. This also means superusers will never be kicked. Move the
idle task to the Server to avoid lock imports in Portal. Make the
'lock' command also able to target Accounts. Also some other fixes.
2017-08-20 23:11:33 +02:00
Griatch
cdac9678b9 Add smarter shared login on website/webclient. Resolves #1063.
This makes it so that logging into the website will auto-log you
into the webclient and vice-versa when you refresh the page. But if
you log out of the web client will have to manually log in again. If
you log out of the website and reload the webclient page you will have
to log back into the client too (this is because logging out of the
website flushes the browser session, it doesn't seem worth the effort
to override django.auth in this).
2017-08-20 20:36:35 +02:00
Griatch
b278337172 Make PEP8 cleanup of line spaces and character distances as well as indents 2017-08-19 23:16:36 +02:00
Griatch
7ff783fea1 Resolve merge conflicts with master. 2017-08-19 21:30:42 +02:00
Jonathan Piacenti
89165b444f Force ANSIString into bytestring before sessions send it over the wire. 2017-08-13 07:35:40 -05:00
Griatch
5590ee2258 Rename all instances of Player->Account. 2017-07-07 23:47:21 +02:00
Tablet-PC\cloud
8fc20a3056 Unsuccessfull attempts 2017-02-11 18:45:55 +01:00
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