| @@ -42,7 +42,7 @@ class Registration(Command): | |||||
| try: | try: | ||||
| reg = user.registration | reg = user.registration | ||||
| except exceptions.UserNotFoundError: | except exceptions.UserNotFoundError: | ||||
| msg = "the user \x0302{0}\x0F does not exist." | |||||
| msg = "The user \x0302{0}\x0F does not exist." | |||||
| self.reply(data, msg.format(name)) | self.reply(data, msg.format(name)) | ||||
| return | return | ||||
| @@ -32,19 +32,19 @@ class Remind(Command): | |||||
| def process(self, data): | def process(self, data): | ||||
| if not data.args: | if not data.args: | ||||
| msg = "please specify a time (in seconds) and a message in the following format: !remind <time> <msg>." | |||||
| msg = "Please specify a time (in seconds) and a message in the following format: !remind <time> <msg>." | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| return | return | ||||
| try: | try: | ||||
| wait = int(data.args[0]) | wait = int(data.args[0]) | ||||
| except ValueError: | except ValueError: | ||||
| msg = "the time must be given as an integer, in seconds." | |||||
| msg = "The time must be given as an integer, in seconds." | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| return | return | ||||
| message = ' '.join(data.args[1:]) | message = ' '.join(data.args[1:]) | ||||
| if not message: | if not message: | ||||
| msg = "what message do you want me to give you when time is up?" | |||||
| msg = "What message do you want me to give you when time is up?" | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| return | return | ||||
| @@ -40,7 +40,7 @@ class Rights(Command): | |||||
| try: | try: | ||||
| rights = user.groups | rights = user.groups | ||||
| except exceptions.UserNotFoundError: | except exceptions.UserNotFoundError: | ||||
| msg = "the user \x0302{0}\x0F does not exist." | |||||
| msg = "The user \x0302{0}\x0F does not exist." | |||||
| self.reply(data, msg.format(name)) | self.reply(data, msg.format(name)) | ||||
| return | return | ||||
| @@ -48,5 +48,5 @@ class Rights(Command): | |||||
| rights.remove("*") # Remove the '*' group given to everyone | rights.remove("*") # Remove the '*' group given to everyone | ||||
| except ValueError: | except ValueError: | ||||
| pass | pass | ||||
| msg = "the rights for \x0302{0}\x0F are {1}." | |||||
| msg = "The rights for \x0302{0}\x0F are {1}." | |||||
| self.reply(data, msg.format(name, ', '.join(rights))) | self.reply(data, msg.format(name, ', '.join(rights))) | ||||
| @@ -34,4 +34,4 @@ class Test(Command): | |||||
| if hey: | if hey: | ||||
| self.say(data.chan, "Hey {0}!".format(user)) | self.say(data.chan, "Hey {0}!".format(user)) | ||||
| else: | else: | ||||
| self.say(data.chan, "'sup {0}?".format(user)) | |||||
| self.say(data.chan, "'Sup {0}?".format(user)) | |||||
| @@ -33,7 +33,7 @@ class Threads(Command): | |||||
| def process(self, data): | def process(self, data): | ||||
| self.data = data | self.data = data | ||||
| if data.host not in self.config.irc["permissions"]["owners"]: | if data.host not in self.config.irc["permissions"]["owners"]: | ||||
| msg = "you must be a bot owner to use this command." | |||||
| msg = "You must be a bot owner to use this command." | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| return | return | ||||
| @@ -41,7 +41,7 @@ class Threads(Command): | |||||
| if data.command == "tasklist": | if data.command == "tasklist": | ||||
| self.do_list() | self.do_list() | ||||
| else: | else: | ||||
| msg = "no arguments provided. Maybe you wanted '!{0} list', '!{0} start', or '!{0} listall'?" | |||||
| msg = "No arguments provided. Maybe you wanted '!{0} list', '!{0} start', or '!{0} listall'?" | |||||
| self.reply(data, msg.format(data.command)) | self.reply(data, msg.format(data.command)) | ||||
| return | return | ||||
| @@ -55,7 +55,7 @@ class Threads(Command): | |||||
| self.do_listall() | self.do_listall() | ||||
| else: # They asked us to do something we don't know | else: # They asked us to do something we don't know | ||||
| msg = "unknown argument: \x0303{0}\x0F.".format(data.args[0]) | |||||
| msg = "Unknown argument: \x0303{0}\x0F.".format(data.args[0]) | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| def do_list(self): | def do_list(self): | ||||
| @@ -128,16 +128,16 @@ class Threads(Command): | |||||
| try: | try: | ||||
| task_name = data.args[1] | task_name = data.args[1] | ||||
| except IndexError: # No task name given | except IndexError: # No task name given | ||||
| self.reply(data, "what task do you want me to start?") | |||||
| self.reply(data, "What task do you want me to start?") | |||||
| return | return | ||||
| if task_name not in [task.name for task in self.bot.tasks]: | if task_name not in [task.name for task in self.bot.tasks]: | ||||
| # This task does not exist or hasn't been loaded: | # This task does not exist or hasn't been loaded: | ||||
| msg = "task could not be found; either it doesn't exist, or it wasn't loaded correctly." | |||||
| msg = "Task could not be found; either it doesn't exist, or it wasn't loaded correctly." | |||||
| self.reply(data, msg.format(task_name)) | self.reply(data, msg.format(task_name)) | ||||
| return | return | ||||
| data.kwargs["fromIRC"] = True | data.kwargs["fromIRC"] = True | ||||
| self.bot.tasks.start(task_name, **data.kwargs) | self.bot.tasks.start(task_name, **data.kwargs) | ||||
| msg = "task \x0302{0}\x0F started.".format(task_name) | |||||
| msg = "Task \x0302{0}\x0F started.".format(task_name) | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| @@ -56,13 +56,13 @@ class Time(Command): | |||||
| def do_time(self, data, timezone): | def do_time(self, data, timezone): | ||||
| if not pytz: | if not pytz: | ||||
| msg = "this command requires the 'pytz' module: http://pytz.sourceforge.net/" | |||||
| msg = "This command requires the 'pytz' module: http://pytz.sourceforge.net/" | |||||
| self.reply(data, msg) | self.reply(data, msg) | ||||
| return | return | ||||
| try: | try: | ||||
| tzinfo = pytz.timezone(timezone) | tzinfo = pytz.timezone(timezone) | ||||
| except pytz.exceptions.UnknownTimeZoneError: | except pytz.exceptions.UnknownTimeZoneError: | ||||
| self.reply(data, "unknown timezone: {0}.".format(timezone)) | |||||
| self.reply(data, "Unknown timezone: {0}.".format(timezone)) | |||||
| return | return | ||||
| now = pytz.utc.localize(datetime.utcnow()).astimezone(tzinfo) | now = pytz.utc.localize(datetime.utcnow()).astimezone(tzinfo) | ||||
| self.reply(data, now.strftime("%Y-%m-%d %H:%M:%S %Z")) | self.reply(data, now.strftime("%Y-%m-%d %H:%M:%S %Z")) | ||||