Remove menu key from doors.ini
This commit is contained in:
parent
109f59302a
commit
3af9685e52
1
bbs.h
1
bbs.h
@ -43,7 +43,6 @@ struct text_file {
|
|||||||
|
|
||||||
struct door_config {
|
struct door_config {
|
||||||
char *name;
|
char *name;
|
||||||
char key;
|
|
||||||
char *command;
|
char *command;
|
||||||
int stdio;
|
int stdio;
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
[Test Door]
|
[Test Door]
|
||||||
; the key to press in the door menu must not be Q or G not case sensitive
|
|
||||||
key = 0
|
|
||||||
; the command is passed node number as first argument
|
; the command is passed node number as first argument
|
||||||
; and socket number as second argument.
|
; and socket number as second argument.
|
||||||
command = /home/andrew/MagickaBBS/doors/rundoor.sh
|
command = /home/andrew/MagickaBBS/doors/rundoor.sh
|
||||||
|
8
main.c
8
main.c
@ -202,9 +202,7 @@ static int door_config_handler(void* user, const char* section, const char* name
|
|||||||
for (i=0;i<conf->door_count;i++) {
|
for (i=0;i<conf->door_count;i++) {
|
||||||
if (strcasecmp(conf->doors[i]->name, section) == 0) {
|
if (strcasecmp(conf->doors[i]->name, section) == 0) {
|
||||||
// found it
|
// found it
|
||||||
if (strcasecmp(name, "key") == 0) {
|
if (strcasecmp(name, "command") == 0) {
|
||||||
conf->doors[i]->key = value[0];
|
|
||||||
} else if (strcasecmp(name, "command") == 0) {
|
|
||||||
conf->doors[i]->command = strdup(value);
|
conf->doors[i]->command = strdup(value);
|
||||||
} else if (strcasecmp(name, "stdio") == 0) {
|
} else if (strcasecmp(name, "stdio") == 0) {
|
||||||
if (strcasecmp(value, "true") == 0) {
|
if (strcasecmp(value, "true") == 0) {
|
||||||
@ -227,9 +225,7 @@ static int door_config_handler(void* user, const char* section, const char* name
|
|||||||
|
|
||||||
conf->doors[conf->door_count]->name = strdup(section);
|
conf->doors[conf->door_count]->name = strdup(section);
|
||||||
|
|
||||||
if (strcasecmp(name, "key") == 0) {
|
if (strcasecmp(name, "command") == 0) {
|
||||||
conf->doors[conf->door_count]->key = value[0];
|
|
||||||
} else if (strcasecmp(name, "command") == 0) {
|
|
||||||
conf->doors[conf->door_count]->command = strdup(value);
|
conf->doors[conf->door_count]->command = strdup(value);
|
||||||
} else if (strcasecmp(name, "stdio") == 0) {
|
} else if (strcasecmp(name, "stdio") == 0) {
|
||||||
if (strcasecmp(value, "true") == 0) {
|
if (strcasecmp(value, "true") == 0) {
|
||||||
|
Reference in New Issue
Block a user