irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

commit f706510f6e8a98282474fff66f79a06e924eedff
parent 65e53730f9e0b656e5ffe395441221fc706bd70d
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 28 Jul 2012 00:15:20 +0200

--own only works for messages now

Diffstat:
irctk.c | 16+++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/irctk.c b/irctk.c @@ -1040,6 +1040,13 @@ int do_say(irc_session_t *s, char *chan, char *line) { /* TODO2 only join channels we haven't joined yet */ if (args.join) join_channel(s, chan); + if (args.own) { + mprintf("[%s] <%s%s> %s", chan, + output_nick(args.nick), + args.with_host ? args.hostname : "", + line); + } + return irc_cmd_msg(s, chan, line); } @@ -1049,14 +1056,12 @@ int do_say(irc_session_t *s, char *chan, char *line) { int do_cmd_msg(irc_session_t *s, char *chan, char* line) { int rsl = 0; - int is_local = 1; debug("do_cmd_msg %s %s\n", chan, line); /* TODOponey ask the server to notify, if possible */ /* TODO2 find a way to get real host name (part after !) */ - /* TODO2 provide a means to escape '/' */ if (line[0] == '/' && args.command_to_event) { char *arg; if ((arg = MATCH_CMD(line, "nick"))) { @@ -1164,13 +1169,6 @@ int do_cmd_msg(irc_session_t *s, char *chan, char* line) if (rsl) return rsl; - if (args.own) { - mprintf("[%s] <%s%s> %s", is_local ? chan : "", - output_nick(args.nick), - args.with_host ? args.hostname : "", - line); - } - return 0; }