diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/inbound.c | 7 | ||||
-rw-r--r-- | src/common/outbound.c | 15 | ||||
-rw-r--r-- | src/common/outbound.h | 1 | ||||
-rw-r--r-- | src/common/proto-irc.c | 9 | ||||
-rw-r--r-- | src/common/servlist.c | 2 | ||||
-rw-r--r-- | src/common/text.c | 5 | ||||
-rw-r--r-- | src/common/textevents.in | 6 |
7 files changed, 34 insertions, 11 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c index f57207d1..a8c19504 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -1450,7 +1450,12 @@ nowindow: static int inbound_exec_eom_cmd (char *str, void *sess) { - handle_command (sess, (str[0] == '/') ? str + 1 : str, TRUE); + char *cmd; + + cmd = command_insert_vars ((session*)sess, (str[0] == '/') ? str + 1 : str); + handle_command ((session*)sess, cmd, TRUE); + g_free (cmd); + return 1; } diff --git a/src/common/outbound.c b/src/common/outbound.c index 21af2940..158b2b16 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -4584,7 +4584,6 @@ handle_command (session *sess, char *cmd, int check_spch) char tbuf_static[TBUFSIZE]; char *pdibuf; char *tbuf; - char *cmd_vars; int len; int ret = TRUE; @@ -4596,9 +4595,7 @@ handle_command (session *sess, char *cmd, int check_spch) command_level++; /* anything below MUST DEC command_level before returning */ - cmd_vars = command_insert_vars (sess, cmd); - - len = strlen (cmd_vars); + len = strlen (cmd); if (len >= sizeof (pdibuf_static)) { pdibuf = malloc (len + 1); @@ -4618,7 +4615,7 @@ handle_command (session *sess, char *cmd, int check_spch) } /* split the text into words and word_eol */ - process_data_init (pdibuf, cmd_vars, word, word_eol, TRUE, TRUE); + process_data_init (pdibuf, cmd, word, word_eol, TRUE, TRUE); /* ensure an empty string at index 32 for cmd_deop etc */ /* (internal use only, plugins can still only read 1-31). */ @@ -4629,12 +4626,12 @@ handle_command (session *sess, char *cmd, int check_spch) /* redo it without quotes processing, for some commands like /JOIN */ if (int_cmd && !int_cmd->handle_quotes) { - process_data_init (pdibuf, cmd_vars, word, word_eol, FALSE, FALSE); + process_data_init (pdibuf, cmd, word, word_eol, FALSE, FALSE); } if (check_spch && prefs.hex_input_perc_color) { - check_special_chars (cmd_vars, prefs.hex_input_perc_ascii); + check_special_chars (cmd, prefs.hex_input_perc_ascii); } if (plugin_emit_command (sess, word[1], word, word_eol)) @@ -4701,7 +4698,7 @@ handle_command (session *sess, char *cmd, int check_spch) } else { - sess->server->p_raw (sess->server, cmd_vars); + sess->server->p_raw (sess->server, cmd); } } @@ -4718,8 +4715,6 @@ xit: free (tbuf); } - g_free (cmd_vars); - return ret; } diff --git a/src/common/outbound.h b/src/common/outbound.h index 7dc1ba97..81a98666 100644 --- a/src/common/outbound.h +++ b/src/common/outbound.h @@ -25,6 +25,7 @@ extern GSList *menu_list; int auto_insert (char *dest, int destlen, unsigned char *src, char *word[], char *word_eol[], char *a, char *c, char *d, char *e, char *h, char *n, char *s, char *u); +char *command_insert_vars (session *sess, char *cmd); int handle_command (session *sess, char *cmd, int check_spch); void process_data_init (char *buf, char *cmd, char *word[], char *word_eol[], gboolean handle_quotes, gboolean allow_escape_quotes); void handle_multiline (session *sess, char *cmd, int history, int nocommand); diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 128c0c85..642cd056 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -678,6 +678,15 @@ process_numeric (session * sess, int n, handle_mode (serv, word, word_eol, "", TRUE, tags_data); break; + case 328: /* channel url */ + sess = find_channel (serv, word[4]); + if (sess) + { + EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANURL, sess, word[4], word[5] + 1, + NULL, NULL, 0, tags_data->timestamp); + } + break; + case 329: sess = find_channel (serv, word[4]); if (sess) diff --git a/src/common/servlist.c b/src/common/servlist.c index 51094687..01d66374 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -256,6 +256,8 @@ static const struct defaultserver def[] = {0, "chat.freenode.net/+6697"}, #endif {0, "chat.freenode.net"}, + /* irc. points to chat. but many users and urls still reference it */ + {0, "irc.freenode.net"}, /* {"Freeworld", 0}, {0, "kabel.freeworld.nu"}, diff --git a/src/common/text.c b/src/common/text.c index b825faba..b6ad378d 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -1359,6 +1359,11 @@ static char * const pevt_chanmodes_help[] = { N_("Modes string"), }; +static char * const pevt_chanurl_help[] = { + N_("Channel Name"), + N_("URL"), +}; + static char * const pevt_rawmodes_help[] = { N_("Nickname"), N_("Modes string"), diff --git a/src/common/textevents.in b/src/common/textevents.in index 1f86d90b..b4242ca7 100644 --- a/src/common/textevents.in +++ b/src/common/textevents.in @@ -202,6 +202,12 @@ pevt_chanunquiet_help %C22*%O$t%C26$1%O removes quiet on %C18$2%O 2 +Channel Url +XP_TE_CHANURL +pevt_chanurl_help +%C22*%O$tChannel %C22$1%O url: %C24$2 +2 + Channel Voice XP_TE_CHANVOICE pevt_chanvoice_help |