Added two new channels: Errors and Info. These will now emit stuff that is sent via log_infomsg and log_errmsg.

This commit is contained in:
Greg Taylor 2007-07-16 18:49:57 +00:00
parent debb34aae9
commit 357ef3a250
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,5 @@
INSERT INTO objects_object VALUES(1,'Wizard','Wizard',1,0,2,1,'',2,'','CONNECTED','2007-04-25'); INSERT INTO objects_object VALUES(1,'Wizard','Wizard',1,0,2,1,'',2,'','CONNECTED','2007-04-25');
INSERT INTO objects_object VALUES(2,'Limbo','Limbo',1,NULL,NULL,2,'Welcome to your new Evennia-based game. From here you are ready to begin development. If you should need help or would like to participate in community discussions, visit http://evennia.com.',NULL,'','','2007-04-25'); INSERT INTO objects_object VALUES(2,'Limbo','Limbo',1,NULL,NULL,2,'Welcome to your new Evennia-based game. From here you are ready to begin development. If you should need help or would like to participate in community discussions, visit http://evennia.com.',NULL,'','','2007-04-25');
INSERT INTO objects_commchannel VALUES(1,'Public','Public',1,'Public Discussion'); INSERT INTO objects_commchannel VALUES(1,'Public','Public',1,'Public Discussion');
INSERT INTO objects_commchannel VALUES(2,'Errors','Errors',1,'Error Log');
INSERT INTO objects_commchannel VALUES(3,'Info','Info',1,'Info Log');

View file

@ -1,7 +1,7 @@
from twisted.python import log from twisted.python import log
import session_mgr import session_mgr
import functions_comsys
""" """
General commonly used functions. General commonly used functions.
""" """
@ -47,6 +47,7 @@ def log_errmsg(errormsg):
errormsg: (string) The message to be logged. errormsg: (string) The message to be logged.
""" """
log.err('ERROR: %s' % (errormsg,)) log.err('ERROR: %s' % (errormsg,))
functions_comsys.send_cmessage("Errors", errormsg)
def log_infomsg(infomsg): def log_infomsg(infomsg):
""" """
@ -55,6 +56,7 @@ def log_infomsg(infomsg):
debugmsg: (string) The message to be logged. debugmsg: (string) The message to be logged.
""" """
log.msg('%s' % (infomsg,)) log.msg('%s' % (infomsg,))
functions_comsys.send_cmessage("Info", infomsg)
def time_format(seconds, style=0): def time_format(seconds, style=0):
""" """