Ew, why was this added?

This commit is contained in:
Greg Taylor 2006-12-05 21:28:17 +00:00
parent 27b31f8cbe
commit 534f008e08
2 changed files with 8 additions and 7 deletions

View file

@ -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)]

View file

@ -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.'