[Pkg-privacy-commits] [irssi-plugin-otr] 05/267: some format/log changes.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:11 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 76062c2f989dd09b144101b0d3853d88dd37830a
Author: Uli Meis <a.sporto+bee at gmail.com>
Date: Mon Jun 2 23:18:57 2008 +0200
some format/log changes.
---
makeformats.py | 16 ++++++++++------
otr.c | 2 +-
otr_ops.c | 2 +-
otrutil.c | 2 +-
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/makeformats.py b/makeformats.py
index d2c3bab..dbcd186 100755
--- a/makeformats.py
+++ b/makeformats.py
@@ -12,11 +12,9 @@ lines = map(lambda x: x.strip(),open(sys.argv[1],"r").readlines())
hdr = open("otr-formats.h","w")
src = open("otr-formats.c","w")
-src.write('#include "otr.h"\nFORMAT_REC formats[] = {\n')
+src.write('#include "otr.h"\n');
-src.write('{ MODULE_NAME, "otr", 0},\n')
-
-src.write("""{ "help", "%s", 0 }""" % "\\n".join(
+src.write("""char *otr_help = "%s";\n""" % "\\n".join(
["{hilight - OTR help -}"]+
[re.sub('^(/otr.*)$','%_\\1%_',
re.sub('"(.*)"','\\"%_\\1%_\\"',
@@ -25,9 +23,15 @@ src.write("""{ "help", "%s", 0 }""" % "\\n".join(
for x in open(sys.argv[2],"r").readlines()]+
["{hilight - End of OTR help -}"]))
+src.write('FORMAT_REC formats[] = {\n')
+
+src.write('{ MODULE_NAME, "otr", 0}\n')
+
+hdr.write("extern char *otr_help;\n\n");
+
hdr.write("enum {\n")
-hdr.write("TXT_OTR_MODULE_NAME,\nTXT_HELP")
+hdr.write("TXT_OTR_MODULE_NAME")
for line in lines:
src.write(",\n")
@@ -44,7 +48,7 @@ for line in lines:
params += ['1']
else:
params += ['0']
- new += fo[last:m.start()]+"$%d" % i
+ new += fo[last:m.start()+len(m.group(1))]+"$%d" % i
last = m.end()
i += 1
diff --git a/otr.c b/otr.c
index 6d2f4ee..fc335cd 100644
--- a/otr.c
+++ b/otr.c
@@ -136,7 +136,7 @@ static void cmd_debug(const char *data, void *server, WI_ITEM_REC *item)
*/
static void cmd_help(const char *data, void *server, WI_ITEM_REC *item)
{
- printformat(NULL,NULL,MSGLEVEL_CRAP,TXT_HELP);
+ printtext(NULL,NULL,MSGLEVEL_CRAP,otr_help);
}
/*
diff --git a/otr_ops.c b/otr_ops.c
index bcc3ca1..eba86b0 100644
--- a/otr_ops.c
+++ b/otr_ops.c
@@ -98,7 +98,7 @@ int ops_display_msg(void *opdata, const char *accountname,
GRegex *regex_del = g_regex_new("</?b([ /][^>]*)?>",0,0,NULL);
gchar *msgnohtml =
g_regex_replace_literal(regex_del,msg,-1,0,"",0,NULL);
- msg = g_regex_replace_literal(regex_bold,msgnohtml,-1,0,"%9",0,NULL);
+ msg = g_regex_replace_literal(regex_bold,msgnohtml,-1,0,"*",0,NULL);
if (co) {
coi = co->app_data;
diff --git a/otrutil.c b/otrutil.c
index 2b9679f..643499e 100644
--- a/otrutil.c
+++ b/otrutil.c
@@ -483,7 +483,7 @@ char *otr_receive(SERVER_REC *server, const char *msg,const char *from)
}
if (newmessage)
- otr_notice(server,from,TXT_RECEIVE_CONVERTED);
+ otr_debug(server,from,TXT_RECEIVE_CONVERTED);
return newmessage ? : (char*)msg;
}
--
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