Schlagwort-Archiv: Murmur

Forwarder Module for Mumble Moderator forwards user messages to all linked channels…

A great feature of Mumble is the ability to link channels together so that users can hear each other while sitting in different channels.

This can be used for some cool setups, for example for Low Bandwidth channels, see here.

The main problem with linked channels is that when you want to send text messages, they are not forwarded by the server. So you need to send the same message to evey linked channel.

One solution is to send a so called “tree message” where a message is sent to all subchannels as well. But that doesn’t work if the channels are within different parent channels.

A few years ago I already tried to create a simple “Message Forwarder” module for Mumble Moderator but it didn’t work well when more than two channels were linked.

Today I updated this module called “forwarder for mumo” and it works regardless of how many channels are linked together.

Privacy

For privacy reasons the module does not forward a message if the sender is not residing inside one of the linked channels. This is because from the outside you cannot see which channels are linked together and so do now know who would get the message.

You can disable this behaviour by setting the following in the .ini:

forwardiforiginuserisoutsideoriginchannel=True

Try it…

You can get the module from GitHub, see here.

Or visit my Mumble server

mumo-forwarder

Tooltip: Module for Mumble Moderator sends information about posted Youtube URL

Whenever a user sends a Video URL to Youtube this modules sends the information in the format “channelname :: videoname”.

It distinguishes between channel messages and private messages and sends its message accordingly to the channel or the private receiver only.

The module was created by Anthony Alves and you can find it on GitHub, see github.com/while-loop/mumo-videoinfo.

mumble_moderator_videoinfo_module_demo

Ignore unregistered users…

I created a fork to implement a feature that I need on my server so that unregistered users are ignored by the module. A pull request was created – if the author does not accept it you can find this feature in my fork, see github.com/Natenom/mumo-videoinfo.

 

Munin plugin for Mumble server (Murmur) updated

I used some code from Mice so that the plugin doesn’t need a Murmur.ice somewhere on the filesystem anymore. Instead if fetches the file dynamically from Murmur itself. Only if this fails it falls back to the Murmur.ice file.

If you have problems with the encoding version of Ice please change “prxstr” in line 79 and 86 accordingly.

The documentation of the plugin can be found in my wiki, see here.

Here are some screenshots of the charts that result from the plugin:
murmur_64738-day murmur_64738-week murmur_64738-month murmur_64738-year

An introduction on how to manage your Mumble server (Murmur) through Ice with mice

In the last years I have been using Mumble-Django (MD) to configure my Mumble servers and in my opinion it is one of the best admin interfaces available.

But on a box with very little RAM I wanted something very simple so I started using “mice” on my new server.

Mice is a wrapper for the Ice connection to your Mumble server (also known as Murmur). Documentation about Ice and Mumble can be found here.

I use mice with ipython which gives you for example the ability for tab completion.

BTW: I am a noob when it comes to Python so please leave a comment if the code I used in this blog post can be simplified 🙂

What you need to know when using mice (and Ice in general)

Read the documentation 🙂

You can either use the tab completion of ipython to get a list of methods (see below) or read the documentation from Murmur, see Murmur.ice itself or its generated documentation.

Instant changes

It is very nice that all you change through Ice is instantly applied to your server. There is no need for a restart unlike editing the .ini file of your server (mostly murmur.ini or mumble-server.ini).

“Global settings” vs “local settings”

But you can only change so called “local settings”, not “global settings”. The latter can be changed only in the .ini file and you need to reboot your server. Keep that in mind when you work with mice.

A (German) list of global and local settings can be found here (global) and here (local).

The list of all variables in the official Mumble wiki does not yet distinguish between local and global variables, see here.

A global setting is for example which backend for SQL Murmur should use, you can choose between MySQL and Sqlite (default).

A local setting is for example the name of your Mumble server (it is called “registername”).

Always lowercase

If you change settings via “setConf” you must always use the lowercase name of what you change.

For example use

setConf("registername", "Name of your Mumble-Server")

instead of

setConf("registerName", "Name of your Mumble-Server")

Murmur won’t recognize mixed case written settings set through Ice.

Note: The case isn’t important in your murmur.ini file.

Always use strings for setConf

The method setConf requires alway strings as values, see here.

For example the next will not work:

s1.setConf("users", 127)

But this works:

s1.setConf("users", "127")

Before you start

Download mice.py onto your server and edit it.

