RouxRC / gazouilleur

IRC bot for collaborative use and monitoring of Twitter
GNU Affero General Public License v3.0
19 stars 13 forks source link

Configurize setpad to setanything #35

Closed RouxRC closed 7 years ago

RouxRC commented 7 years ago

cf setquadrapero https://github.com/RouxRC/gazouilleur/blob/master/gazouilleur/bot.py#L1526-L1543

okhin commented 7 years ago

I have an issue when running the !setquadrapero command from LQDN chan:

2017-04-19 15:24:22 [MongoProtocol,client] Unhandled Error
        Traceback (most recent call last):
          File "/home/ungarage/.virtualenvs/gazouilleur/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 383, in callback
            self._startRunCallbacks(result)
          File "/home/ungarage/.virtualenvs/gazouilleur/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 491, in _startRunCallbacks
            self._runCallbacks()
          File "/home/ungarage/.virtualenvs/gazouilleur/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 578, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/home/ungarage/.virtualenvs/gazouilleur/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1163, in gotResult
            _inlineCallbacks(r, g, deferred)
        --- <exception caught here> ---
          File "/home/ungarage/.virtualenvs/gazouilleur/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1107, in _inlineCallbacks
            result = g.send(result)
          File "/srv/ungarage/gazouilleur/gazouilleur/bot.py", line 359, in privmsg
            if self._can_user_do(nick, channel, func):
          File "/srv/ungarage/gazouilleur/gazouilleur/bot.py", line 319, in _can_user_do
            return has_user_rights_in_doc(nick, channel, self._get_command_name(command), self._get_command_doc(command))
          File "/srv/ungarage/gazouilleur/gazouilleur/lib/utils.py", line 399, in has_user_rights_in_doc
            if re.match(re.compile(r"^%s$" % regexp, re.I), command):
          File "/home/ungarage/.virtualenvs/gazouilleur/lib/python2.7/re.py", line 141, in match
            return _compile(pattern, flags).match(string)
        exceptions.TypeError: expected string or buffer
boogheta commented 7 years ago

should be fixed with https://github.com/RouxRC/gazouilleur/commit/ec74170f92061405038728a5e24ec683cccee0b3