mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +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:
|
else:
|
||||||
return IrcMsg(prefix=prefix, command='QUIT')
|
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."""
|
"""Returns a TOPIC for channel with the topic topic."""
|
||||||
assert isChannel(channel), channel
|
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=''):
|
def nick(nick, prefix=''):
|
||||||
"""Returns a NICK with nick nick."""
|
"""Returns a NICK with nick nick."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user