Ew, why was this added?
This commit is contained in:
parent
27b31f8cbe
commit
534f008e08
2 changed files with 8 additions and 7 deletions
|
|
@ -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)]
|
|
||||||
|
|
@ -118,7 +118,7 @@ class Server(dispatcher):
|
||||||
"""
|
"""
|
||||||
self.object_list[object.id] = object
|
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.
|
Announces something to all connected players.
|
||||||
"""
|
"""
|
||||||
|
|
@ -127,8 +127,13 @@ class Server(dispatcher):
|
||||||
else:
|
else:
|
||||||
prefix = ''
|
prefix = ''
|
||||||
|
|
||||||
|
if with_nl:
|
||||||
|
newline = '\r\n'
|
||||||
|
else:
|
||||||
|
newline = ''
|
||||||
|
|
||||||
for session in self.session_list:
|
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):
|
def get_configvalue(self, configname):
|
||||||
"""
|
"""
|
||||||
|
|
@ -153,5 +158,5 @@ if __name__ == '__main__':
|
||||||
scheduler.heartbeat()
|
scheduler.heartbeat()
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
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.'
|
print '--> Server killed by keystroke.'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue