summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/irc/Makefile.am3
-rw-r--r--src/irc/core/irc.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/irc/Makefile.am b/src/irc/Makefile.am
index cdea8d60..3d803c35 100644
--- a/src/irc/Makefile.am
+++ b/src/irc/Makefile.am
@@ -11,3 +11,6 @@ SUBDIRS = core $(BOT) dcc flood notifylist $(PROXY)
noinst_LIBRARIES = libirc.a
libirc_a_SOURCES = irc.c
+
+distclean-generic:
+ rm -f irc.c
diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c
index d7afaa23..0743dae2 100644
--- a/src/irc/core/irc.c
+++ b/src/irc/core/irc.c
@@ -322,12 +322,14 @@ static char *irc_parse_prefix(char *line, char **nick, char **address)
{
*nick = *address = NULL;
+ /* :<nick> [["!" <user>] "@" <host>] SPACE */
+
if (*line != ':')
return line;
*nick = ++line;
while (*line != '\0' && *line != ' ') {
- if (*line == '!') {
+ if (*line == '!' || *line == '@') {
*line++ = '\0';
*address = line;
while (*line != '\0' && *line != ' ')