Fixed all plugins (excl lua) to work with new hooks

This commit is contained in:
James Booth
2014-10-30 00:20:19 +00:00
parent b9f69dcda6
commit 35e274a2ba
7 changed files with 229 additions and 140 deletions

10
say.py
View File

@@ -1,26 +1,26 @@
import prof
import os
on_message = False
on_message = True
def prof_on_message_received(jid, message):
def prof_post_chat_message_display(jid, message):
if on_message:
os.system("say \"" + jid + " says " + message + "\" 2>/dev/null")
return message
def prof_on_room_message_received(room, nick, message):
def prof_post_room_message_display(room, nick, message):
if on_message:
os.system("say \"" + nick + " says " + message + " in " + room + "\" 2>/dev/null")
return message
def prof_on_private_message_received(room, nick, message):
def prof_post_priv_message_display(room, nick, message):
if on_message:
os.system("say \"" + nick + " says " + message + "\" 2>/dev/null")
return message
def _cmd_say(msg=None):
if msg:
os.system("say \"" + msg + "\" &2>/dev/null")
os.system("say \"" + msg + "\" 2>/dev/null")
def prof_init(version, status):
prof.register_command("/say", 0, 1, "/say message", "Say something.", "Say something.",