Moved the connect screen to the connect_screen config directive. Made the conf_value field on the configvalue model a TextField so we're not getting truncated at 255 as with a CharField. This means you'll need to delete your config tables and re-sync.

This commit is contained in:
Greg Taylor 2007-10-27 03:25:42 +00:00
parent f3b4422990
commit 4d94132c54
4 changed files with 17 additions and 11 deletions

View file

@ -20,7 +20,7 @@ class ConfigValue(models.Model):
Experimental new config model.
"""
conf_key = models.CharField(maxlength=100)
conf_value = models.CharField(maxlength=255 )
conf_value = models.TextField()
class Admin:
list_display = ('conf_key', 'conf_value',)

View file

@ -5,3 +5,13 @@ INSERT INTO config_configvalue VALUES(4,'money_name_singular','Credit');
INSERT INTO config_configvalue VALUES(5,'game_firstrun','1');
INSERT INTO config_configvalue VALUES(6,'idle_timeout','1800');
INSERT INTO config_configvalue VALUES(7,'default_home','2');
INSERT INTO config_configvalue VALUES(8,'connect_screen','
%%ch%%cb==================================================================%%cn
Welcome to Evennia! Please type one of the following to begin:
If you have an existing account, connect to it by typing:
%%chconnect <email> <password2>%%cn
If you need to create an account, type (without the <>''s):
%%chcreate "<username>" <email> <password>%%cn
%%ch%%cb==================================================================%%cn
');

View file

@ -10,6 +10,8 @@ from django.contrib.auth.models import User
import functions_db
import functions_general
import session_mgr
import ansi
import gameconf
class SessionProtocol(StatefulTelnetProtocol):
"""
@ -117,15 +119,9 @@ class SessionProtocol(StatefulTelnetProtocol):
def game_connect_screen(self):
"""
Show the banner screen.
Show the banner screen. Grab from the 'connect_screen' config directive.
"""
buffer = '-'*50
buffer += ' \n\rWelcome to Evennia!\n\r'
buffer += '-'*50 + '\n\r'
buffer += """Please type one of the following to begin:\n\r
connect <email> <password>\n\r
create \"<username>\" <email> <password>\n\r"""
buffer += '-'*50
buffer = ansi.parse_ansi(gameconf.get_configvalue('connect_screen'))
self.msg(buffer)
def is_loggedin(self):

View file

@ -11,6 +11,6 @@ mv -f $BASE_PATH/logs/evennia.log $BASE_PATH/logs/evennia.logs.old
## mode instead of having to uncomment crap.
## Interactive mode. Good for development and debugging.
#twistd -noy twistd -ny server.py
twistd -noy twistd -ny server.py
## Stand-alone mode. Good for running games.
twistd -y server.py
#twistd -y server.py