3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

corecommands: use irc.get_hostmask instead of formatting the caller's hostname manually

This commit is contained in:
James Lu 2017-07-12 22:12:32 -07:00
parent 0e3d733a72
commit 61db5d616d

View File

@ -59,14 +59,8 @@ def shutdown(irc, source, args):
"""takes no arguments. """takes no arguments.
Exits PyLink by disconnecting all networks.""" Exits PyLink by disconnecting all networks."""
permissions.checkPermissions(irc, source, ['core.shutdown']) permissions.checkPermissions(irc, source, ['core.shutdown'])
log.info('(%s) SHUTDOWN requested by %s, exiting...', irc.name, irc.get_hostmask(source))
u = irc.users[source]
log.info('(%s) SHUTDOWN requested by "%s!%s@%s", exiting...', irc.name, u.nick,
u.ident, u.host)
control.shutdown(irc=irc) control.shutdown(irc=irc)
@utils.add_cmd @utils.add_cmd