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);
171 }
else if ((strncmp(
current,
"@identify", 9) == 0 && (len = 9))) {
181 tmp =
static_cast<char *
>(realloc(
tmp, tmplen*
sizeof(
char)));
187 strncat(
tmp,
"\n", tmplen-strlen(
tmp)-1);
189 current = strtok_r(NULL,
"\n", &save);
225 for (*
reply =
op->dialog_information->all_replies; *
reply; *
reply = (*reply)->next) {
226 if (strcmp((*reply)->reply,
text) == 0)