6 Commits
0.5.1 ... 0.5.0

Author SHA1 Message Date
James Booth
aef8541135 syscmd.py: Make newlines configurable
issue #9
2016-11-13 21:52:41 +00:00
James Booth
018f369ff4 Update README 2016-11-13 17:28:56 +00:00
James Booth
9bc1cbc8a1 Update README 2016-11-13 17:26:46 +00:00
James Booth
6569ad66d5 Restructure project 2016-11-13 17:02:22 +00:00
James Booth
4f91f5cf67 paste.py: newline option only for multiline text
issue #5
2016-11-13 16:15:53 +00:00
James Booth
55530de6b6 paste,py: add newline option
issue #5
2016-11-13 15:41:50 +00:00
4 changed files with 6 additions and 43 deletions

View File

@@ -59,4 +59,3 @@ def prof_init(version, status, account_name, fulljid):
prof.register_command("/imgur", 1, 1, synopsis, description, args, examples, _cmd_imgur)
prof.completer_add("/imgur", [ "screenshot" ])
prof.filepath_completer_add("/imgur")

View File

@@ -157,9 +157,6 @@ def prof_init(version, status, account_name, fulljid):
prof.completer_add("/sounds set", [ "chat", "room", "private" ])
prof.completer_add("/sounds clear", [ "chat", "room", "private" ])
prof.completer_add("/sounds rooms", [ "add", "remove", "clear" ])
prof.filepath_completer_add("/sounds set chat")
prof.filepath_completer_add("/sounds set room")
prof.filepath_completer_add("/sounds set private")
def prof_post_chat_message_display(barejid, resource, message):
@@ -175,13 +172,6 @@ def prof_post_chat_message_display(barejid, resource, message):
def prof_post_room_message_display(barejid, nick, message):
my_nick = prof.get_room_nick(barejid)
if not my_nick:
return
if my_nick == nick:
return;
enabled = prof.settings_boolean_get("sounds", "enabled", False)
if not enabled:
return

View File

@@ -128,10 +128,6 @@ def _get(subject):
if room:
prof.win_focus(plugin_win)
prof.win_show(plugin_win, "called -> prof_get_current_muc: " + room)
nick = prof.get_room_nick(room)
if nick:
prof.win_focus(plugin_win)
prof.win_show(plugin_win, "called -> prof_get_room_nick('" + room + "'): " + nick)
else:
prof.win_focus(plugin_win)
prof.win_show(plugin_win, "called -> prof_get_current_muc: <none>")
@@ -446,8 +442,7 @@ def prof_init(version, status, account_name, fulljid):
"/python-test int get <group> <key>",
"/python-test int set <group> <key> <value>",
"/python-test incoming <barejid> <resource> <message>",
"/python-test completer add|remove <item>",
"/python-test file"
"/python-test completer add|remove <item>"
]
description = "Python test plugins. All commands focus the plugin window."
args = [
@@ -478,8 +473,7 @@ def prof_init(version, status, account_name, fulljid):
[ "int set <group> <key> <value>", "Set a integer setting" ],
[ "incoming <barejid> <resource> <message>", "Show an incoming message." ],
[ "completer add <item>", "Add an autocomplete item to the /c-test command." ],
[ "completer remove <item>", "Remove an autocomplete item from the /c-test command." ],
[ "file", "Complete a file path." ]
[ "completer remove <item>", "Remove an autocomplete item from the /c-test command." ]
]
examples = [
"/python-test sendline /about",
@@ -510,8 +504,7 @@ def prof_init(version, status, account_name, fulljid):
"string_list",
"int",
"incoming",
"completer",
"file"
"completer"
]
)
prof.completer_add("/python-test get",
@@ -536,8 +529,6 @@ def prof_init(version, status, account_name, fulljid):
[ "add", "remove" ]
)
prof.filepath_completer_add("/python-test file")
prof.register_timed(timed_callback, 5)
@@ -587,7 +578,6 @@ def prof_post_chat_message_display(barejid, resource, message):
def prof_pre_chat_message_send(barejid, message):
prof.win_create(plugin_win, _handle_win_input)
prof.win_show(plugin_win, "fired -> prof_pre_chat_message_send: " + barejid + ", " + message)
return message
def prof_post_chat_message_send(barejid, message):
@@ -608,7 +598,6 @@ def prof_post_room_message_display(barejid, nick, message):
def prof_pre_room_message_send(barejid, message):
prof.win_create(plugin_win, _handle_win_input)
prof.win_show(plugin_win, "fired -> prof_pre_room_message_send: " + barejid + ", " + message)
return message
def prof_post_room_message_send(barejid, message):
@@ -637,7 +626,6 @@ def prof_post_priv_message_display(barejid, nick, message):
def prof_pre_priv_message_send(barejid, nick, message):
prof.win_create(plugin_win, _handle_win_input)
prof.win_show(plugin_win, "fired -> prof_pre_priv_message_send: " + barejid + ", " + nick + ", " + message)
return message
def prof_post_priv_message_send(barejid, nick, message):

