diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-03-15 14:51:06 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-03-15 14:51:06 +0000 |
commit | 8ccdc7267f8ae35a4b59fefbc579e6bf29d3c1c5 (patch) | |
tree | b6e2c0bc2527f027de8281d4934ed2b2a1430135 /src | |
parent | 52053f1717e5a886bdea5dc7c868eb5e02ac3bd7 (diff) | |
download | irssi-8ccdc7267f8ae35a4b59fefbc579e6bf29d3c1c5.zip |
Simplify recode target computation.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4773 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/irc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index e16dab21..150013dd 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -291,13 +291,13 @@ static void irc_server_event(IRC_SERVER_REC *server, const char *line, g_return_if_fail(line != NULL); - params = event_get_params(line, 2, NULL, &args); + params = event_get_params(line, 2, NULL, &target); recoded_nick = recode_in(SERVER(server), nick, NULL); - if (ischannel(*args) || - (*args++ == '@' && ischannel(*args))) - target = args; - else { - target = recoded_nick; + if (!ischannel(*target)) { + if (*target == '@' && ischannel(target[1])) + target++; + else + target = recoded_nick; } recoded_line = recode_in(SERVER(server), line, target); /* split event / args */ |