3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-28 05:29:25 +01:00

corecommands: replace irc.msg() with irc.reply()

Thanks to @Techman- for pointing this out.
This commit is contained in:
James Lu 2016-07-13 19:20:11 -07:00
parent cf040f5df3
commit 9256500a23

View File

@ -28,17 +28,17 @@ def identify(irc, source, args):
try: try:
username, password = args[0], args[1] username, password = args[0], args[1]
except IndexError: except IndexError:
irc.msg(source, 'Error: Not enough arguments.') irc.reply('Error: Not enough arguments.')
return return
# Usernames are case-insensitive, passwords are NOT. # Usernames are case-insensitive, passwords are NOT.
if username.lower() == irc.conf['login']['user'].lower() and password == irc.conf['login']['password']: if username.lower() == irc.conf['login']['user'].lower() and password == irc.conf['login']['password']:
realuser = irc.conf['login']['user'] realuser = irc.conf['login']['user']
irc.users[source].identified = realuser irc.users[source].identified = realuser
irc.msg(source, 'Successfully logged in as %s.' % realuser) irc.reply('Successfully logged in as %s.' % realuser)
log.info("(%s) Successful login to %r by %s", log.info("(%s) Successful login to %r by %s",
irc.name, username, irc.getHostmask(source)) irc.name, username, irc.getHostmask(source))
else: else:
irc.msg(source, 'Error: Incorrect credentials.') irc.reply('Error: Incorrect credentials.')
u = irc.users[source] u = irc.users[source]
log.warning("(%s) Failed login to %r from %s", log.warning("(%s) Failed login to %r from %s",
irc.name, username, irc.getHostmask(source)) irc.name, username, irc.getHostmask(source))