+ /* Check for 1.0 protocol version which didn't have `error' */
+ if (tmp[0] == 0 && tmp[1] != 0) {
+ /* Protocol 1.0 version */
+ SilcStatus s;
+ SILC_GET16_MSB(s, tmp);
+ if (status)
+ *status = s;
+ if (error)
+ *error = 0;
+ if (s >= SILC_STATUS_ERR_NO_SUCH_NICK && error)
+ *error = s;
+ return (s < SILC_STATUS_ERR_NO_SUCH_NICK);
+ }
+
+ /* Take both status and possible error */
+ if (status)
+ *status = (SilcStatus)tmp[0];
+ if (error)
+ *error = (SilcStatus)tmp[1];
+
+ /* If single error occurred have the both `status' and `error' indicate
+ the error value for convenience. */
+ if (tmp[0] >= SILC_STATUS_ERR_NO_SUCH_NICK && error)
+ *error = tmp[0];
+
+ return (tmp[0] < SILC_STATUS_ERR_NO_SUCH_NICK && tmp[1] == SILC_STATUS_OK);