@@ -0,0 +1,1387 @@
+from twisted.plugin import IPlugin%0Afrom twisted.words.protocols import irc%0Afrom txircd.module_interface import Command, ICommand, IModuleData, ModuleData%0Afrom zope.interface import implements%0A%0Aclass ConnectCommand(ModuleData, Command):%0A    implements(IPlugin, IModuleData, ICommand)%0A    %0A    name = %22ConnectCommand%22%0A    core = True%0A    %0A    def hookIRCd(self, ircd):%0A        self.ircd = ircd%0A    %0A    def actions(self):%0A        return %5B (%22commandpermission-CONNECT%22, 1, self.canConnect) %5D%0A    %0A    def userCommands(self):%0A        return %5B (%22CONNECT%22, 1, self) %5D%0A    %0A    def canConnect(self, user, command, data):%0A        if not self.ircd.runActionUntilValue(%22userhasoperpermission%22, %22command-connect%22):%0A            return False%0A        return None%0A    %0A    def parseParams(self, user, params, prefix, tags):%0A        if not params:%0A            user.sendSingleError(%22ConnectParams%22, irc.ERR_NEEDMOREPARAMS, %22CONNECT%22, %22:Not enough parameters%22)%0A            return None%0A        return %7B%0A            %22server%22: params%5B0%5D%0A        %7D%0A    %0A    def execute(self, user, data):%0A        serverName = data%5B%22server%22%5D%0A        if self.ircd.connectServer(serverName):%0A            user.sendMessage(%22NOTICE%22, %22:*** Connecting to %7B%7D%22.format(serverName))%0A        else:%0A            user.sendMessage(%22NOTICE%22, %22:*** Failed to connect to %7B%7D%22.format(serverName))%0A        return True%0A%0AconnectCmd = ConnectCommand()

Implement the CONNECT command