Markup update, docstring and whitespace fixes
This commit is contained in:
parent
7f06bb4b73
commit
f857a43f4b
1 changed files with 6 additions and 8 deletions
|
|
@ -95,7 +95,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
listening = [ob for ob in subs if ob.is_connected and ob not in self.mutelist]
|
listening = [ob for ob in subs if ob.is_connected and ob not in self.mutelist]
|
||||||
if subs:
|
if subs:
|
||||||
# display listening subscribers in bold
|
# display listening subscribers in bold
|
||||||
string = ", ".join([player.key if player not in listening else "{w%s{n" % player.key for player in subs])
|
string = ", ".join([player.key if player not in listening else "|w%s|n" % player.key for player in subs])
|
||||||
else:
|
else:
|
||||||
string = "<None>"
|
string = "<None>"
|
||||||
return string
|
return string
|
||||||
|
|
@ -126,7 +126,6 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def connect(self, subscriber):
|
def connect(self, subscriber):
|
||||||
"""
|
"""
|
||||||
Connect the user to this channel. This checks access.
|
Connect the user to this channel. This checks access.
|
||||||
|
|
@ -254,7 +253,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
try:
|
try:
|
||||||
# note our addition of the from_channel keyword here. This could be checked
|
# note our addition of the from_channel keyword here. This could be checked
|
||||||
# by a custom player.msg() to treat channel-receives differently.
|
# by a custom player.msg() to treat channel-receives differently.
|
||||||
entity.msg(msgobj.message, from_obj=msgobj.senders, options={"from_channel":self.id})
|
entity.msg(msgobj.message, from_obj=msgobj.senders, options={"from_channel": self.id})
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
logger.log_trace("%s\nCannot send msg to '%s'." % (e, entity))
|
logger.log_trace("%s\nCannot send msg to '%s'." % (e, entity))
|
||||||
|
|
||||||
|
|
@ -331,7 +330,6 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
"""
|
"""
|
||||||
self.msg(message, senders=senders, header=header, keep_log=False)
|
self.msg(message, senders=senders, header=header, keep_log=False)
|
||||||
|
|
||||||
|
|
||||||
# hooks
|
# hooks
|
||||||
|
|
||||||
def channel_prefix(self, msg=None, emit=False):
|
def channel_prefix(self, msg=None, emit=False):
|
||||||
|
|
@ -376,7 +374,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
message accordingly.
|
message accordingly.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msgob (Msg or TempMsg): The message to analyze for a pose.
|
msgobj (Msg or TempMsg): The message to analyze for a pose.
|
||||||
sender_string (str): The name of the sender/poser.
|
sender_string (str): The name of the sender/poser.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
@ -426,7 +424,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
Hook method. Formats a message body for display.
|
Hook method. Formats a message body for display.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msgob (Msg or TempMsg): The message object to send.
|
msgobj (Msg or TempMsg): The message object to send.
|
||||||
emit (bool, optional): The message is agnostic of senders.
|
emit (bool, optional): The message is agnostic of senders.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
@ -475,7 +473,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
value, leaving the channel will be aborted.
|
value, leaving the channel will be aborted.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
joiner (object): The joining object.
|
leaver (object): The leaving object.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
should_leave (bool): If `False`, channel parting is aborted.
|
should_leave (bool): If `False`, channel parting is aborted.
|
||||||
|
|
@ -488,7 +486,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
||||||
Hook method. Runs right after an object or player leaves a channel.
|
Hook method. Runs right after an object or player leaves a channel.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
joiner (object): The joining object.
|
leaver (object): The leaving object.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue