Move the docstring for addressed

This commit is contained in:
James Vega 2004-12-29 19:22:37 +00:00
parent 4261ec4f76
commit 4cd15d053a

View File

@ -67,9 +67,6 @@ import supybot.registry as registry
def _addressed(nick, msg, prefixChars=None, nicks=None, def _addressed(nick, msg, prefixChars=None, nicks=None,
prefixStrings=None, whenAddressedByNick=None, prefixStrings=None, whenAddressedByNick=None,
whenAddressedByNickAtEnd=None): whenAddressedByNickAtEnd=None):
"""If msg is addressed to 'name', returns the portion after the address.
Otherwise returns the empty string.
"""
def get(group): def get(group):
if ircutils.isChannel(target): if ircutils.isChannel(target):
group = group.get(target) group = group.get(target)
@ -145,6 +142,9 @@ def _addressed(nick, msg, prefixChars=None, nicks=None,
return '' return ''
def addressed(nick, msg, **kwargs): def addressed(nick, msg, **kwargs):
"""If msg is addressed to 'name', returns the portion after the address.
Otherwise returns the empty string.
"""
payload = msg.addressed payload = msg.addressed
if payload is not None: if payload is not None:
return payload return payload