mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Added reconnect command.
This commit is contained in:
parent
39bf2e4848
commit
44e8ff5be2
@ -1,3 +1,7 @@
|
||||
* Added a reconnect command to the Owner plugin. It won't work
|
||||
for people using asyncoreDrivers, but those people should be few
|
||||
and far between these days.
|
||||
|
||||
* Added aol filter in the Filter plugin.
|
||||
|
||||
* Added Nickometer plugin, a translation of Infobot's Nickometer.
|
||||
|
12
src/Owner.py
12
src/Owner.py
@ -540,6 +540,18 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
||||
else:
|
||||
irc.error('There was no callback %s.' % name)
|
||||
|
||||
def reconnect(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
|
||||
Disconnects and then reconnects to the current network.
|
||||
"""
|
||||
try:
|
||||
irc.driver.reconnect()
|
||||
irc.replySuccess()
|
||||
except AttributeError: # There's a cleaner way to do this, but I'm lazy.
|
||||
irc.error('I couldn\'t reconnect. You should restart me instead.')
|
||||
|
||||
|
||||
|
||||
Class = Owner
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user