From 72c779816532ff919b9c4002baf6bd0b52d3b769 Mon Sep 17 00:00:00 2001 From: nop surfer Date: Sun, 12 Jun 2022 23:46:18 +0200 Subject: [PATCH] Made show_version function --- xmppmirror | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xmppmirror b/xmppmirror index 7b9bff8..6794b1b 100755 --- a/xmppmirror +++ b/xmppmirror @@ -11,6 +11,13 @@ ROOM2 = 'room2_jid@example2.org' VERSION='0.1.0' +def show_version(): + print("XMPPmirror " + VERSION) + print("License GPLv3+: GNU GPL version 3 or later ") + print("This is free software: you are free to change and redistribute it.") + print("There is NO WARRANTY, to the extent permitted by law.") + + class MUCBot(slixmpp.ClientXMPP): def __init__(self, jid, password, nick, room1, room2): @@ -45,10 +52,7 @@ if __name__ == '__main__': ## Version argument if args.version: - print("XMPPmirror " + VERSION) - print("License GPLv3+: GNU GPL version 3 or later ") - print("This is free software: you are free to change and redistribute it.") - print("There is NO WARRANTY, to the extent permitted by law.") + show_version() exit()