- Drop _getAllRelaysForNetwork() and custom state keeping code, as they aren't needed anymore
- Hopefully closes#41? (we may never know)
- Also, don't lowercase command names in flood prevention announcements: "PRIVMSGs" looks more correct than "privmsgs" IMO
Internally, the relay database doesn't care about case mappings - channel names are stored lowercase, word for word.
Using ircutils.toLower for channel names in the relay core breaks if the channel name has characters that when lowercased using RFC1459 case mapping, give a different literal result (e.g. #\\\ becomes #|||, which isn't in a relay)
Previously, this would error whenever a message without a first argument was present in irc.state.history.
ERROR 2015-12-17T21:12:51 Uncaught exception in _callRegexp:
Traceback (most recent call last):
File "/home/gl/.local/lib/python3.4/site-packages/supybot/callbacks.py", line 1457, in _callRegexp
method(irc, msg, m)
File "/home/gl/SupyPlugins/Replacer/plugin.py", line 116, in replacer
if m.args[0] == msg.args[0] and \
IndexError: tuple index out of range
ERROR 2015-12-17T21:12:51 Exception id: 0x2b96f
This pretends a slew of "cannot send to channel" errors and possible excess floods whenever the bot is starting, as different networks connect at their own pace.
Essentially, my reimplementation of krf/supybot-lastfm#8. Instead of using YouTube's API (which requires API keys and all that), this performs web search on site:youtube.com using the DDG (DuckDuckGo) plugin in this repository. The advantage to this is that it's simpler to set up, but results may not always be the most accurate / relevant.
This behavior can be turned on by setting supybot.plugins.LastFM.fetchYouTubeLinks to True - it defaults to off since this is experimental anyways. The DDG plugin needs to be loaded too for this to work.
Also, only bold the album/artist/track data during output formatting, NOT before (this screws up searches with all the \x02's).