mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Added ability to send empty topic messages to get the current topic.
This commit is contained in:
parent
b3253df28e
commit
c45e38b537
@ -485,10 +485,13 @@ def quit(msg='', prefix=''):
|
||||
else:
|
||||
return IrcMsg(prefix=prefix, command='QUIT')
|
||||
|
||||
def topic(channel, topic, prefix=''):
|
||||
def topic(channel, topic=None, prefix=''):
|
||||
"""Returns a TOPIC for channel with the topic topic."""
|
||||
assert isChannel(channel), channel
|
||||
return IrcMsg(prefix=prefix, command='TOPIC', args=(channel, topic))
|
||||
if topic is None:
|
||||
return IrcMsg(prefix=prefix, command='TOPIC', args=(channel,))
|
||||
else:
|
||||
return IrcMsg(prefix=prefix, command='TOPIC', args=(channel, topic))
|
||||
|
||||
def nick(nick, prefix=''):
|
||||
"""Returns a NICK with nick nick."""
|
||||
|
Loading…
Reference in New Issue
Block a user