[Pkg-privacy-commits] [irssi-plugin-otr] 62/267: Create query for printformats on demand.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:41:28 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 9cc01777c124ce869ba8278fa8597f4f55b96bea
Author: Uli Meis <a.sporto+bee at gmail.com>
Date: Wed Feb 11 16:58:47 2009 +0100
Create query for printformats on demand.
---
weechat/weechat_otr.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/weechat/weechat_otr.c b/weechat/weechat_otr.c
index e36c2f2..78ef0f8 100644
--- a/weechat/weechat_otr.c
+++ b/weechat/weechat_otr.c
@@ -52,7 +52,17 @@ void printformatva(IRC_CTX *ircctx, const char *nick, char *format, va_list para
char s[256];
sprintf(s,"%s.%s",ircctx->address,nick);
buffer = weechat_buffer_search("irc",s);
- //TODO: create query window on demand
+ if (!buffer) {
+ char cmd[256];
+ sprintf(cmd,"/query -server %s %s",ircctx->address,nick);
+ weechat_command(NULL,cmd);
+ buffer = weechat_buffer_search("irc",s);
+ if (!buffer)
+ weechat_printf(NULL,"OTR: Failed to create "
+ "a buffer for the following "
+ "message! server=%s,nick=%s",
+ ircctx->address,nick);
+ }
}
if( vsnprintf( s, LOGMAX, format, params ) < 0 )
--
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