[Pkg-privacy-commits] [irssi-plugin-otr] 147/267: Fix: remove the otr ignore setting
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.
commit edab206d6c01dd78448f0359aae599baa039ee5e
Author: David Goulet <dgoulet at ev0ke.net>
Date: Tue Nov 20 20:04:51 2012 -0500
Fix: remove the otr ignore setting
Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
src/module.c | 28 ----------------------------
src/otr.c | 13 -------------
2 files changed, 41 deletions(-)
diff --git a/src/module.c b/src/module.c
index 73cc9f4..de445d1 100644
--- a/src/module.c
+++ b/src/module.c
@@ -35,10 +35,6 @@ static const char *signal_args_otr_event[] = {
int debug = FALSE;
-#ifdef HAVE_GREGEX_H
-GRegex *regex_nickignore = NULL;
-#endif
-
/* need this to decode arguments in perl signal handlers. Maybe irssi should
* install perl/perl-signals.h which is where this definition comes from? */
void perl_signal_register(const char *signal, const char **args);
@@ -61,12 +57,6 @@ static void sig_server_sendmsg(SERVER_REC *server, const char *target,
goto end;
}
-#ifdef HAVE_GREGEX_H
- if (g_regex_match(regex_nickignore, target, 0, NULL)) {
- goto end;
- }
-#endif
-
/* Critical section. On error, message MUST NOT be sent */
ret = otr_send(server, msg, target, &otrmsg);
if (ret) {
@@ -96,12 +86,6 @@ void sig_message_private(SERVER_REC *server, const char *msg,
int ret;
char *new_msg = NULL;
-#ifdef HAVE_GREGEX_H
- if (g_regex_match(regex_nickignore, nick, 0, NULL)) {
- goto end;
- }
-#endif
-
ret = otr_receive(server, msg, nick, &new_msg);
if (ret) {
signal_stop();
@@ -250,14 +234,6 @@ static void read_settings(void)
{
otr_setpolicies(user_state_global, settings_get_str("otr_policy"), FALSE);
otr_setpolicies(user_state_global, settings_get_str("otr_policy_known"), TRUE);
-
-#ifdef HAVE_GREGEX_H
- if (regex_nickignore) {
- g_regex_unref(regex_nickignore);
- }
-
- regex_nickignore = g_regex_new(settings_get_str("otr_ignore"), 0, 0, NULL);
-#endif
}
void irssi_send_message(SERVER_REC *irssi, const char *recipient,
@@ -319,10 +295,6 @@ void otr_init(void)
*/
void otr_deinit(void)
{
-#ifdef HAVE_GREGEX_H
- g_regex_unref(regex_nickignore);
-#endif
-
signal_remove("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg);
signal_remove("message private", (SIGNAL_FUNC) sig_message_private);
signal_remove("query destroyed", (SIGNAL_FUNC) sig_query_destroyed);
diff --git a/src/otr.c b/src/otr.c
index 50f978f..52bc4ce 100644
--- a/src/otr.c
+++ b/src/otr.c
@@ -44,10 +44,6 @@ static const char *statusbar_txt[] = {
"CTX_UPDATE"
};
-#ifdef HAVE_GREGEX_H
-GRegex *regex_policies;
-#endif
-
static char *create_account_name(SERVER_REC *irssi)
{
int ret;
@@ -258,12 +254,6 @@ void otr_free_user(struct otr_user_state *ustate)
void otr_lib_init()
{
OTRL_INIT;
-
-#ifdef HAVE_GREGEX_H
- regex_policies = g_regex_new(
- "([^,]+) (never|manual|handlews|opportunistic|always)(,|$)",
- 0, 0, NULL);
-#endif
}
/*
@@ -271,9 +261,6 @@ void otr_lib_init()
*/
void otr_lib_uninit()
{
-#ifdef HAVE_GREGEX_H
- g_regex_unref(regex_policies);
-#endif
}
/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git
More information about the Pkg-privacy-commits
mailing list