3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +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.
Exits PyLink by disconnecting all networks."""
permissions.checkPermissions(irc, source, ['core.shutdown'])
u = irc.users[source]
log.info('(%s) SHUTDOWN requested by "%s!%s@%s", exiting...', irc.name, u.nick,
u.ident, u.host)
log.info('(%s) SHUTDOWN requested by %s, exiting...', irc.name, irc.get_hostmask(source))
control.shutdown(irc=irc)
@utils.add_cmd