View File

@@ -185,15 +185,6 @@ getsubject(char *subject)
char buf[strlen(str) + strlen(room)];
sprintf(buf, "%s%s", str, room);
prof_win_show(plugin_win, buf);
char *nick = prof_get_room_nick(room);
if (nick) {
prof_win_focus(plugin_win);
char *str1 = "called -> prof_get_room_nick('";
char *str2 = "'): ";
char buf1[strlen(str1) + strlen(room) + strlen(str2) + strlen(nick)];
sprintf(buf1, "%s%s%s%s", str1, room, str2, nick);
prof_win_show(plugin_win, buf1);
}
} else {
prof_win_focus(plugin_win);
prof_win_show(plugin_win, "called -> prof_get_current_muc: <none>");
@@ -614,7 +605,6 @@ prof_init(const char * const version, const char * const status, const char *con
"/c-test int set <group> <key> <value>",
"/c-test incoming <barejid> <resource> <message>",
"/c-test completer add|remove <item>",
"/c-test file",
NULL
};
char *description = "C test plugin. All commands focus the plugin window.";
@@ -647,7 +637,6 @@ prof_init(const char * const version, const char * const status, const char *con
{ "incoming <barejid> <resource> <message>", "Show an incoming message." },
{ "completer add <item>", "Add an autocomplete item to the /c-test command." },
{ "completer remove <item>", "Remove an autocomplete item from the /c-test command." },
{ "file", "Complete a file path." },
{ NULL, NULL }
};
@@ -681,7 +670,6 @@ prof_init(const char * const version, const char * const status, const char *con
"int",
"incoming",
"completer",
"file",
NULL
};
prof_completer_add("/c-test", cmd_ac);
@@ -707,8 +695,6 @@ prof_init(const char * const version, const char * const status, const char *con
char *completer_ac[] = { "add", "remove", NULL };
prof_completer_add("/c-test completer", completer_ac);
prof_filepath_completer_add("/c-test file");
prof_register_timed(timed_callback, 5);
}
@@ -791,7 +777,7 @@ prof_pre_chat_message_send(const char * const barejid, const char *message)
sprintf(buf, "%s%s, %s", str, barejid, message);
prof_win_show(plugin_win, buf);
return strdup(message);
return NULL;
}
void
@@ -839,7 +825,7 @@ prof_pre_room_message_send(const char * const barejid, const char *message)
sprintf(buf, "%s%s, %s", str, barejid, message);
prof_win_show(plugin_win, buf);
return strdup(message);
return NULL;
}
void
@@ -904,7 +890,7 @@ prof_pre_priv_message_send(const char * const barejid, const char * const nick,
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
prof_win_show(plugin_win, buf);
return strdup(message);
return NULL;
}
void