Adam Coddington avatar Adam Coddington committed 9fe0ff3

Slightly changing messages, indirectly gathering username from message.

Comments (0)

Files changed (2)

teamspeaknotifier/__init__.py

 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 __author__ = 'Adam Coddington <me@adamcoddington.net>'
-__version__ = (1, 0, 4)
+__version__ = (1, 0, 5)
 
 def run_from_cmdline():
     import logging

teamspeaknotifier/notifier.py

         if message.ultimate_origination == 'notifytextmessage':
             if not self.teamspeak_is_active() and not self.message_is_mine(message):
                 if message['targetmode'] == self.TARGETMODE_CLIENT:
-                    title = "%s said (in private message)" % (message['invokername'], )
+                    title = "%s said (via private message)" % (
+                            self.get_name_for_message(message), 
+                        )
                 else:
-                    title = "%s said" % (message['invokername'], )
+                    title = "%s said" % (
+                            self.get_name_for_message(message), 
+                        )
                 self._update_notification(title, message['msg'])
         elif message.ultimate_origination == 'notifytalkstatuschange':
             if not self.teamspeak_is_active() and not self.message_is_mine(message):
                 if message['status'] == '1':
                     self._update_notification(
-                                "%s is talking..." % 
-                                self.get_name_for_message(message)
+                                    "%s is talking..." % (
+                                    self.get_name_for_message(message),
+                                )
                             )
         elif message.ultimate_origination in ('notifyclientmoved', 'notifyclientleftview', 'notifycliententerview', ):
             self.send_client_update_commands()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.