From 589172a5f0a347dbd3d63b59cb14dd75cce7ac15 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 23 Oct 2003 09:07:18 +0000 Subject: [PATCH] Removed the never-should-have-been-committed connect/disconnect commands. --- src/Owner.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index 1ee131cff..641efd4d8 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -368,51 +368,6 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): ircdb.channels.reload() irc.reply(msg, conf.replySuccess) - def connect(self, irc, msg, args): - """ [] - - Connects a new Irc instance to : ( defaults to 6667 - if not given). The bot will automatically join the channels he - normally joins. - """ - (server, port) = privmsgs.getArgs(args, optional=1) - if not port: - port = 6667 - else: - try: - port = int(port) - if not (0 < port < 65536): - raise ValueError - except ValueError: - irc.error(msg, ' must be an integer greater than 0 ' - 'and less than 65536.') - return - cbs = map(irc.getCallback, ['Owner', 'ConfigAfter376']) - newIrc = irclib.Irc(irc.nick, irc.user, irc.ident, - irc.password, callbacks=cbs) - driver = drivers.newDriver((server, port), newIrc) - newIrc.driver = driver - irc.reply(msg, conf.replySuccess) - - def disconnect(self, irc, msg, args): - """[] - - Disconnects from the server, if given; otherwise disconnects from the - server on which it received the command. - """ - server = privmsgs.getArgs(args, needed=0, optional=1) - if not server: - server = irc.server[0] - me = False - for otherIrc in world.ircs[:]: # Copy because they remove themselves. - if otherIrc.driver.server[0] == server: - if otherIrc == irc: - me = True - otherIrc.die() - if not me: - irc.reply(msg, conf.replySuccess) - - Class = Owner