equal
deleted
inserted
replaced
140 return 0; |
140 return 0; |
141 } |
141 } |
142 |
142 |
143 static char *irc_getmessage (const char *line, MSG * message) |
143 static char *irc_getmessage (const char *line, MSG * message) |
144 { |
144 { |
|
145 static char *garbage_collector = NULL; |
145 char *theLine; |
146 char *theLine; |
146 char *token; |
147 char *token; |
147 char *ptr; |
148 char *ptr; |
148 |
149 |
|
150 if (garbage_collector != NULL) |
|
151 free (garbage_collector); |
|
152 |
149 if ((theLine = strdup (line)) == NULL) |
153 if ((theLine = strdup (line)) == NULL) |
150 return "ENOMEM"; |
154 return "ENOMEM"; |
|
155 else |
|
156 garbage_collector = theLine; |
151 |
157 |
152 message->user = message->email = NULL; |
158 message->user = message->email = NULL; |
153 message->command = NULL; |
159 message->command = NULL; |
154 message->channel = message->line = NULL; |
160 message->channel = message->line = NULL; |
155 |
161 |