@@ -0,0 +1,1333 @@
+import re%0A%0Afrom zope.interface import implements%0Afrom bravo import plugin%0A%0Afrom hamper.interfaces import Command, Plugin%0A%0A%0Aclass ChannelUtils(Plugin):%0A%0A    name = 'channelutils'%0A    priority = 0%0A%0A    class JoinCommand(Command):%0A        regex = r'%5Ejoin (.*)$'%0A%0A        def command(self, bot, comm, groups):%0A            %22%22%22Join a channel, and say you did.%22%22%22%0A            chan = groups%5B0%5D%0A            if not chan.startswith('#'):%0A                chan = '#' + chan%0A            bot.join(chan)%0A            bot.reply(comm, 'OK, %7B0%7D.'.format(comm%5B'user'%5D))%0A%0A        def process(self, bot, comm):%0A            if self.onlyDirected and not comm%5B'directed'%5D:%0A                return%0A            match = self.regex.match(comm%5B'message'%5D)%0A            print %22JoinCommand match=%7B0%7D%22.format(match)%0A            if match:%0A                self.command(bot, comm, match.groups())%0A                return True%0A%0A    class LeaveCommand(Command):%0A        regex = r'%5Eleave (#?%5B-_a-zA-Z0-9%5D)?$'%0A%0A        def command(self, bot, comm, groups):%0A            %22%22%22Join a channel, and say you did.%22%22%22%0A            chan = groups%5B0%5D%0A            if chan is None:%0A                chan = comm%5B'channel'%5D%0A            if not chan.startswith('#'):%0A                chan = '#' + chan%0A            bot.reply(comm, 'Bye!')%0A            bot.leave(chan)%0A%0A%0Achannel_utils = ChannelUtils()%0A

Add channel utils plugin.