|
|
@ -25,7 +25,9 @@ from mumble.mctl import MumbleCtlBase |
|
|
|
|
|
|
|
DEFAULT_CONNSTRING = 'Meta:tcp -h 127.0.0.1 -p 6502' |
|
|
|
DEFAULT_SLICEFILE = '/usr/share/slice/Murmur.ice' |
|
|
|
DEFAULT_ICESECRET = None |
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
parser = OptionParser("""Usage: %prog [options] |
|
|
|
|
|
|
|
This is a minimalistic implementation of a Channel Viewer Protocol provider |
|
|
@ -39,7 +41,7 @@ parser.add_option( "-c", "--connstring", |
|
|
|
|
|
|
|
parser.add_option( "-i", "--icesecret", |
|
|
|
help="Ice secret to use in the connection. Also see --asksecret.", |
|
|
|
default=None |
|
|
|
default=DEFAULT_ICESECRET |
|
|
|
) |
|
|
|
|
|
|
|
parser.add_option( "-a", "--asksecret", |
|
|
@ -74,9 +76,14 @@ if options.connstring is None: |
|
|
|
if options.slice is None: |
|
|
|
options.slice = DEFAULT_SLICEFILE |
|
|
|
|
|
|
|
if options.asksecret or options.icesecret == '': |
|
|
|
if options.asksecret: |
|
|
|
options.icesecret = getpass.getpass( "Ice secret: " ) |
|
|
|
|
|
|
|
else: |
|
|
|
class options: |
|
|
|
connstring = DEFAULT_CONNSTRING |
|
|
|
slice = DEFAULT_SLICEFILE |
|
|
|
icesecret = DEFAULT_ICESECRET |
|
|
|
|
|
|
|
ctl = MumbleCtlBase.newInstance( options.connstring, options.slice, options.icesecret ) |
|
|
|
|
|
|
|