diff --git a/evennia/trunk/commonfuncs.py b/evennia/trunk/commonfuncs.py deleted file mode 100755 index 8addcb88c5..0000000000 --- a/evennia/trunk/commonfuncs.py +++ /dev/null @@ -1,4 +0,0 @@ -from apps.objects.models import Object, Attribute - -def list_search_object_str(searchlist, ostring): - [prospect for prospect in searchlist if prospect.name_match(ostring)] diff --git a/evennia/trunk/server.py b/evennia/trunk/server.py index 70edf9ee72..adedcc3327 100755 --- a/evennia/trunk/server.py +++ b/evennia/trunk/server.py @@ -118,7 +118,7 @@ class Server(dispatcher): """ self.object_list[object.id] = object - def announce_all(self, message, with_ann_prefix=True): + def announce_all(self, message, with_ann_prefix=True, with_nl=True): """ Announces something to all connected players. """ @@ -127,8 +127,13 @@ class Server(dispatcher): else: prefix = '' + if with_nl: + newline = '\r\n' + else: + newline = '' + for session in self.session_list: - session.push('%s %s' % (prefix, message,)) + session.push('%s %s%s' % (prefix, message,newline,)) def get_configvalue(self, configname): """ @@ -153,5 +158,5 @@ if __name__ == '__main__': scheduler.heartbeat() except KeyboardInterrupt: - server.announce_all('The server has been shutdown. Please check back soon.\n\r') + server.announce_all('The server has been shutdown. Please check back soon.') print '--> Server killed by keystroke.'