Looking up a server name with ircdb.checkIgnored (when servers set modes, for example) raises an AssertionError, so only do that for senders that are a valid nick.
- 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)
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.
More specifically, test 'set', 'add', 'remove', 'clear', and 'list'. These are some relatively
complex functions that deal with: case-insensitive duplicate checking, requiring at least 2
channels per relay (auto-remove when a relay is below this threshold), adding/removing things
from existing relays, and more... Sometimes manual testing can't catch all of these complex
situations!
This fixes a bug where you could add duplicate channels using the 'add' command if the same
channel was given with differing cases (e.g. 'relaynext add new-relay channel1@net CHANNEl1@Net').
Also, add a notice when trying to remove a channel that doesn't exist in a relay.
New behavior: 'remove' without arguments removes entire relay, 'remove' with
channels specified will remove those channels in question. 'unset' is dropped.
Also update the README accordingly.
These commands will add or subtract relays relative to the currently set relay, creating/deleting it if it is empty.
This requires a reset of all relays (use the set command over the current one should be adequate).