Skip to content
Snippets Groups Projects
Commit 6473d01b authored by rswindell's avatar rswindell
Browse files

Better spamd response parsing.

parent 875ffb6e
No related branches found
No related tags found
No related merge requests found
......@@ -89,13 +89,14 @@ function Message_DoCommand(command)
return(ret)
}
tmp=rcvd[0].split(/\s+/,3);
tmp=rcvd[0].split(/\s+/); /* was ,3 */
if(tmp.length < 3) {
ret.error="Unable to parse line '"+rcvd[0];
return(ret)
}
if(tmp[1] != '0') {
ret.error="spamd returned error "+tmp[2]+" ("+tmp[1]+")";
tmp.shift();
ret.error="spamd returned error: " + tmp.join(" ");
return(ret)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment