Closes: Sf#2991515
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 57e894de58)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
two commits ago, in commit 51cabeea33
it is necessary for the operation of the plugin
(specifically, in the _checkManageCapabilities function)
the tests didn't catch that because it apparently imports re separately.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 18ef6dadfc)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
Topics now persist between restarts.
Rationale: Useful when reloading/restarting; previously the topics would
be just forgotten. Don't use database, as that would be an unnecessary
overkill and in any case not needed.
(Also, remove the unused `re' module import.)
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 6520d1f282)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 41fd218b8d)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This should prevent the accumulation of old unclaimed notes in the database,
which is possible due to notes left to misspelled nicks, to temporary nicks
used by regulars, or to one-time visitor nicks.
This allows inclusion of the usual standardSubstitute vars within factoids.
There is no config to disable this, since it is possible to escape the substitutions
by simply doubling the dollar signs, as per the python documentation:
http://docs.python.org/library/string.html#template-strings
Thus, if you want a factoid to output a literal "$channel", for example, all
you'd need to do is use "$$channel" in your factoid text, which will come out
as "$channel" when said by the bot.
Also added tests for this new behavior.
First: if an rss feed is called without the number of headlines argument,
we now have a default number of items it will output.
before, it tried to stuff the whole rss feed into the channel, which is quite
floody, if more than one 'mores' is set, or if oneToOne is false.
Second: when adding a new feed to announce, it again, tried to stuff the
whole rss feed into the channel, which ran into the same floody conditions
as above. now we have a default number of feeds to output when there's no
cached history.
This involved also updating src/conf.py to look for sqlite3 and add it to supybot.conf.databases list,
since karma uses the plugins.DB() constructor for its database, which checks the available databases list.
default required capabilities for topic changes (if topic is +t and user is not an op or halfop), are chan,op and chan,halfop
thanks jemfinch for the suggestions.