+ //Get status message
+ const char *status_msg = NULL;
+ if (purple_status_type_get_attr(type, "message") != NULL) {
+ status_msg = purple_status_get_attr_string(status, "message");
+ } else {
+ status_msg = (char *) purple_savedstatus_get_message(purple_savedstatus_get_current());
+ }
+
+ //Export variables to environment
+ setenv(ENV_PREFIX "MSG", message, 1);
+ setenv(ENV_PREFIX "FROM", who, 1);
+ setenv(ENV_PREFIX "PROTOCOL", protocol_id, 1);
+ setenv(ENV_PREFIX "STATUS", status_id, 1);
+ setenv(ENV_PREFIX "STATUS_MSG", status_msg, 1);