'Define function'

def func(self):

    if (not self.caller.sessions.get()):
        return
    self.msg('Shutting    down    server    ...')
    announcement = '\nServer    is    being    SHUT    DOWN!\n'
    if self.args:
        announcement += ('%s\n' % self.args)
    logger.log_info(('Server    shutdown    by    %s.' % self.caller.name))
    SESSIONS.announce_all(announcement)
    SESSIONS.server.shutdown(mode='shutdown')
    SESSIONS.portal_shutdown()