Change the default settings like host, port and most important the “secret” which is the equivalent of “icesecret” or “icesecretwrite” in your “murmur.ini” or “mumble-server.ini”.

Encoding version

If you get an error like

UnknownLocalException: exception ::Ice::UnknownLocalException
{
unknown = ../../include/Ice/BasicStream.h:175: Ice::UnsupportedEncodingException:
protocol error: unsupported encoding version: 1.1
(can only support encodings compatible with version 1.1)

change the prxstr value in line 52 from

prxstr = "Meta:tcp -h %s -p %d -t 1000" % (host, port)

to

prxstr = "Meta -e 1.0:tcp -h %s -p %d -t 1000" % (host, port)

in order to force protocol encoding in version 1.0.

Lets start with mice

Change into the directory where your mice.py script is located. Then start ipython:

mymumbleserver # ls .

mice.py

mymumbleserver # ipython

Python 2.7.9 (default, Mar 1 2015, 18:22:53)
Type “copyright”, “credits” or “license” for more information.

IPython 2.3.0 — An enhanced Interactive Python.
? -> Introduction and overview of IPython’s features.
%quickref -> Quick reference.
help -> Python’s own help system.
object? -> Details about ‘object’, use ‘object??’ for extra details.

In [1]:

Import mice:

import mice

Using default settings.
Import ice… Done
Trying to retrieve slice dynamically from server… Success
Import dynamically compiled murmur class… Done
Establish ice connection… [protected]… Done
Murmur object accessible via ‘mice.murmur’ or ‘mice.m’
3 booted servers in ‘mice.sl’, ‘mice.s’ contains ‘s/1 -t -e 1.0:tcp -h 127.0.0.1 -p 6502’
— Reached interactive mode —

Now you are ready to start…

Some examples for working with mice

Get list of all servers

There are three Mumble servers available, lets get a list of them:

mice.m.getAllServers()

[s/1 -t -e 1.0:tcp -h 127.0.0.1 -p 6502,
s/3 -t -e 1.0:tcp -h 127.0.0.1 -p 6502,
s/5 -t -e 1.0:tcp -h 127.0.0.1 -p 6502]

Create an object for the server you want to work with

I want to work with the first one, so I get it into a new object:

s1 = mice.m.getServer(1)

List all methods for your server

s1.<PRESS TAB>

s1.
Display all 215 possibilities? (y or n)
s1.addCallback                   s1.end_getChannelState           s1.ice_datagram
s1.addChannel                    s1.end_getChannels               s1.ice_encodingVersion
s1.addContextCallback            s1.end_getConf                   s1.ice_endpointSelection
s1.addUserToGroup                s1.end_getLog                    s1.ice_endpoints
s1.begin_addCallback             s1.end_getLogLen                 s1.ice_facet
s1.begin_addChannel              s1.end_getRegisteredUsers        s1.ice_flushBatchRequests
[..]

The most interesting methods start with “get” and “set”.

Check whether the server is running

s1.isRunning()

Out[6]: True

Print the complete configuration

s1.getAllConf()

Out[7]:
{”: ”,
‘allowhtml’: ‘true’,
‘allowping’: ‘true’,
‘autobanattempts’: ’10’,
‘bandwidth’: ‘128000’,
‘bonjour’: ‘false’,
‘boot’: ‘true’,
[…]

Print only a specific setting

s1.getConf("registername")

Out[8]: ‘Natemologie-Zentrum (Opus)’

Change settings

s1.setConf("users", "150")

Restart the server

s1.stop()
s1.start()

Change the welcome message

s1.setConf("welcometext", "Welcome to my server")

Lets send a message to a specific channel on your server

In the Ice documentation we can read that the sendMessageChannel needs the following arguments:

s1.sendMessageChannel(int channelid, bool tree, string text)

If the “tree” parameter is True the message is sent to all subchannels of the channel you send a message to.

So we can use for example:

s1.sendMessageChannel(123, False, "Test message to channel with id 123")

On the Mumble server we get:

[07:02:47] (Channel) Server: Test message to channel with id 530

Now a so called tree message to all channels on the server

Now we write a so called tree message (see above):

s1.sendMessageChannel(0, True, "This is a test message to all channels on your server")

0 is the id of the root channel of a server.

Every user on your server gets:

[07:04:04] (Tree) Server: This is a test message to all channels on your server

You can also use HTML and CSS to style your message:

s1.sendMessageChannel(0, True, "<span style='color:red;font-size:12px;'>This is a test message to all channels o
n your server</span>")

Get the server uptime in seconds

s1.getUptime()

Out[71]: 104157L

Get a list of current online users

for k,v in s1.getUsers().iteritems():
    print(k, v.name)

(194L, ‘Natenom’)
(197L, ‘Music-Bot 2’)
(198L, ‘Music-Bot 5’)
(199L, ‘Music-Bot 3’)
(200L, ‘Music-Bot 1’)
(201L, ‘Music-Bot 4’)
(19L, ‘MetalRubyOceanBot’)
(126L, ‘someone’)

The first number is the current session ID of a user.

But there is more information about a user; when you write the code above press <TAB> after v. …

For example:

for k,v in s1.getUsers().iteritems():
    print(k, v.name, v.os, v.osversion, v.release, v.selfMute, v.idlesecs)

(194L, ‘Natenom’, ‘X11’, ‘Arch Linux’, ‘1.3.0’, False, 1L)
(197L, ‘Music-Bot 2’, ‘Linux x86_64’, ‘#1 SMP Wed Feb 10 09:52:06 CET 2016’, ‘mumble-ruby 1.1.2’, False, 3360L)
[…]

Kick a user

Lets kick Natenom, referenced by his current session id (194):

s1.kickUser(194, "Just a test :P")

[07:28:23] You were kicked from the server by the server: Just a test :P.

Note that the session id is limited to the current session; it changes when Natenom reconnects.

Playing with a specific user

Create an object with a specific user, lets say Natenom:

for k,v in s1.getUsers().iteritems():
    print(k, v.name, v.os, v.osversion, v.release, v.selfMute, v.idlesecs)

(1L, ‘Natenom’, ‘X11’, ‘Arch Linux’, ‘1.3.0’, False, 12L)

Natenom = s1.getUsers()[1] #1 is the session id from above

Now type Natenom. and press <TAB>.

Natenom.<press TAB>

Natenom.address          Natenom.idlesecs
[…]

The object “Natenom” can also be used to change his current state with the help of setState().

First modify the object:

Natenom.name = "Ice is cool :P"

Nothing happened yet on the server; now:

s1.setState(Natenom)

Now Natenom was renamed on the server 🙂

BTW: When using Ice to rename users you are not limited to characters allowed by “username” setting. The same applies for channel names.

Lets deaf Natenom server side:

Natenom.deaf = True
s1.setState(Natenom)

Done.

ice_is_cool

Work with channels

In order to create a new channel you need to know the ID of the parent channel; 0 in this case is the root channel so the next command will create a main channel.

s1.addChannel("Name your channel", 0)

Out[13]: 3696L

The output gives you the ID of the new channel, 3696. You need it to reference this channel in other commands.

s1.getChannelState(3696)

{
id = 3696
name = name of new channel
parent = 0
links =
{
}
description =
temporary = False
position = 0
}

mychannel = s1.getChannelState(3696)
mychannel.description = "You can use HTML and CSS in channel descriptions if allowhtml is set to true on your se
rver<br /><br /><a href='https://blog.natenom.com'>Link to my blog</a>" 
s1.setChannelState(mychannel)

working_with_ice

Done…

Have fun with experimenting what else you can do with Mice 🙂

It is very powerful.

 

A new feature for Antiflood module for Mumble Moderator – Random kick

Because there are users on our server who sometimes like to play with their limits and stop spamming when the reached 19 of 20 allowed actions I added a new feature into the Antiflood module for Mumble Moderator today.

When a user reached half of his allowed action limit there is a randomized test whether to kick a user even if the full limit it not reached yet 😛

In such a case the server kicks the user the the kick reason “Oh, did I miscount?”.

It is activated by default but can be disabled.

antiflood-module-mumo-randomkick

You can get the Antiflood module on Github.

Its documentation can be found in my wiki, see here.

Ersatzserver für den Mumble-Server “Natemologie-Zentrum” wegen Störungen in Betrieb genommen…

Es gab in den vergangenen beiden Tagen abends Störungen im Betrieb meines Mumble-Servers, der bei HostEurope läuft.

Das bedeutet, dass für mehrere Minuten der Server entweder gar nicht und nur mit sehr hohen Paketverlusten genutzt werden kann.

Daher habe ich wieder einen Ersatzserver aktiviert, der auch in Zukunft dauerhaft in Betrieb sein wird. Dieser läuft auf einem komplett anderen vServer eines ganz anderen Anbieters.

Der Ersatzserver ist jedoch nicht mit den vielen techischen Finessen ausgestattet wie der normale Mumble-Server; d. h. kein Auto-AFK, kein sets, usw.

Im Falle einer Störung

Sollte es erneut Probleme geben, so werde ich manuell die Domains mumble.natenom.com und m.natenom.com auf die IP-Adresse des Ersatzservers umstellen, sodass ihr automatisch dort landet.

Voraussetzung ist natürlich, dass ich es zum einen überhaupt mitbekomme und anwesend bin und zum anderen die Änderung am DNS bei euch ankommt. Die TTL von mumble.natenom.com ist daher auf 5 Minuten eingestellt. So lange dauert es mindestens, bis ihr auf dem Ersatzserver landet.

Daher jetzt schon den Ersatzserver hinzufügen

Man sollte sich bereits jetzt die folgenden drei Server zu seiner Favoritenliste in Mumble hinzufügen:

  • mumble.natenom.com – Automatische Auswahl des richtigen Servers per DNS-Weiterleitung; diesen Server habt ihr vermutlich bereits in euren Favoriten.
  • mumble1.natenom.com – Dieser Link führt euch IMMER zum normalen Server
  • mumble2.natenom.com – Dieser Link führt euch IMMER zum Ersatzserver

Diese drei Links stehen auch immer auf dem Ersatzserver zur Verfügung, sodass man wärend einer Störung immer mal wieder den normalen Server ausprobieren kann.

Um diese Server hinzuzufügen, könnt ihr jeden der drei Links in die Zwischenablage kopieren und dann in Mumble auf “Server” -> “Verbinden” klicken und im neuen Fenster dann auf “Server hinzufügen”. Dann erscheinen die Daten aus der Zwischenablage automatisch im Dialog zum Hinzufügen des neuen Servers. Mit einem Klick auf “Ok” ist man fertig.

Details über diese Vorgehensweise gibt es im Wiki, siehe hier.

Diese und weitere Informationen über meinen Mumble-Server und den Ersatzserver gibt es auch im Wiki, siehe hier.

Mumble 1.2.13 – Sicherheitsupdate für Mumble-Server auf Windows

Heute gab es für die stabile Version von Mumble ein Sicherheitsupdate auf die Version 1.2.13.

Damit wird eine Schwachstelle behoben, die seit Version 1.2.0 nur im Mumble-Server für Windows steckt.

Über ein selbst erstelltes UDP-Paket ist es möglich, den Server dazu zu bringen, dass er keine Pakete mehr über UDP annimmt.

Das hat zur Folge, dass Sprachpakete nicht mehr über UDP angenommen werden und die Clients nach einigen Sekunden automatisch in den TCP-Modus umschalten. Bis zur Umschaltung kann man niemanden hören und wird auch nicht von den anderen gehört.

Desweitern werden auch sogenannte Ping-Pakete nicht mehr gesendet, über die der Client erfragt, wie viele Benutzer sich aktuell auf einem Mumble-Server befinden, wie viele Slots es gibt und welchen Ping man zu einem Server hat.

Wenn ein neuer Benutzer den Server betritt, ist UDP wieder möglich.

Gefunden wurde diese Lücke von LuaMilkshake.

Alle technischen Details und auch einen Patchfindet man im Mumble Security Advisory 2016-001.

Nicht-Windows-Versionen sind von dem Fehler nicht betroffen, aber wie immer schließt ein Update die Pakete für alle Betriebssystem mit ein.

Das Update kann man entweder selbst anstoßen über das Menü -> Hilfe -> Auf Updates prüfen oder beim nächsten Start von Mumble einfach die Aktualisierungsbenachrichtigung anklicken.

Alternativ kann man sich auch Mumble selbst herunterladen, siehe hier.

Auch ist diese Version die erste für Windows, die eine andere Art der Signierung für die Pakete unter Windows verwendet; Details dazu gibt es im Blog des Mumble-Projekts, siehe hier.

Munin-Plugin für Statistikerhebung eines Mumble-Servers verbessert

Vor ein paar Jahren hatte ich mal ein Plugin erstellt, welches ein paar Daten eines Mumble-Servers für Munin ausgibt, wie z. B. Anzahl der registrierten/unregistrierten Benutzer, Anzahl der Kanäle usw.

Habe dieses Plugin vor ein paar Wochen aktualisiert und jetzt kann man jeden Wert einzeln aktivieren/deaktivieren.

Diese Werte sind:

show_users_all = True # All users regardless their state

show_users_muted = True # Server muted, self muted and server suppressed users.

show_users_unregistered = True # Not registered users.

show_users_registered = True # Registered users.

show_ban_count = True # Number of bans on the server; temporary global bans do not count.

show_channel_count = True # Number of channels on the server (including the root channel).

show_uptime = True # Uptime of the server (in days)

Per Voreinstellung werden alle verfügbaren Daten in einer einzige Auswertung generiert, man kann jedoch das Plugin auch mehrfach verwenden, entsprechend konfigurieren und je eine Grafik für jeden einzelnen Wert generieren lassen.

Eine solche generierte Auswertung, die mit einer älteren Version des Plugins erzeugt wurde, sieht z. B. so aus:
murmur-week

Dokumentation

Die Dokumentation gibt es in Deutscher Sprache unter wiki.natenom.de/mumble/tools/munin und in Englischer Sprache unter wiki.natenom.com/w/Munin_plugin_for_a_Murmur_(Mumble-Server).

Herunterladen

Das Plugin gibt es auf GitHub in meinem eigenen Repository, siehe hier.

Zusätzlich liegt es auch noch beim Mumble-Projekt, siehe hier.

Mumble-Ruby-Pluginbot 0.9.1 (Codename Chillout) – Many new features and improvements in this release :)

With the Mumble-Ruby-Pluginbot you can stream your music into your Mumble server. Every user can control the bot to download music from several online platforms like Youtube, Soundcloud and more.

Today we released Version 0.9.1 with many new features.

New features

  • .yta” can handle multiple ids at once seperated by spaces; for example “.yta 1 5 10 28
  • .radiostream should now be able to add and play most radiostreams. If you find a stream that does not work please report it here. If you need URLs of internet radios try dir.xiph.org/wiki.ubuntuusers.de/Internetradio/Stationen or www.shoutcast.com/.
  • If a radiostream URL has several entries in its playlist you can choose one or more with the “.choose” command.
  • Instead of “.radiostream URL” you can now also use “.URL”.
  • When an unregistered user enters the channel the bot pauses its music, this is old. Now it unpauses automatically when all unregistered users left the channel. In case of a radiostream it just mutes itself bacause pausing a live stream is a bad idea 🙂
  • You can now use “.play first” and “.play last” to play the first or the last song in the current queue. Lets say you added a song into the current queue with many songs you can now just play the last entry instead of getting the queue from the bot and starting the last id in the queue.

Improvements

  • The number of results from the command .yts is now limited to 200, but can be changed in the configuration.
  • The updater script runs completely without interaction when selecting the entry “Update everything bot related at once…”.
  • The update process when adding files to the local repository or when invoking an “.update” command is now faster because the bot now recognizes when the update finished instead of always waiting 10 seconds 😛
  • The command “.delete” is now documented in “.help mpd“. You can delete a single entry from the current queue with that command.

Improved development strategy

In the past when you set up the bot it could sometimes happen that you got a buggy or not working bot.

Thats why we changed how we work with branches so that the “master” branch is now always clean and working. The development takes place only in the “devel” branch and for every release we are going to merge devel into master.

Install new dependency

In order to run the latest version of Mumble-Ruby-Pluginbot you need to install the crack gem which is used to handle xml stuff.

If you installed the bot with the official installation howto, then login as botmaster and do twice:

~/src/mumble-ruby-pluginbot/scripts/updater.sh

Twice because first the updater updates itself and then needs to run again in order to update the dependencies 🙂

Select both times the first entry and press enter; thats it.

If you want to do it by hand or didn’t use the installation howto, then login as botmaster and do:

rvm use @bots
rvm @bots do gem install crack

VirtualBox appliance updated

The VirtualBox appliance was already updated to the new version.

See here for details.

Bug fixes

  • The bot doesn’t crash anymore when a user without a certificate sends a command to it.
  • The bot unsticks itself from a channel when he receives the “.gotobed” command.
  • Some more bug fixes …

Information about the bot

All information about the Mumble-Ruby-Pluginbot can be found here.