40 if (!
op->dialog_information)
43 current =
op->dialog_information->all_messages;
50 nextrep = currep->
next;
59 currep =
op->dialog_information->all_replies;
61 nextrep = currep->
next;
68 free(
op->dialog_information);
69 op->dialog_information = NULL;
80 char *pipe, *save = NULL, *
msg;
88 pipe = strtok_r(
msg,
"|", &save);
94 pipe = strtok_r(NULL,
"|", &save);
121 if (
op->dialog_information == NULL)
127 msg = strdup(
op->msg);
131 if (strncmp(
current,
"@match ", 7) == 0) {
142 op->dialog_information->all_messages =
message;
146 }
else if ((strncmp(
current,
"@reply ", 7) == 0 && (len = 7)) || (strncmp(
current,
"@question ", 10) == 0 && (len = 10))) {
154 reply->message = strdup(cp+1);
158 LOG(
llevDebug,
"Warning: @reply/@question without message for %s!\n",
op->name);
167 reply->next =
op->dialog_information->all_replies;
168 op->dialog_information->all_replies =
reply;
170 LOG(
llevDebug,
"Warning: @reply not in @match block for %s!\n",
op->name);
177 tmp = realloc(
tmp, tmplen*
sizeof(
char));
183 strncat(
tmp,
"\n", tmplen-strlen(
tmp)-1);
185 current = strtok_r(NULL,
"\n", &save);
221 for (*
reply =
op->dialog_information->all_replies; *
reply; *
reply = (*reply)->next) {
222 if (strcmp((*reply)->reply,
text) == 0)