commit 6cb8b7d88f880ecceabf180806493f1b74f72792
parent d69c451180e932f9b21575e33e8953262b938041
Author: Antoine Amarilli <ant.amarilli@free.fr>
Date: Sun, 30 Jan 2011 18:59:07 +0100
no reply prefix when talking to a private channel
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/irctk.c b/irctk.c
@@ -57,14 +57,14 @@
#define DEFAULT_LAST_OUT 2
#define DEFAULT_ALL 3
-// TODO
+// TODO get rid of that
#define MAX_LEN 4096
+// TODO customize full name, username...
-
-//const char *argp_program_version = "irctk 0.1";
-//const char *argp_program_bug_address = "<a3nm@a3nm.net>";
+//TODO const char *argp_program_version = "irctk 0.1";
+//TODO const char *argp_program_bug_address = "<a3nm@a3nm.net>";
const char *argp_program_version = NULL;
const char *argp_program_bug_address = NULL;
@@ -136,7 +136,7 @@ static struct argp_option options[] = {
"Run this command on each message, passing the channel, nick and message as $1, $2, and $3", COM_MODE },
*/
{"reply", 'r', 0, 0,
- "When inferring a destination channel automatically with --last-active, also infer a destination nick, and prefix lines with this nick (blank line terminates)", BOT_OPTIONS },
+ "When inferring a destination channel automatically with --last-active, also infer a destination nick, and prefix lines with this nick (blank line indicates the end of an answer)", BOT_OPTIONS },
/* TODO externalize those two features as a wrapper script */
{"filter", 'f', 0, 0,
"Only keep messages directly addressed to us (in private channel or with lines prefixed by our nick)", BOT_OPTIONS },
@@ -438,7 +438,7 @@ int cmd_msg(irc_session_t *s, char* target, const char* line)
case DEFAULT_LAST_IN:
target = args.last_chan_in;
- if (args.show_nick_prefix && args.last_nick_in[0])
+ if (args.show_nick_prefix && args.last_nick_in[0] && target[0] == '#')
{
if (line[0] != '\n')
{