- cl->reply.sms_status = 0;
- motd = fopen(SMS_MOTD_FILE, "r");
- if (motd == NULL) return;
- fgets(buffer, sizeof(buffer), motd);
- fclose(motd);
+ cl->reply.mr_status = 0;
+ motd = open(MOIRA_MOTD_FILE, 0, O_RDONLY);
+ if (motd < 0) return;
+ len = read(motd, buffer, sizeof(buffer) - 1);
+ close(motd);
+ buffer[len] = 0;
+ row_count = 0;