From d4c7db7a9364fd13414f317afc44af27bd56b264 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 30 Mar 2004 21:14:34 +0000 Subject: [PATCH] Began Relay.reconnect and changed names to nicks. --- ChangeLog | 4 ++++ plugins/Relay.py | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 43d3432f9..3311b2fc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ + * Changed Relay.names to Relay.nicks, to be consistent with + Channel.nicks. + * Added supybot.brackets, a configuration variable for specifying which set of matching brackets to use for nested commands. Valid values are [] (the default), {}, <>, and (). + * Added a configuration variable to ChannelLogger, timestamp, which determines whether the bot will timestamp its logfiles. This is a channel-specific variable, of course. diff --git a/plugins/Relay.py b/plugins/Relay.py index c3bb8dcc1..4f21bf6a6 100644 --- a/plugins/Relay.py +++ b/plugins/Relay.py @@ -177,6 +177,21 @@ class Relay(callbacks.Privmsg): irc.replySuccess() connect = privmsgs.checkCapability(connect, 'owner') + def reconnect(self, irc, msg, args): + """ + + Reconnects the bot to when it has become disconnected. + """ + network = privmsgs.getArgs(args) + try: + toReconnect = self.ircs[network] + except KeyError: + irc.error('I\'m not connected to %s.' % network) + return + toReeconnect.driver.reconnect() + irc.replySuccess() + reconnect = privmsgs.checkCapability(reconnect, 'owner') + def disconnect(self, irc, msg, args): """ @@ -283,7 +298,7 @@ class Relay(callbacks.Privmsg): self.ircs[network].queueMsg(ircmsgs.privmsg(channel, text)) say = privmsgs.checkCapability(say, 'admin') - def names(self, irc, msg, args): + def nicks(self, irc, msg, args): """[] (only if not sent in the channel itself.) The argument is only necessary if the message isn't sent on