DBus scripts

From Mumble Wiki
Revision as of 23:38, 2 April 2009 by Snares2 (talk | contribs) (New page: ==Windows== This script registers or changes a user on Win32 operating systems; can also find player id. It does not need to be executed from a command line or in any specific location in ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Windows

This script registers or changes a user on Win32 operating systems; can also find player id. It does not need to be executed from a command line or in any specific location in order to function properly. Copy the text in the box and put it into a file called regmum.bat. You can run this to add a registration to Murmur. Note you must have Murmur running for these commands to work.

@ECHO OFF
COLOR 0F
ECHO Welcome to this registration script. If you are changing a registration and onlywish to change a certain part of a registration only fill out the fields you wish to change and  leave the others blank. You must fill in the player id however.The int 32 value is the same as the player id.
ECHO -----------------
:COLLECTINFO 
SET /P A=Username: 
SET /P B=Email (leave blank if trying to find player id): 
SET /P C=Password (leave blank if trying to find player id): 
SET /P D=Server id (1 if you are only running one Murmur server): 
SET /P E=Player id (leave blank unless changing a registration): 
SET /P F=1 to add a user, 2 to change, 3 to find player id for Username: 
IF %F%==1 GOTO REGISTER
IF %F%==2 GOTO CHANGEREGISTER
IF %F%==3 GOTO FINDREGISTER
:FINDREGISTER
"%ProgramFiles%\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /%D% net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"%A%"
SET /P G=Do you want to change this registration (y/n)?: 
IF %G%==y GOTO COLLECTINFO
IF %G%==n GOTO REGFOUND
:CHANGEREGISTER
"%ProgramFiles%\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /%D% net.sourceforge.mumble.Murmur.setRegistration int32:%E% string:"%A%" string:"%B%" string:"%C%"
:SHOWREGISTER
"%ProgramFiles%\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /%D% net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"%A%"
GOTO REGCHANGED 
:REGISTER
"%ProgramFiles%\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /%D% net.sourceforge.mumble.Murmur.registerPlayer string:"%A%"
SET /P H=Type the number to the right of int32 and press enter: 
:SETREGISTER
"%ProgramFiles%\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /%D% net.sourceforge.mumble.Murmur.setRegistration int32:%H% string:"%A%" string:"%B%" string:"%C%"
:SHOWREGISTER
"%ProgramFiles%\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /%D% net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"%A%"
:COMPLETE
:REGCOMPLETE
IF %F%==1 ECHO --------------------------------------------------------------------------------  Registration Complete 
:REGCHANGED
IF %F%==2 ECHO --------------------------------------------------------------------------------  Registration Changed
:REGFOUND
IF %F%==3 ECHO --------------------------------------------------------------------------------  Registration Found
PAUSE