Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions weechat-remote-notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def run_notify(mtype,urgency,icon,time,nick,chan,message):
host = w.config_get_plugin('host')

try:
if command:
if command and command != ('',):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command and can probably be deleted at least for my WeeChat build.

p = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
Expand All @@ -111,17 +111,17 @@ def on_msg(*a):
option = w.config_get("weechat.look.prefix_network")
if sender == w.config_string(option):
return w.WEECHAT_RC_OK
if data == "private" or highlight == "1":

if data == "private" or highlight == 1:
#set buffer
buffer = "me" if data == "private" else w.buffer_get_string(buffer, "short_name")

#set time - displays message forever on highlight
if highlight == "1" and data == "private":
if highlight == 1 and data == "private":

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want I can put the old comparison in an or if this is needed for other weechat versions.

mtype = "private_highlight"
icon = w.config_get_plugin('pm-icon')
time = w.config_get_plugin('display_time_private_highlight')
elif highlight == "1":
elif highlight == 1:
mtype = "highlight"
icon = w.config_get_plugin('icon')
time = w.config_get_plugin('display_time_highlight')
Expand Down