|
@@ -97,7 +97,7 @@ class LocationBot(ircbot.SingleServerIRCBot):
|
|
|
return _or(lambda channel: channel.has_user(nick), channels)
|
|
|
|
|
|
def __help(self, connection, nick, admin, login, arguments):
|
|
|
- command = arguments.split(None, 1)[0].lstrip('!') if arguments else None
|
|
|
+ command = irclib.irc_lower(arguments.split(None, 1)[0].lstrip('!')) if arguments else None
|
|
|
commands = {
|
|
|
'help': ('[command]', 'show this help message'),
|
|
|
'login': ('[nick] [secret]', 'log in as nick with secret or using masks'),
|
|
@@ -292,7 +292,7 @@ class LocationBot(ircbot.SingleServerIRCBot):
|
|
|
|
|
|
def __unset(self, connection, nick, login, arguments):
|
|
|
try:
|
|
|
- variable = arguments.split(None, 1)[0]
|
|
|
+ variable = irclib.irc_lower(arguments.split(None, 1)[0])
|
|
|
except IndexError:
|
|
|
return self.__help(connection, nick, False, login, 'unset')
|
|
|
|
|
@@ -372,8 +372,7 @@ class LocationBot(ircbot.SingleServerIRCBot):
|
|
|
command = event.arguments()[0].strip()
|
|
|
arguments = ''
|
|
|
|
|
|
- if command.startswith('!'):
|
|
|
- command = command[1:]
|
|
|
+ command = irclib.irc_lower(command.lstrip('!'))
|
|
|
|
|
|
if command == 'help':
|
|
|
self.__help(connection, nick, admin, login, arguments)
|