@internationalizeDocstring
    def lock(self, irc, msg, args, channel, regexp):
        if not self._checkManageCapabilities(irc, msg, channel):
            capabilities = self.registryValue('requireManageCapability')
            irc.errorNoCapability(capabilities, Raise=True)
        db = self.getDb(channel)
        cursor = db.cursor()
        cursor.execute("SELECT id FROM triggers WHERE regexp=?", (regexp,))
        results = cursor.fetchall()
        if len(results) == 0:
            irc.error(_('There is no such regexp trigger.'))
            return
        cursor.execute("UPDATE triggers SET locked=1 WHERE regexp=?", (regexp,))
        db.commit()
        irc.replySuccess()
[<channel>|global] <regexp>
dataset/ETHPy150Open ProgVal/Limnoria/plugins/MessageParser/plugin.py/MessageParser.lock