@@ -0,0 +1,1598 @@
+import logging%0A%0Afrom kitnirc.modular import Module%0A%0A%0A_log = logging.getLogger(__name__)%0A%0A%0Aclass FreenodeModule(Module):%0A    %22%22%22A KitnIRC module which provides Freenode-specific functionality.%0A%0A    Freenode is irc.freenode.net and runs ircd-seven, a Freenode-specific%0A    branch of the charybdis ircd. Functionality provided by this module:%0A%0A        1. If the configuration has a 'password' field in the %5Bnickserv%5D%0A           section, it will send that password automatically to the server.%0A%0A        2. Sets usermode 'Q' (no forwarding), to prevent the bot from being%0A           forwarded to a different channel than the one it was told to join.%0A           Bots almost never want to be in a channel they didn't specify.%0A    %22%22%22%0A%0A    @Module.handle(%22WELCOME%22)%0A    def set_no_forwarding(self, client, *args):%0A        client.send(%22MODE%22, client.user.nick, %22+Q%22)%0A%0A    @Module.handle(%22PASSWORD%22)%0A    def nickserv_password(self, client, *args):%0A        # Freenode will pass through the server password to NickServ,%0A        # skipping the need to send a password via PRIVMSG. If the bot%0A        # has an account under a different name than its nick, you can%0A        # use accountnick:password as the value of the password field.%0A        if self.controller.config.has_option(%22nickserv%22, %22password%22):%0A            # Sending directly via the socket, to avoid logging%0A            password = self.controller.config.get(%22nickserv%22, %22password%22)%0A            _log.info(%22Sending NickServ password...%22)%0A            client.socket.send(%22PASS %25s%5Cr%5Cn%22 %25 password)%0A%0A%0Amodule = FreenodeModule%0A%0A# vim: set ts=4 sts=4 sw=4 et:%0A

Add the Freenode module to contrib.