[Pkg-privacy-commits] [irssi-plugin-otr] 97/267: Change statusbar text/event type
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:41:32 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 6f12d63037180ebde6ff9e537ce62e89d9fba6dc
Author: David Goulet <dgoulet at ev0ke.net>
Date: Sat Nov 3 17:55:52 2012 -0400
Change statusbar text/event type
Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
src/otr.c | 18 +++++++++++-------
src/otr.h | 6 ++++--
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/otr.c b/src/otr.c
index e9e4b63..bb20f49 100644
--- a/src/otr.c
+++ b/src/otr.c
@@ -23,7 +23,7 @@
#include <gcrypt.h>
-static const char *otr_status_txt[] = {
+static const char *statusbar_txt[] = {
"FINISHED",
"TRUST_MANUAL",
"TRUST_SMP",
@@ -47,12 +47,6 @@ IOUSTATE ioustate_uniq = { 0, 0, 0 };
GRegex *regex_policies;
#endif
-void otr_status_change(IRC_CTX *ircctx, const char *nick, int event)
-{
- statusbar_items_redraw("otr");
- signal_emit("otr event", 3, ircctx, nick, otr_status_txt[event]);
-}
-
IOUSTATE *otr_init_user(char *user)
{
IOUSTATE *ioustate = IO_CREATE_US(user);
@@ -849,3 +843,13 @@ int otr_getstatus_format(IRC_CTX *ircctx, const char *nick)
return TXT_ST_SMP_UNKNOWN;
}
}
+
+/*
+ * Change status bar text for a given nickname.
+ */
+void otr_status_change(IRC_CTX *ircctx, const char *nick,
+ enum statusbar_event event)
+{
+ statusbar_items_redraw("otr");
+ signal_emit("otr event", 3, ircctx, nick, statusbar_txt[event]);
+}
diff --git a/src/otr.h b/src/otr.h
index 7962b3e..40b87d2 100644
--- a/src/otr.h
+++ b/src/otr.h
@@ -149,7 +149,7 @@ enum {
};
/* given to otr_status_change */
-enum {
+enum statusbar_event {
IO_STC_FINISHED,
IO_STC_TRUST_MANUAL,
IO_STC_TRUST_SMP,
@@ -178,7 +178,9 @@ struct plistentry {
extern int debug;
void irc_send_message(IRC_CTX *ircctx, const char *recipient, char *msg);
-void otr_status_change(IRC_CTX *ircctx, const char *nick, int event);
+void otr_status_change(IRC_CTX *ircctx, const char *nick,
+ enum statusbar_event event);
+
IRC_CTX *ircctx_by_peername(const char *peername, char *nick);
/* init stuff */
--
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