-/* cmd_global_motd.c - NeonServ v5.2
- * Copyright (C) 2011 Philipp Kreil (pk910)
+/* cmd_global_motd.c - NeonServ v5.3
+ * Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
CMD_BIND(global_cmd_motd) {
FILE *f;
f = fopen("motd.txt", "rb");
- if(!f) return 0;
+ if(!f) return;
char line[MAXLEN];
- while (fgets(line, MAXLEN, fp) != NULL) {
+ char *a;
+ while (fgets(line, MAXLEN, f) != NULL) {
if((a = strchr(line, '\n')))
*a = '\0';
reply(getTextBot(), user, "%s", line);